fix: suppress CS0618 for AddZipkinExporter and add Ollama training handlers#498
Merged
JerrettDavis merged 2 commits intomainfrom Apr 27, 2026
Merged
Conversation
OpenTelemetry.Exporter.Zipkin 1.15.3 marks AddZipkinExporter as [Obsolete], which the compiler promotes to CS0618 error under TreatWarningsAsErrors. The project already dropped the Zipkin package version NU1902 in PR #497 but the call site pragma was never committed. Wrap the single call site with #pragma warning disable/restore CS0618 so CI compiles cleanly while backward-compat "zipkin" config support is maintained until a full OTLP migration is done. Failing file: src/JD.AI.Telemetry/Extensions/TelemetryServiceExtensions.cs Error: CS0618 @ line 101 (GitHub main) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… Program.cs The train-model workflow fails at "Train ML.NET model" (step 9) with a FileNotFoundException on ollama_training_data.jsonl. Root cause: Program.cs had no handler for --ollama-generate or --ollama-validate. The "Synthesize training examples" step passes `--ollama-generate 150 --output src/.../intent_classifier.zip` but Program.cs silently ignored the unknown flag and fell through to the built-in seed-corpus path, writing to /tmp/intent_training_data.csv instead of the expected src/JD.AI.Workflows/Models/ollama_training_data.jsonl. When "Train ML.NET model" then ran `--data ollama_training_data.jsonl`, the file didn't exist → FileNotFoundException → exit non-zero. Fix: - Add --ollama-generate <count> handler: calls AiTrainingDataSynthesizer .GenerateAsync(count), writes results to ollama_training_data.jsonl in the same directory as --output, then exits 0. - Add --ollama-validate handler: reads --data file, calls ValidateAsync, writes disagreement count to validate_summary.txt, then exits 0. - Both handlers read OLLAMA_HOST env var (set by CI) for the Ollama URL. - Update AiTrainingDataSynthesizer constructor to accept ollamaHost param and forward it to OllamaClient. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
Code Coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes after PR #497 landed on main:
Telemetry (CS0618): Wrap
AddZipkinExportercall site insrc/JD.AI.Telemetry/Extensions/TelemetryServiceExtensions.cswith#pragma warning disable/restore CS0618so the project compiles cleanly under TreatWarningsAsErrors.Ollama Training: Add
--ollama-generate <count>and--ollama-validateCLI handlers intools/JD.AI.Workflows.Training/Program.cs, plusOLLAMA_HOSTenvironment variable plumbing forwarded toOllamaClient.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com