{"action":"created","comment":{"url":"https://api.github.com/repos/NVIDIA/DIGITS/pulls/comments/64155744","id":64155744,"diff_hunk":"@@ -214,6 +214,28 @@ def get_job(self, job_id):\n             return None\n         return self.jobs.get(job_id, None)\n \n+    def get_related_jobs(self, job):\n+        \"\"\"\n+        Look through self.jobs to try to find the Jobs\n+        whose parent contains job\n+        \"\"\"\n+        related_jobs = []\n+\n+        if 'Model' in job.job_type():\n+            datajob = job.parent_job()[0]","path":"digits/scheduler.py","position":12,"original_position":12,"commit_id":"df05d19dc18129f637495cc2b807c80919f31980","original_commit_id":"df05d19dc18129f637495cc2b807c80919f31980","user":{"login":"gheinrich","id":3889770,"avatar_url":"https://avatars.githubusercontent.com/u/3889770?v=3","gravatar_id":"","url":"https://api.github.com/users/gheinrich","html_url":"https://github.com/gheinrich","followers_url":"https://api.github.com/users/gheinrich/followers","following_url":"https://api.github.com/users/gheinrich/following{/other_user}","gists_url":"https://api.github.com/users/gheinrich/gists{/gist_id}","starred_url":"https://api.github.com/users/gheinrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gheinrich/subscriptions","organizations_url":"https://api.github.com/users/gheinrich/orgs","repos_url":"https://api.github.com/users/gheinrich/repos","events_url":"https://api.github.com/users/gheinrich/events{/privacy}","received_events_url":"https://api.github.com/users/gheinrich/received_events","type":"User","site_admin":false},"body":"I think this is the only reference to `parent_job()` and it's only useful if the job is a `ModelJob` in which case the `dataset` attribute is returned. Wouldn't it be simpler to remove this `parent_job()` method altogether and do something like:\r\n```\r\nif isinstance(job, ModelJob):\r\n    datajob = job.dataset\r\nelif isinstance(job, DatasetJob):\r\n    datajob = job\r\nelse:\r\n    raise ValueError(\"Unhandled job type %s\" % job.job_type())\r\n```","created_at":"2016-05-22T20:27:14Z","updated_at":"2016-05-22T20:27:14Z","html_url":"https://github.com/NVIDIA/DIGITS/pull/767#discussion_r64155744","pull_request_url":"https://api.github.com/repos/NVIDIA/DIGITS/pulls/767","_links":{"self":{"href":"https://api.github.com/repos/NVIDIA/DIGITS/pulls/comments/64155744"},"html":{"href":"https://github.com/NVIDIA/DIGITS/pull/767#discussion_r64155744"},"pull_request":{"href":"https://api.github.com/repos/NVIDIA/DIGITS/pulls/767"}}},"pull_request":{"url":"https://api.github.com/repos/NVIDIA/DIGITS/pulls/767","id":70949272,"html_url":"https://github.com/NVIDIA/DIGITS/pull/767","diff_url":"https://github.com/NVIDIA/DIGITS/pull/767.diff","patch_url":"https://github.com/NVIDIA/DIGITS/pull/767.patch","issue_url":"https://api.github.com/repos/NVIDIA/DIGITS/issues/767","number":767,"state":"open","locked":false,"title":"Related Jobs in Dataset and Model view","user":{"login":"TimZaman","id":7721540,"avatar_url":"https://avatars.githubusercontent.com/u/7721540?v=3","gravatar_id":"","url":"https://api.github.com/users/TimZaman","html_url":"https://github.com/TimZaman","followers_url":"https://api.github.com/users/TimZaman/followers","following_url":"https://api.github.com/users/TimZaman/following{/other_user}","gists_url":"https://api.github.com/users/TimZaman/gists{/gist_id}","starred_url":"https://api.github.com/users/TimZaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimZaman/subscriptions","organizations_url":"https://api.github.com/users/TimZaman/orgs","repos_url":"https://api.github.com/users/TimZaman/repos","events_url":"https://api.github.com/users/TimZaman/events{/privacy}","received_events_url":"https://api.github.com/users/TimZaman/received_events","type":"User","site_admin":false},"body":"See #667 , revised version of #668.\r\nSee below for screenshots. Very straightforward.\r\n\r\nReady for review @lukeyeager (https://github.com/NVIDIA/DIGITS/issues/667#issuecomment-220705017)\r\n\r\n### Dataset View:\r\n![image](https://cloud.githubusercontent.com/assets/7721540/15448578/63042772-1f66-11e6-85c0-38f064bf3e64.png)\r\n\r\n### Model View:\r\n![image](https://cloud.githubusercontent.com/assets/7721540/15448581/764da3a8-1f66-11e6-9cfe-6fcee6359aae.png)","created_at":"2016-05-21T13:16:07Z","updated_at":"2016-05-22T20:27:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1f19ab9c231454739c5c09548b35cad35707da1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NVIDIA/DIGITS/pulls/767/commits","review_comments_url":"https://api.github.com/repos/NVIDIA/DIGITS/pulls/767/comments","review_comment_url":"https://api.github.com/repos/NVIDIA/DIGITS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NVIDIA/DIGITS/issues/767/comments","statuses_url":"https://api.github.com/repos/NVIDIA/DIGITS/statuses/df05d19dc18129f637495cc2b807c80919f31980","head":{"label":"brainstorm-ai:related_jobs","ref":"related_jobs","sha":"df05d19dc18129f637495cc2b807c80919f31980","user":{"login":"brainstorm-ai","id":13692281,"avatar_url":"https://avatars.githubusercontent.com/u/13692281?v=3","gravatar_id":"","url":"https://api.github.com/users/brainstorm-ai","html_url":"https://github.com/brainstorm-ai","followers_url":"https://api.github.com/users/brainstorm-ai/followers","following_url":"https://api.github.com/users/brainstorm-ai/following{/other_user}","gists_url":"https://api.github.com/users/brainstorm-ai/gists{/gist_id}","starred_url":"https://api.github.com/users/brainstorm-ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brainstorm-ai/subscriptions","organizations_url":"https://api.github.com/users/brainstorm-ai/orgs","repos_url":"https://api.github.com/users/brainstorm-ai/repos","events_url":"https://api.github.com/users/brainstorm-ai/events{/privacy}","received_events_url":"https://api.github.com/users/brainstorm-ai/received_events","type":"Organization","site_admin":false},"repo":{"id":55006087,"name":"DIGITS","full_name":"brainstorm-ai/DIGITS","owner":{"login":"brainstorm-ai","id":13692281,"avatar_url":"https://avatars.githubusercontent.com/u/13692281?v=3","gravatar_id":"","url":"https://api.github.com/users/brainstorm-ai","html_url":"https://github.com/brainstorm-ai","followers_url":"https://api.github.com/users/brainstorm-ai/followers","following_url":"https://api.github.com/users/brainstorm-ai/following{/other_user}","gists_url":"https://api.github.com/users/brainstorm-ai/gists{/gist_id}","starred_url":"https://api.github.com/users/brainstorm-ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brainstorm-ai/subscriptions","organizations_url":"https://api.github.com/users/brainstorm-ai/orgs","repos_url":"https://api.github.com/users/brainstorm-ai/repos","events_url":"https://api.github.com/users/brainstorm-ai/events{/privacy}","received_events_url":"https://api.github.com/users/brainstorm-ai/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/brainstorm-ai/DIGITS","description":"Deep Learning GPU Training System","fork":true,"url":"https://api.github.com/repos/brainstorm-ai/DIGITS","forks_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/forks","keys_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/teams","hooks_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/hooks","issue_events_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/issues/events{/number}","events_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/events","assignees_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/assignees{/user}","branches_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/branches{/branch}","tags_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/tags","blobs_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/git/refs{/sha}","trees_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/statuses/{sha}","languages_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/languages","stargazers_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/stargazers","contributors_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/contributors","subscribers_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/subscribers","subscription_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/subscription","commits_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/commits{/sha}","git_commits_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/git/commits{/sha}","comments_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/comments{/number}","issue_comment_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/issues/comments{/number}","contents_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/contents/{+path}","compare_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/merges","archive_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/downloads","issues_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/issues{/number}","pulls_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/pulls{/number}","milestones_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/milestones{/number}","notifications_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/labels{/name}","releases_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/releases{/id}","deployments_url":"https://api.github.com/repos/brainstorm-ai/DIGITS/deployments","created_at":"2016-03-29T19:50:34Z","updated_at":"2016-03-29T19:50:35Z","pushed_at":"2016-05-21T13:10:22Z","git_url":"git://github.com/brainstorm-ai/DIGITS.git","ssh_url":"git@github.com:brainstorm-ai/DIGITS.git","clone_url":"https://github.com/brainstorm-ai/DIGITS.git","svn_url":"https://github.com/brainstorm-ai/DIGITS","homepage":"https://developer.nvidia.com/digits","size":9550,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"bs/dev"}},"base":{"label":"NVIDIA:master","ref":"master","sha":"fb1252b0990d4a6bf7d83dd05c96b8ea87823e76","user":{"login":"NVIDIA","id":1728152,"avatar_url":"https://avatars.githubusercontent.com/u/1728152?v=3","gravatar_id":"","url":"https://api.github.com/users/NVIDIA","html_url":"https://github.com/NVIDIA","followers_url":"https://api.github.com/users/NVIDIA/followers","following_url":"https://api.github.com/users/NVIDIA/following{/other_user}","gists_url":"https://api.github.com/users/NVIDIA/gists{/gist_id}","starred_url":"https://api.github.com/users/NVIDIA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NVIDIA/subscriptions","organizations_url":"https://api.github.com/users/NVIDIA/orgs","repos_url":"https://api.github.com/users/NVIDIA/repos","events_url":"https://api.github.com/users/NVIDIA/events{/privacy}","received_events_url":"https://api.github.com/users/NVIDIA/received_events","type":"Organization","site_admin":false},"repo":{"id":32403967,"name":"DIGITS","full_name":"NVIDIA/DIGITS","owner":{"login":"NVIDIA","id":1728152,"avatar_url":"https://avatars.githubusercontent.com/u/1728152?v=3","gravatar_id":"","url":"https://api.github.com/users/NVIDIA","html_url":"https://github.com/NVIDIA","followers_url":"https://api.github.com/users/NVIDIA/followers","following_url":"https://api.github.com/users/NVIDIA/following{/other_user}","gists_url":"https://api.github.com/users/NVIDIA/gists{/gist_id}","starred_url":"https://api.github.com/users/NVIDIA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NVIDIA/subscriptions","organizations_url":"https://api.github.com/users/NVIDIA/orgs","repos_url":"https://api.github.com/users/NVIDIA/repos","events_url":"https://api.github.com/users/NVIDIA/events{/privacy}","received_events_url":"https://api.github.com/users/NVIDIA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NVIDIA/DIGITS","description":"Deep Learning GPU Training System","fork":false,"url":"https://api.github.com/repos/NVIDIA/DIGITS","forks_url":"https://api.github.com/repos/NVIDIA/DIGITS/forks","keys_url":"https://api.github.com/repos/NVIDIA/DIGITS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NVIDIA/DIGITS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NVIDIA/DIGITS/teams","hooks_url":"https://api.github.com/repos/NVIDIA/DIGITS/hooks","issue_events_url":"https://api.github.com/repos/NVIDIA/DIGITS/issues/events{/number}","events_url":"https://api.github.com/repos/NVIDIA/DIGITS/events","assignees_url":"https://api.github.com/repos/NVIDIA/DIGITS/assignees{/user}","branches_url":"https://api.github.com/repos/NVIDIA/DIGITS/branches{/branch}","tags_url":"https://api.github.com/repos/NVIDIA/DIGITS/tags","blobs_url":"https://api.github.com/repos/NVIDIA/DIGITS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NVIDIA/DIGITS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NVIDIA/DIGITS/git/refs{/sha}","trees_url":"https://api.github.com/repos/NVIDIA/DIGITS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NVIDIA/DIGITS/statuses/{sha}","languages_url":"https://api.github.com/repos/NVIDIA/DIGITS/languages","stargazers_url":"https://api.github.com/repos/NVIDIA/DIGITS/stargazers","contributors_url":"https://api.github.com/repos/NVIDIA/DIGITS/contributors","subscribers_url":"https://api.github.com/repos/NVIDIA/DIGITS/subscribers","subscription_url":"https://api.github.com/repos/NVIDIA/DIGITS/subscription","commits_url":"https://api.github.com/repos/NVIDIA/DIGITS/commits{/sha}","git_commits_url":"https://api.github.com/repos/NVIDIA/DIGITS/git/commits{/sha}","comments_url":"https://api.github.com/repos/NVIDIA/DIGITS/comments{/number}","issue_comment_url":"https://api.github.com/repos/NVIDIA/DIGITS/issues/comments{/number}","contents_url":"https://api.github.com/repos/NVIDIA/DIGITS/contents/{+path}","compare_url":"https://api.github.com/repos/NVIDIA/DIGITS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NVIDIA/DIGITS/merges","archive_url":"https://api.github.com/repos/NVIDIA/DIGITS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NVIDIA/DIGITS/downloads","issues_url":"https://api.github.com/repos/NVIDIA/DIGITS/issues{/number}","pulls_url":"https://api.github.com/repos/NVIDIA/DIGITS/pulls{/number}","milestones_url":"https://api.github.com/repos/NVIDIA/DIGITS/milestones{/number}","notifications_url":"https://api.github.com/repos/NVIDIA/DIGITS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NVIDIA/DIGITS/labels{/name}","releases_url":"https://api.github.com/repos/NVIDIA/DIGITS/releases{/id}","deployments_url":"https://api.github.com/repos/NVIDIA/DIGITS/deployments","created_at":"2015-03-17T16:00:20Z","updated_at":"2016-05-22T17:06:40Z","pushed_at":"2016-05-22T20:20:30Z","git_url":"git://github.com/NVIDIA/DIGITS.git","ssh_url":"git@github.com:NVIDIA/DIGITS.git","clone_url":"https://github.com/NVIDIA/DIGITS.git","svn_url":"https://github.com/NVIDIA/DIGITS","homepage":"https://developer.nvidia.com/digits","size":14199,"stargazers_count":1152,"watchers_count":1152,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":337,"mirror_url":null,"open_issues_count":69,"forks":337,"open_issues":69,"watchers":1152,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NVIDIA/DIGITS/pulls/767"},"html":{"href":"https://github.com/NVIDIA/DIGITS/pull/767"},"issue":{"href":"https://api.github.com/repos/NVIDIA/DIGITS/issues/767"},"comments":{"href":"https://api.github.com/repos/NVIDIA/DIGITS/issues/767/comments"},"review_comments":{"href":"https://api.github.com/repos/NVIDIA/DIGITS/pulls/767/comments"},"review_comment":{"href":"https://api.github.com/repos/NVIDIA/DIGITS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NVIDIA/DIGITS/pulls/767/commits"},"statuses":{"href":"https://api.github.com/repos/NVIDIA/DIGITS/statuses/df05d19dc18129f637495cc2b807c80919f31980"}}}}
{"actor":{"display_login":"gheinrich"}}