Conversation
fpaissan
requested changes
Jul 5, 2024
| "lr": 0.001, # this is ignored if you are overriding the configure_optimizers | ||
| "debug": False, | ||
| "log_wandb": False, | ||
| "wandb_resume": "auto", # ["allow", "must", "never", "auto" or None] |
Collaborator
There was a problem hiding this comment.
I'm not sure what is the best way to do this. But we need to define better the effect of each field of default_cfg.
Maybe a long comment ("""xx""") after the closing bracket?
| name=self.hparams.experiment_name, | ||
| resume=self.hparams.wandb_resume, | ||
| id=self.hparams.experiment_name, | ||
| config=self.hparams, |
Collaborator
There was a problem hiding this comment.
here we can check if the configuration provides any extra arguments to be passed to the init. eventually, we load them (check the usage of ** operator).
| else: | ||
| val_metrics = train_metrics.update({"val_loss": loss_epoch / (idx + 1)}) | ||
|
|
||
| if self.hparams.log_wandb: # wandb log |
Collaborator
There was a problem hiding this comment.
I might be wrong, but it would be nicer if we divide the train and valid panes inside the wandb logging. this would look something like val/{metric_name} will be logged instead of val_{metric_name}. ofc this change only applies to the .log call and should not be propagated to the entire core.
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.
Add wandb log, from default is not active.
To start log just set hyperparameter 'log_wandb' = True
During train loop it will automatically log train, validation metrics and lr if there is a lr_scheduler.
It start a wandb project named by default 'micromind' and each run are the name of the experiment. It automatically resume the log if the experiment restart after a crash.