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

Show Create DB log in dataset view #222

Merged
merged 1 commit into from
Aug 18, 2015

Conversation

gheinrich
Copy link
Contributor

No description provided.

@@ -53,9 +53,13 @@ def __init__(self, input_file, db_name, image_dims, **kwargs):

self.entries_count = None
self.distribution = None
self.create_db_log_file = "createdb_%s_output.txt" % db_name
Copy link
Member

Choose a reason for hiding this comment

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

That's a little wordy. Would create_%s.log be too short?

@lukeyeager
Copy link
Member

Great PR! This should definitely help with some of the confusion about DIGITS silently ignoring errors when creating datasets.

assert path and path != ''
assert os.path.isfile(path), "log file %s does not exist" % path
assert self.delete_dataset(job_id) == 200, 'delete failed'
assert not self.dataset_exists(job_id), 'dataset exists after delete'
Copy link
Member

Choose a reason for hiding this comment

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

No need to explicitly delete the dataset. It will be deleted in tearDownClass():

# delete any created datasets
for job_id in cls.created_datasets:
cls.delete_dataset(job_id)

@gheinrich gheinrich force-pushed the dev/createDbLog branch 2 times, most recently from ce544fe to a915e24 Compare August 17, 2015 18:51
@gheinrich
Copy link
Contributor Author

Thanks for the feedback Luke! I have made the changes you suggested. I am not sure why code coverage went down. The tool reports a miss on lines https://github.com/gheinrich/DIGITS/blob/dev/createDbLog/digits/dataset/images/classification/test_views.py#L267-L274 even though they are part of a test that passed.

This opens an interesting can of worms. Do you envision exposing all available files via the REST API eventually?

I leave this decision to you :-)

@lukeyeager
Copy link
Member

I am not sure why code coverage went down

I've noticed that there are some lines in the scheduler which run sometimes and not others. It's not really a problem, but it makes our test coverage vary somewhat from run to run.

The tool reports a miss on lines ... even though they are part of a test that passed

Yeah that's weird.

@@ -53,9 +53,13 @@ def __init__(self, input_file, db_name, image_dims, **kwargs):

self.entries_count = None
self.distribution = None
self.create_db_log_file = "create_%s.txt" % db_name
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 use .log instead of .txt? That's what we have for the Caffe output.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, sorry I read the first comment too quickly. I used the .txt extension because in Firefox it shows the file automatically without asking the user to download/choose an external tool to open it. But you're right, it's better to keep consistency in the project.

lukeyeager added a commit that referenced this pull request Aug 18, 2015
Show Create DB log in dataset view
@lukeyeager lukeyeager merged commit 2dcfe2f into NVIDIA:master Aug 18, 2015
@gheinrich gheinrich deleted the dev/createDbLog branch August 25, 2015 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants