Skip to content

docs: SDK/API Reference contains incorrect example code#470

Open
MichaelDik wants to merge 3 commits into
mainfrom
fix/logger-docstring-fixes
Open

docs: SDK/API Reference contains incorrect example code#470
MichaelDik wants to merge 3 commits into
mainfrom
fix/logger-docstring-fixes

Conversation

@MichaelDik

@MichaelDik MichaelDik commented Feb 4, 2026

Copy link
Copy Markdown

User description

Description:

SDK/API Reference is incorrect - https://v2docs.galileo.ai/sdk-api/python/reference/logger/logger. Variable names were wrong and the first example is missing the full logger.method for each method and logger.flush at the end.

Tests:

Tested both blocks of code with correct variable names, logger.methods, and logger.flush in the first block.


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Document GalileoLogger usage in the reference so the sample trace shows each method call explicitly, ends with logger.flush(), and passes the correct model argument. Align the span examples with the real API by renaming the token arguments to num_input_tokens/num_output_tokens so they match the logger interface.

Latest Contributors(2)
UserCommitDate
calebe.sep@hotmail.comfix-auto-convert-non-s...March 02, 2026
mason@galileo.aifeat-allow-session-met...February 13, 2026
This pull request is reviewed by Baz. Review like a pro on (Baz).

@MichaelDik MichaelDik requested a review from a team as a code owner February 4, 2026 19:36
john-weiler
john-weiler previously approved these changes Feb 4, 2026
@@ -87,24 +87,25 @@ class GalileoLogger(TracesLogger):
and log it to Galileo using `conclude`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Failed check: pre-commit / pre-commit
I’ve attached the relevant part of the log for your convenience:
pre-commit formatting/whitespace change detected in docstring/code block inside class GalileoLogger (around line 87). The pre-commit hook produced a diff modifying a blank/whitespace-only line before logger.start_trace(...).

Finding type: Log Error

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit 9b995ac addressed this comment. The pre-commit formatting issue was resolved by adding a blank line (line 90) before the logger.start_trace(...) call in the docstring code block, exactly as the pre-commit hook required. The code block now has proper whitespace formatting.

@codecov

codecov Bot commented Feb 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.03%. Comparing base (9b60fa3) to head (54da708).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #470   +/-   ##
=======================================
  Coverage   82.03%   82.03%           
=======================================
  Files          96       96           
  Lines        9274     9274           
=======================================
  Hits         7608     7608           
  Misses       1666     1666           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MichaelDik MichaelDik force-pushed the fix/logger-docstring-fixes branch from 431b75e to 9b995ac Compare February 4, 2026 19:42
@wenbo-galileo

Copy link
Copy Markdown

The new sample code LGTM!

wenbo-galileo
wenbo-galileo previously approved these changes Feb 19, 2026

@wenbo-galileo wenbo-galileo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@samgdf

samgdf commented Feb 19, 2026

Copy link
Copy Markdown

Failing due to pre-commit (pull_request) @MichaelDik AI summary: The job failed due to the pre-commit "trailing-whitespace" hook, which found and modified files with trailing whitespace. To fix this:

  1. Run pre-commit locally: pre-commit run --all-files.
  2. Commit the changes made by pre-commit (removal of trailing whitespace).
  3. Push the commit to your branch to pass the check.

No code logic changes are needed—just ensure all files have no trailing whitespace.

@MichaelDik MichaelDik force-pushed the fix/logger-docstring-fixes branch from ef28f46 to 2232696 Compare March 4, 2026 14:25
@galileo-automation

Copy link
Copy Markdown
Contributor

No activity for 30 days — this PR will be closed in 5 days unless updated.

@MichaelDik MichaelDik dismissed stale reviews from wenbo-galileo and john-weiler via 54da708 May 27, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants