Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure additional metadata to trackers don't throw error in happy case. #290

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tuning/sft_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ def train(
try:
for k, v in additional_metrics.items():
tracker.track(metric=v, name=k, stage="additional_metrics")
if exp_metadata:
tracker.set_params(params=exp_metadata, name="experiment_metadata")
except ValueError as e:
logger.error(
Expand Down
4 changes: 3 additions & 1 deletion tuning/trackers/aimstack_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ def set_params(self, params, name="extra_params"):
Raises:
ValueError: the params passed is None or not of type dict
"""
if params is None or (not isinstance(params, dict)):
if params is None:
return
if not isinstance(params, dict):
raise ValueError(
"set_params passed to aimstack should be called with a dict of params"
)
Expand Down
Loading