{"action":"created","comment":{"url":"https://api.github.com/repos/mila-udem/orion/pulls/comments/193104333","pull_request_review_id":126009703,"id":193104333,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzEwNDMzMw==","diff_hunk":"@@ -219,13 +219,16 @@ def register_trials(self, trials):\n \n         :type trials: list of `Trial`\n         \"\"\"\n-        stamp = datetime.datetime.utcnow()\n-        for trial in trials:\n-            trial.experiment = self._id\n-            trial.status = 'new'\n-            trial.submit_time = stamp\n-        trials_dicts = list(map(lambda x: x.to_dict(), trials))\n-        self._db.write('trials', trials_dicts)\n+        try:\n+            stamp = datetime.datetime.utcnow()\n+            for trial in trials:\n+                trial.experiment = self._id\n+                trial.status = 'new'\n+                trial.submit_time = stamp\n+            trials_dicts = list(map(lambda x: x.to_dict(), trials))\n+            self._db.write('trials', trials_dicts)\n+        except DuplicateKeyError:\n+            pass","path":"src/orion/core/worker/experiment.py","position":29,"original_position":29,"commit_id":"aa2491d5a4bdeef8712f05a30a258a27958423cc","original_commit_id":"aa2491d5a4bdeef8712f05a30a258a27958423cc","user":{"login":"bouthilx","id":2099418,"node_id":"MDQ6VXNlcjIwOTk0MTg=","avatar_url":"https://avatars1.githubusercontent.com/u/2099418?v=4","gravatar_id":"","url":"https://api.github.com/users/bouthilx","html_url":"https://github.com/bouthilx","followers_url":"https://api.github.com/users/bouthilx/followers","following_url":"https://api.github.com/users/bouthilx/following{/other_user}","gists_url":"https://api.github.com/users/bouthilx/gists{/gist_id}","starred_url":"https://api.github.com/users/bouthilx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bouthilx/subscriptions","organizations_url":"https://api.github.com/users/bouthilx/orgs","repos_url":"https://api.github.com/users/bouthilx/repos","events_url":"https://api.github.com/users/bouthilx/events{/privacy}","received_events_url":"https://api.github.com/users/bouthilx/received_events","type":"User","site_admin":false},"body":"@tsirif @DatCorno I was thinking about this and the particular issue here is really related to non-blocking algo sampling design. I propose we leave this methods as-is in this PR, maybe with a clear TODO comment like \"This method should be refactored to accept one trial at a time only, and return true or false if trial was registered properly or not\". The PR fixing this should be done before end of this week.","created_at":"2018-06-05T14:55:05Z","updated_at":"2018-06-05T14:55:06Z","html_url":"https://github.com/mila-udem/orion/pull/103#discussion_r193104333","pull_request_url":"https://api.github.com/repos/mila-udem/orion/pulls/103","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mila-udem/orion/pulls/comments/193104333"},"html":{"href":"https://github.com/mila-udem/orion/pull/103#discussion_r193104333"},"pull_request":{"href":"https://api.github.com/repos/mila-udem/orion/pulls/103"}},"in_reply_to_id":192897779},"pull_request":{"url":"https://api.github.com/repos/mila-udem/orion/pulls/103","id":192517122,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNTE3MTIy","html_url":"https://github.com/mila-udem/orion/pull/103","diff_url":"https://github.com/mila-udem/orion/pull/103.diff","patch_url":"https://github.com/mila-udem/orion/pull/103.patch","issue_url":"https://api.github.com/repos/mila-udem/orion/issues/103","number":103,"state":"open","locked":false,"title":"Feature/trial hash","user":{"login":"DatCorno","id":5266024,"node_id":"MDQ6VXNlcjUyNjYwMjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5266024?v=4","gravatar_id":"","url":"https://api.github.com/users/DatCorno","html_url":"https://github.com/DatCorno","followers_url":"https://api.github.com/users/DatCorno/followers","following_url":"https://api.github.com/users/DatCorno/following{/other_user}","gists_url":"https://api.github.com/users/DatCorno/gists{/gist_id}","starred_url":"https://api.github.com/users/DatCorno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DatCorno/subscriptions","organizations_url":"https://api.github.com/users/DatCorno/orgs","repos_url":"https://api.github.com/users/DatCorno/repos","events_url":"https://api.github.com/users/DatCorno/events{/privacy}","received_events_url":"https://api.github.com/users/DatCorno/received_events","type":"User","site_admin":false},"body":"Change trials id to hashes of their params and their experiment id","created_at":"2018-06-04T20:20:35Z","updated_at":"2018-06-05T14:55:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"035e83d47f34b5370c3b8e210cfe1f48e52e89f5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mila-udem/orion/pulls/103/commits","review_comments_url":"https://api.github.com/repos/mila-udem/orion/pulls/103/comments","review_comment_url":"https://api.github.com/repos/mila-udem/orion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mila-udem/orion/issues/103/comments","statuses_url":"https://api.github.com/repos/mila-udem/orion/statuses/aa2491d5a4bdeef8712f05a30a258a27958423cc","head":{"label":"DatCorno:feature/trial_hash","ref":"feature/trial_hash","sha":"aa2491d5a4bdeef8712f05a30a258a27958423cc","user":{"login":"DatCorno","id":5266024,"node_id":"MDQ6VXNlcjUyNjYwMjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5266024?v=4","gravatar_id":"","url":"https://api.github.com/users/DatCorno","html_url":"https://github.com/DatCorno","followers_url":"https://api.github.com/users/DatCorno/followers","following_url":"https://api.github.com/users/DatCorno/following{/other_user}","gists_url":"https://api.github.com/users/DatCorno/gists{/gist_id}","starred_url":"https://api.github.com/users/DatCorno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DatCorno/subscriptions","organizations_url":"https://api.github.com/users/DatCorno/orgs","repos_url":"https://api.github.com/users/DatCorno/repos","events_url":"https://api.github.com/users/DatCorno/events{/privacy}","received_events_url":"https://api.github.com/users/DatCorno/received_events","type":"User","site_admin":false},"repo":{"id":130746163,"node_id":"MDEwOlJlcG9zaXRvcnkxMzA3NDYxNjM=","name":"orion","full_name":"DatCorno/orion","owner":{"login":"DatCorno","id":5266024,"node_id":"MDQ6VXNlcjUyNjYwMjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5266024?v=4","gravatar_id":"","url":"https://api.github.com/users/DatCorno","html_url":"https://github.com/DatCorno","followers_url":"https://api.github.com/users/DatCorno/followers","following_url":"https://api.github.com/users/DatCorno/following{/other_user}","gists_url":"https://api.github.com/users/DatCorno/gists{/gist_id}","starred_url":"https://api.github.com/users/DatCorno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DatCorno/subscriptions","organizations_url":"https://api.github.com/users/DatCorno/orgs","repos_url":"https://api.github.com/users/DatCorno/repos","events_url":"https://api.github.com/users/DatCorno/events{/privacy}","received_events_url":"https://api.github.com/users/DatCorno/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DatCorno/orion","description":"Asynchronous Distributed Hyperparameter Optimization for Deep Neural Networks. Previously known as hyperopt or metaopt.","fork":true,"url":"https://api.github.com/repos/DatCorno/orion","forks_url":"https://api.github.com/repos/DatCorno/orion/forks","keys_url":"https://api.github.com/repos/DatCorno/orion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DatCorno/orion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DatCorno/orion/teams","hooks_url":"https://api.github.com/repos/DatCorno/orion/hooks","issue_events_url":"https://api.github.com/repos/DatCorno/orion/issues/events{/number}","events_url":"https://api.github.com/repos/DatCorno/orion/events","assignees_url":"https://api.github.com/repos/DatCorno/orion/assignees{/user}","branches_url":"https://api.github.com/repos/DatCorno/orion/branches{/branch}","tags_url":"https://api.github.com/repos/DatCorno/orion/tags","blobs_url":"https://api.github.com/repos/DatCorno/orion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DatCorno/orion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DatCorno/orion/git/refs{/sha}","trees_url":"https://api.github.com/repos/DatCorno/orion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DatCorno/orion/statuses/{sha}","languages_url":"https://api.github.com/repos/DatCorno/orion/languages","stargazers_url":"https://api.github.com/repos/DatCorno/orion/stargazers","contributors_url":"https://api.github.com/repos/DatCorno/orion/contributors","subscribers_url":"https://api.github.com/repos/DatCorno/orion/subscribers","subscription_url":"https://api.github.com/repos/DatCorno/orion/subscription","commits_url":"https://api.github.com/repos/DatCorno/orion/commits{/sha}","git_commits_url":"https://api.github.com/repos/DatCorno/orion/git/commits{/sha}","comments_url":"https://api.github.com/repos/DatCorno/orion/comments{/number}","issue_comment_url":"https://api.github.com/repos/DatCorno/orion/issues/comments{/number}","contents_url":"https://api.github.com/repos/DatCorno/orion/contents/{+path}","compare_url":"https://api.github.com/repos/DatCorno/orion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DatCorno/orion/merges","archive_url":"https://api.github.com/repos/DatCorno/orion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DatCorno/orion/downloads","issues_url":"https://api.github.com/repos/DatCorno/orion/issues{/number}","pulls_url":"https://api.github.com/repos/DatCorno/orion/pulls{/number}","milestones_url":"https://api.github.com/repos/DatCorno/orion/milestones{/number}","notifications_url":"https://api.github.com/repos/DatCorno/orion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DatCorno/orion/labels{/name}","releases_url":"https://api.github.com/repos/DatCorno/orion/releases{/id}","deployments_url":"https://api.github.com/repos/DatCorno/orion/deployments","created_at":"2018-04-23T19:28:04Z","updated_at":"2018-04-27T23:19:08Z","pushed_at":"2018-06-04T20:18:55Z","git_url":"git://github.com/DatCorno/orion.git","ssh_url":"git@github.com:DatCorno/orion.git","clone_url":"https://github.com/DatCorno/orion.git","svn_url":"https://github.com/DatCorno/orion","homepage":"","size":610,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"mila-udem:develop","ref":"develop","sha":"2fdc7b351d09b5eb42775ad27bee4e70771968b2","user":{"login":"mila-udem","id":11724251,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzI0MjUx","avatar_url":"https://avatars0.githubusercontent.com/u/11724251?v=4","gravatar_id":"","url":"https://api.github.com/users/mila-udem","html_url":"https://github.com/mila-udem","followers_url":"https://api.github.com/users/mila-udem/followers","following_url":"https://api.github.com/users/mila-udem/following{/other_user}","gists_url":"https://api.github.com/users/mila-udem/gists{/gist_id}","starred_url":"https://api.github.com/users/mila-udem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mila-udem/subscriptions","organizations_url":"https://api.github.com/users/mila-udem/orgs","repos_url":"https://api.github.com/users/mila-udem/repos","events_url":"https://api.github.com/users/mila-udem/events{/privacy}","received_events_url":"https://api.github.com/users/mila-udem/received_events","type":"Organization","site_admin":false},"repo":{"id":102697867,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI2OTc4Njc=","name":"orion","full_name":"mila-udem/orion","owner":{"login":"mila-udem","id":11724251,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzI0MjUx","avatar_url":"https://avatars0.githubusercontent.com/u/11724251?v=4","gravatar_id":"","url":"https://api.github.com/users/mila-udem","html_url":"https://github.com/mila-udem","followers_url":"https://api.github.com/users/mila-udem/followers","following_url":"https://api.github.com/users/mila-udem/following{/other_user}","gists_url":"https://api.github.com/users/mila-udem/gists{/gist_id}","starred_url":"https://api.github.com/users/mila-udem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mila-udem/subscriptions","organizations_url":"https://api.github.com/users/mila-udem/orgs","repos_url":"https://api.github.com/users/mila-udem/repos","events_url":"https://api.github.com/users/mila-udem/events{/privacy}","received_events_url":"https://api.github.com/users/mila-udem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mila-udem/orion","description":"Asynchronous Distributed Hyperparameter Optimization for Deep Neural Networks. Previously known as hyperopt or metaopt.","fork":false,"url":"https://api.github.com/repos/mila-udem/orion","forks_url":"https://api.github.com/repos/mila-udem/orion/forks","keys_url":"https://api.github.com/repos/mila-udem/orion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mila-udem/orion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mila-udem/orion/teams","hooks_url":"https://api.github.com/repos/mila-udem/orion/hooks","issue_events_url":"https://api.github.com/repos/mila-udem/orion/issues/events{/number}","events_url":"https://api.github.com/repos/mila-udem/orion/events","assignees_url":"https://api.github.com/repos/mila-udem/orion/assignees{/user}","branches_url":"https://api.github.com/repos/mila-udem/orion/branches{/branch}","tags_url":"https://api.github.com/repos/mila-udem/orion/tags","blobs_url":"https://api.github.com/repos/mila-udem/orion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mila-udem/orion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mila-udem/orion/git/refs{/sha}","trees_url":"https://api.github.com/repos/mila-udem/orion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mila-udem/orion/statuses/{sha}","languages_url":"https://api.github.com/repos/mila-udem/orion/languages","stargazers_url":"https://api.github.com/repos/mila-udem/orion/stargazers","contributors_url":"https://api.github.com/repos/mila-udem/orion/contributors","subscribers_url":"https://api.github.com/repos/mila-udem/orion/subscribers","subscription_url":"https://api.github.com/repos/mila-udem/orion/subscription","commits_url":"https://api.github.com/repos/mila-udem/orion/commits{/sha}","git_commits_url":"https://api.github.com/repos/mila-udem/orion/git/commits{/sha}","comments_url":"https://api.github.com/repos/mila-udem/orion/comments{/number}","issue_comment_url":"https://api.github.com/repos/mila-udem/orion/issues/comments{/number}","contents_url":"https://api.github.com/repos/mila-udem/orion/contents/{+path}","compare_url":"https://api.github.com/repos/mila-udem/orion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mila-udem/orion/merges","archive_url":"https://api.github.com/repos/mila-udem/orion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mila-udem/orion/downloads","issues_url":"https://api.github.com/repos/mila-udem/orion/issues{/number}","pulls_url":"https://api.github.com/repos/mila-udem/orion/pulls{/number}","milestones_url":"https://api.github.com/repos/mila-udem/orion/milestones{/number}","notifications_url":"https://api.github.com/repos/mila-udem/orion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mila-udem/orion/labels{/name}","releases_url":"https://api.github.com/repos/mila-udem/orion/releases{/id}","deployments_url":"https://api.github.com/repos/mila-udem/orion/deployments","created_at":"2017-09-07T06:05:21Z","updated_at":"2018-06-04T21:42:01Z","pushed_at":"2018-06-04T21:47:02Z","git_url":"git://github.com/mila-udem/orion.git","ssh_url":"git@github.com:mila-udem/orion.git","clone_url":"https://github.com/mila-udem/orion.git","svn_url":"https://github.com/mila-udem/orion","homepage":"","size":499,"stargazers_count":40,"watchers_count":40,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":38,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":6,"open_issues":38,"watchers":40,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/mila-udem/orion/pulls/103"},"html":{"href":"https://github.com/mila-udem/orion/pull/103"},"issue":{"href":"https://api.github.com/repos/mila-udem/orion/issues/103"},"comments":{"href":"https://api.github.com/repos/mila-udem/orion/issues/103/comments"},"review_comments":{"href":"https://api.github.com/repos/mila-udem/orion/pulls/103/comments"},"review_comment":{"href":"https://api.github.com/repos/mila-udem/orion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mila-udem/orion/pulls/103/commits"},"statuses":{"href":"https://api.github.com/repos/mila-udem/orion/statuses/aa2491d5a4bdeef8712f05a30a258a27958423cc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bouthilx"}}