-
Notifications
You must be signed in to change notification settings - Fork 61
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
Stores Timechop image to disk #590
Conversation
project_path/images/experiment_filename.svg.
@thcrock Could you point me to an example of ProjectStore? Maybe when |
Codecov Report
@@ Coverage Diff @@
## master #590 +/- ##
==========================================
- Coverage 82.49% 82.46% -0.04%
==========================================
Files 83 84 +1
Lines 4845 4905 +60
==========================================
+ Hits 3997 4045 +48
- Misses 848 860 +12
Continue to review full report at Codecov.
|
We did cover it in slack, but for anybody else reading here is where the project storage is used to save profiling data. https://github.com/dssg/triage/blob/master/src/triage/experiments/base.py#L661-L673 |
@thcrock How do you suggest to get a reference to the |
You already have the project path, which is all you need to instantiate a new ProjectStorage object. This is all the Experiment is doing to create it: https://github.com/dssg/triage/blob/master/src/triage/experiments/base.py#L102 For now, for consistency with the experiment I'd probably instantiate the ProjectStorage within the timechop component. |
Perfect! |
@thcrock in order to have access to the storage component, I removed the |
No, I don't think there necessarily needs to be a new class like ModelStorage, you could use ProjectStorage directly. Here's an example:
Whether or not it goes in the 'triage experiment' command or stats in the 'triage showtimechops' command, I don't have a strong opinion on. My goal with the 'triage showtimechops' command is that you could send it an experiment config but could also just give it a YAML file that only has temporal config, so reusing that is fine. Both interfaces are fine I think, and there's no reason they couldn't co-exist. |
@thcrock Thanks! I will do the changes that you suggested |
@thcrock done. I am gonna merge this. Should I use squash and merge? |
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.
Not sure about what this does to the experiment
command
help="Visualize time chops (temporal cross-validation blocks')" | ||
) | ||
|
||
parser.set_defaults(validate=False, validate_only=False, materialize_fromobjs=True) |
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.
...This was intentional? To change the validate
default from True
to False
?
@@ -287,6 +270,17 @@ def __call__(self, args): | |||
elif args.validate: | |||
self.experiment.validate() | |||
self.experiment.run() | |||
elif args.show_timechop: |
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.
It seems the intention is to add to the existing "don't run" option, validate_only
, a new one, show_timechop
.
I don't know if changing the validate
default was intended to help with this; though, I don't think our desire to validate, by default, has changed.
This allows for what I think would be nonsensical invocations, however, e.g.:
--validate --show-timechop
...which won't show any timechop, no?
If I'm right, I'd recommend:
- Don't change the defaults, (if they still hold for how we want to run the experiment).
- Move this
elif
to check forshow_timechop
first -- it's not a default, so if it's set, they definitely wanted it - Add some of these arguments exactly the same, but to a mutually-exclusive group, (rather than directly onto the parser) [docs]. I would think
('--validate', '--validate-only', '--show-timechop')
, for example, are such a mutually-exclusive group -- it doesn't make sense for the user to mix these on the command line.
Related to #512.
Doesn't show the plot, but it stores it to disk