Skip to content

fix: honor report_to when constructing the internal ST trainer - #643

Closed
tonycoder-hub wants to merge 2 commits into
huggingface:mainfrom
tonycoder-hub:cursor/fix-report-to-propagation-dagshub-efd4
Closed

fix: honor report_to when constructing the internal ST trainer#643
tonycoder-hub wants to merge 2 commits into
huggingface:mainfrom
tonycoder-hub:cursor/fix-report-to-propagation-dagshub-efd4

Conversation

@tonycoder-hub

Copy link
Copy Markdown

Summary

BCSentenceTransformersTrainer built SentenceTransformerTrainingArguments with only output_dir, so report_to defaulted to "all". transformers.Trainer.__init__ registered every installed integration (including DagsHub) before _apply_training_arguments copied the user's report_to.

On Windows, DagsHubCallback.setup then splits MLFLOW_TRACKING_URI on os.sep and crashes even when the user asked for report_to="mlflow" (or "none").

Pass report_to at construction time so callbacks match the user's setting.

Closes #621

Test plan

  • pytest tests/test_trainer.py tests/test_training_args.py tests/test_model_card.py -q → 50 passed, 2 skipped
  • New test_trainer_report_to fails on current main (report_to="none" still registers a dummy integration) and passes after the change

cursoragent and others added 2 commits August 17, 2026 09:09
The reporting callbacks of the internal Sentence Transformers trainer were
created from the default 'all' setting rather than from the SetFit
TrainingArguments, so integrations that the user did not request were still
initialized and executed.

Co-authored-by: Tony Coder <407243179@qq.com>
Co-authored-by: Tony Coder <407243179@qq.com>
@tonycoder-hub

Copy link
Copy Markdown
Author

Closing as stale — opened on or before 2026-08-17 and still unmerged.

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.

DagsHubCallback fails on Windows

2 participants