-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix tracking #361
fix tracking #361
Conversation
The documentation is not available anymore as the PR was closed or merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this!
@@ -293,7 +294,7 @@ def collate_fn(examples): | |||
{ | |||
"accuracy": eval_metric["accuracy"], | |||
"f1": eval_metric["f1"], | |||
"train_loss": total_loss, | |||
"train_loss": total_loss.item() if type(total_loss) == torch.Tensor else total_loss, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really have either a Tensor or something else? Can't it always be .item()
here?
examples/by_feature/tracking.py
Outdated
if args.with_tracking: | ||
accelerator.log( | ||
{ | ||
"accuracy": eval_metric["accuracy"], | ||
"f1": eval_metric["f1"], | ||
"train_loss": total_loss, | ||
"train_loss": total_loss.item() if type(total_loss) == torch.Tensor else total_loss, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment
examples/complete_nlp_example.py
Outdated
@@ -245,9 +246,10 @@ def collate_fn(examples): | |||
{ | |||
"accuracy": eval_metric["accuracy"], | |||
"f1": eval_metric["f1"], | |||
"train_loss": total_loss, | |||
"train_loss": total_loss.item() if type(total_loss) == torch.Tensor else total_loss, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
Oh, also make sure to edit the title of the PR ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG2M, will handle looking at the failing diff test tomorrow morning, as not sure quite what's going on there.
What does this PR do?
log_others
. No plots were being created. Fixing it to be able to get plots for metrics usinglog_metric
andlog_metrics
.Post these changes, below are the plots for the run_glue_no_trainer.py script on MRPC task using all trackers.
![Screenshot 2022-05-12 at 8 11 16 PM](https://user-images.githubusercontent.com/13534540/168102355-8b1eae0b-3856-4dba-af6c-b63ae25abf80.png)
![Screenshot 2022-05-12 at 8 10 51 PM](https://user-images.githubusercontent.com/13534540/168102370-30d36c47-9863-46f4-a9d8-094598c75677.png)
![Screenshot 2022-05-12 at 8 10 17 PM](https://user-images.githubusercontent.com/13534540/168102371-7a9d8998-af14-403d-9bf3-95bc83459f5d.png)