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

[FEATURE REQUEST] A way to save the scan after every permutation tested #207

Closed
JohanMollevik opened this issue Feb 19, 2019 · 9 comments
Closed
Assignees
Milestone

Comments

@JohanMollevik
Copy link

It would be great to be able to save the scan to a file after every premutation to be able to continue where it left of if it was interupted for some reason. Right now if I have a long running scan process and the computer shuts down I have to redo everything. If we could save and continue scans this would allow backing up the partial results and avoid loosing as much work.

@mikkokotila mikkokotila self-assigned this Feb 19, 2019
@mikkokotila mikkokotila added this to the v.0.5 milestone Feb 19, 2019
@mikkokotila
Copy link
Contributor

I agree, this is a key feature to add. IMO the single most important entirely new feature to add. It will be straightforward to do this with the building blocks that are already there (I think). I will work on this and it will be included in the v.0.5 which should be a few weeks away.

@renatobellotti
Copy link

I would like to make a suggestion for this. I'm not sure if you would consider this a different feature, but it might be at least a quick temporary fix.

  • Scan() creates a directory talos_output
  • For each experiment, Talos creates a subdirectory, named after the ID of the experiment (the row number in the .csv file)
  • Scan() adds the path to the experiment's output directory to the params dict before passing it to the model function.
  • The model function can now save everything to this directory, and it is clear which experiment the output belongs to.

Would this be feasible?

@mikkokotila
Copy link
Contributor

I think that does make sense.

Regarding the specific case that @JohanMollevik is suggesting, given we already store the log with information on each permutation, we would have to decide what else is a must have in the folder. Maybe start by storing the weights and json for each model, as together with the results that should be enough to not lose anything substantial even though there was a system crash or something like that. That part would have to be an argument in Scan() though, maybe model_backups=True.

@mikkokotila mikkokotila modified the milestones: v.0.5.1, v.0.6.2 Jul 28, 2019
@mikkokotila mikkokotila changed the title A way to save the scan after every premutation tested FEATURE REQUEST: A way to save the scan after every permutation tested Jul 28, 2019
@renatobellotti
Copy link

renatobellotti commented Jul 29, 2019

I think it might also be nice to have some plots of the history during training (of all metrics & the loss), and perhaps some explanation plots (SHAP? Lime?)

But most important for reproducible runs is the state of the used RNGs. That should be logged definitely.

@mikkokotila
Copy link
Contributor

I think it might also be nice to have some plots of the history during training (of all metrics & the loss)

This is now available with ExperimentLogCallback

@mikkokotila
Copy link
Contributor

mikkokotila commented Aug 5, 2019

More updates regarding this:

  • Scan(...experiment_name...) is now required for all experiments
  • in the present working directly, folder with that name will be created
  • inside that folder the experiment log is stored with .csv ending using second precision timestamp
  • if using ExperimentLogCallback one must use the same experiment_name there as input
  • ExperimentLogCallback will do matching for the actual file name based on the most recently modified file in that folder, which should be the experiment log
  • experiment log with permutation data has .csv ending and epoch-by-epoch log has .log ending

EDIT: One of the most obvious advantages here is that experiments remain cleanly in their own folders, and there is no need to remember to change the name of the experiment between iterations.

This should be pushed later today.

mikkokotila added a commit that referenced this issue Aug 5, 2019
…ement

- `experiment_name` is now compulsory
- Addresses #207 and prepare for browser based "command center"
- Added 'trees' reduction strategy
- Added 'forrest' reduction strategy
- added `scan_utils.py` as a home for helper functions for /scan
- fixed tests to handle the new changes
@mikkokotila
Copy link
Contributor

mikkokotila commented Aug 7, 2019

Update

From 0.6.3 onwards, there is available Scan(...reduction_method='gamify') which outputs to the experiment folder with the experiment id a .json file during each permutation. In that file there is a dictionary with dictionaries, where the main dictionary keys consist of hyperparameter labels, and the sub-dictionaries consist of hyperparameter values corresponding to the label (e.g. lr and 0.01). Together with the value there is a string 'active' by default. Changing this to 'inactive' in the local file, during the next permutation all permutations in the parameter space with that value will be dropped.

Related with this, as of yesterday a visual command center (well for now it's just the visuals, but commands are coming). It's called Gamify and it allows you to visualize and analyze the experiment results during the experiment through a web browser.

With the Talos v.0.6.3 changes, also controls will be added to Gamify, so that you can analyze the results, make changes, and see the changes for yourself in real-time. Gamify has live monitoring for epoch-by-epoch data as well.

@mikkokotila mikkokotila changed the title FEATURE REQUEST: A way to save the scan after every permutation tested [FEATURE REQUEST] A way to save the scan after every permutation tested Jan 26, 2020
@mikkokotila
Copy link
Contributor

I'm closing this as this now lives in Gamify.

@renatobellotti
Copy link

Thank you very much!

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

No branches or pull requests

3 participants