-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Get stats & original network def from "Download Model" button #891
Conversation
digits/model/images/job.py
Outdated
| from digits.utils import subclass, override | ||
|
|
||
| import json | ||
| import os |
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.
I have been contaminated by @lukeyeager and will reproduce his comment that PEP8 recommends putting standard package imports first (see) :-)
190e020 to
43feedb
Compare
|
Thanks Greg! I implemented your comments. |
digits/model/images/job.py
Outdated
| self.pickver_job_model_image = PICKLE_VERSION | ||
|
|
||
| @override | ||
| def get_job_stats_as_json_string(self,epoch=-1): |
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.
Hi, I'm still wondering why you didn't just extend json_dict() with the additional bits of information?
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.
Sorry missed this comment! Yes that is a much better idea, I changed it in my last commit.
2f3949e to
c362b3b
Compare
| "creation time": self.status_history[0][1], | ||
| "username": self.username, | ||
| }) | ||
|
|
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.
nice!
|
Thanks, those changes look good to me. |
digits/model/views.py
Outdated
| with tarfile.open(fileobj=b, mode='w:%s' % mode) as tf: | ||
| for path, name in job.download_files(epoch): | ||
| tf.add(path, arcname=name) | ||
| tf.add(temp.name,arcname="stats.json") |
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.
I vote for info.json instead.
|
Is there any way to print dates as dates instead of floats? |
| "snapshot file": self.get_snapshot_filename(epoch), | ||
| "solver file": self.solver_file, | ||
| "train_val file": self.train_val_file, | ||
| "deploy file": self.deploy_file, |
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.
Can we add "caffe_version" and "caffe_flavor" here? Or I guess "caffe version" and "caffe flavor" since you've gone with spaces.
…l as other info stored in a json file moved snapshot function to train moved get_snapshot code to tasks removed extra whitespace added tests for get_snapshot switched to json_dict() removed extra try catch block updated json tests for json_dict() override fixed issue when getting snapshots when none exist renames stats, added caffe flavor/version, and datetime as date
c362b3b to
8e64591
Compare
|
Thanks Luke! I added your suggestions. |
|
This looks good to me. As with any changes to the REST API, this will probably break someone's workflow and we should make a note of it in the next release notes. |
Get stats & original network def from "Download Model" button
closes #228