docs: SDK/API Reference contains incorrect example code#470
docs: SDK/API Reference contains incorrect example code#470MichaelDik wants to merge 3 commits intomainfrom
Conversation
| @@ -87,24 +87,25 @@ class GalileoLogger(TracesLogger): | |||
| and log it to Galileo using `conclude`. | |||
There was a problem hiding this comment.
❌ 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
There was a problem hiding this comment.
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.
…the sdk/api/reference example
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
431b75e to
9b995ac
Compare
|
The new sample code LGTM! |
|
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:
No code logic changes are needed—just ensure all files have no trailing whitespace. |
ef28f46 to
2232696
Compare
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
GalileoLoggerusage in the reference so the sample trace shows each method call explicitly, ends withlogger.flush(), and passes the correctmodelargument. Align the span examples with the real API by renaming the token arguments tonum_input_tokens/num_output_tokensso they match the logger interface.Latest Contributors(2)