Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Get stats & original network def from "Download Model" button #891

Merged
merged 1 commit into from
Jul 12, 2016

Conversation

Lucaszw
Copy link
Contributor

@Lucaszw Lucaszw commented Jul 7, 2016

closes #228

from digits.utils import subclass, override

import json
import os
Copy link
Contributor

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) :-)

@Lucaszw Lucaszw force-pushed the downloadedModelInformation branch 3 times, most recently from 190e020 to 43feedb Compare July 7, 2016 20:49
@Lucaszw
Copy link
Contributor Author

Lucaszw commented Jul 7, 2016

Thanks Greg! I implemented your comments.

@@ -17,3 +21,16 @@ def __init__(self, **kwargs):
super(ImageModelJob, self).__init__(**kwargs)
self.pickver_job_model_image = PICKLE_VERSION

@override
def get_job_stats_as_json_string(self,epoch=-1):
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@Lucaszw Lucaszw force-pushed the downloadedModelInformation branch 4 times, most recently from 2f3949e to c362b3b Compare July 9, 2016 02:26
"creation time": self.status_history[0][1],
"username": self.username,
})

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@gheinrich
Copy link
Contributor

Thanks, those changes look good to me.

@@ -214,13 +214,18 @@ def download(job_id, extension):
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")
Copy link
Member

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.

@lukeyeager
Copy link
Member

Is there any way to print dates as dates instead of floats?

"solver file": self.solver_file,
"train_val file": self.train_val_file,
"deploy file": self.deploy_file,
"framework": "caffe"
Copy link
Member

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
@Lucaszw Lucaszw force-pushed the downloadedModelInformation branch from c362b3b to 8e64591 Compare July 12, 2016 16:58
@Lucaszw
Copy link
Contributor Author

Lucaszw commented Jul 12, 2016

Thanks Luke! I added your suggestions.

@lukeyeager
Copy link
Member

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.

@lukeyeager lukeyeager merged commit d0b407a into NVIDIA:master Jul 12, 2016
SlipknotTN pushed a commit to cynnyx/DIGITS that referenced this pull request Mar 30, 2017
Get stats & original network def from "Download Model" button
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide information file with downloaded models
3 participants