{"action":"created","comment":{"url":"https://api.github.com/repos/PaddlePaddle/PARL/pulls/comments/189467666","pull_request_review_id":121652292,"id":189467666,"diff_hunk":"@@ -0,0 +1,187 @@\n+#   Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\n+import paddle.fluid as fluid\n+import parl.layers as layers\n+import numpy as np\n+\n+\n+class AlgorithmWrapper(object):\n+    \"\"\"\n+    AlgorithmWrapper is responsible for I/O between the Algorithm and multiple Robots.\n+    \"\"\"\n+    pass\n+\n+\n+class Algorithm(object):","path":"parl/framework/algorithm.py","position":27,"original_position":27,"commit_id":"89ebd99c0366432918bf9079d767efb54bf25e9e","original_commit_id":"89ebd99c0366432918bf9079d767efb54bf25e9e","user":{"login":"yu239","id":1783632,"avatar_url":"https://avatars1.githubusercontent.com/u/1783632?v=4","gravatar_id":"","url":"https://api.github.com/users/yu239","html_url":"https://github.com/yu239","followers_url":"https://api.github.com/users/yu239/followers","following_url":"https://api.github.com/users/yu239/following{/other_user}","gists_url":"https://api.github.com/users/yu239/gists{/gist_id}","starred_url":"https://api.github.com/users/yu239/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yu239/subscriptions","organizations_url":"https://api.github.com/users/yu239/orgs","repos_url":"https://api.github.com/users/yu239/repos","events_url":"https://api.github.com/users/yu239/events{/privacy}","received_events_url":"https://api.github.com/users/yu239/received_events","type":"User","site_admin":false},"body":"For different algorithms, according to the current implementation, the differences are only: 1) some hyperparameters of the optimizer (learning rate, learning algorithm, etc), and 2) the model object. Other than these two things, I believe all tasks can be represented by this general control flow of Algorithm so that the user can always use it without changes.","created_at":"2018-05-20T19:15:01Z","updated_at":"2018-05-20T19:15:02Z","html_url":"https://github.com/PaddlePaddle/PARL/pull/9#discussion_r189467666","pull_request_url":"https://api.github.com/repos/PaddlePaddle/PARL/pulls/9","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/PaddlePaddle/PARL/pulls/comments/189467666"},"html":{"href":"https://github.com/PaddlePaddle/PARL/pull/9#discussion_r189467666"},"pull_request":{"href":"https://api.github.com/repos/PaddlePaddle/PARL/pulls/9"}},"in_reply_to_id":189446345},"pull_request":{"url":"https://api.github.com/repos/PaddlePaddle/PARL/pulls/9","id":189169945,"html_url":"https://github.com/PaddlePaddle/PARL/pull/9","diff_url":"https://github.com/PaddlePaddle/PARL/pull/9.diff","patch_url":"https://github.com/PaddlePaddle/PARL/pull/9.patch","issue_url":"https://api.github.com/repos/PaddlePaddle/PARL/issues/9","number":9,"state":"open","locked":false,"title":"preliminary implementations of Algorithm and Model classes","user":{"login":"yu239","id":1783632,"avatar_url":"https://avatars1.githubusercontent.com/u/1783632?v=4","gravatar_id":"","url":"https://api.github.com/users/yu239","html_url":"https://github.com/yu239","followers_url":"https://api.github.com/users/yu239/followers","following_url":"https://api.github.com/users/yu239/following{/other_user}","gists_url":"https://api.github.com/users/yu239/gists{/gist_id}","starred_url":"https://api.github.com/users/yu239/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yu239/subscriptions","organizations_url":"https://api.github.com/users/yu239/orgs","repos_url":"https://api.github.com/users/yu239/repos","events_url":"https://api.github.com/users/yu239/events{/privacy}","received_events_url":"https://api.github.com/users/yu239/received_events","type":"User","site_admin":false},"body":"I will add test cases for Algorithm learn() later","created_at":"2018-05-19T04:17:25Z","updated_at":"2018-05-20T19:15:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"12cc155251902be648d2d08fd31c2aab4b8d9ebd","assignee":null,"assignees":[],"requested_reviewers":[{"login":"skylian","id":4616086,"avatar_url":"https://avatars3.githubusercontent.com/u/4616086?v=4","gravatar_id":"","url":"https://api.github.com/users/skylian","html_url":"https://github.com/skylian","followers_url":"https://api.github.com/users/skylian/followers","following_url":"https://api.github.com/users/skylian/following{/other_user}","gists_url":"https://api.github.com/users/skylian/gists{/gist_id}","starred_url":"https://api.github.com/users/skylian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skylian/subscriptions","organizations_url":"https://api.github.com/users/skylian/orgs","repos_url":"https://api.github.com/users/skylian/repos","events_url":"https://api.github.com/users/skylian/events{/privacy}","received_events_url":"https://api.github.com/users/skylian/received_events","type":"User","site_admin":false},{"login":"Haichao-Zhang","id":21375027,"avatar_url":"https://avatars2.githubusercontent.com/u/21375027?v=4","gravatar_id":"","url":"https://api.github.com/users/Haichao-Zhang","html_url":"https://github.com/Haichao-Zhang","followers_url":"https://api.github.com/users/Haichao-Zhang/followers","following_url":"https://api.github.com/users/Haichao-Zhang/following{/other_user}","gists_url":"https://api.github.com/users/Haichao-Zhang/gists{/gist_id}","starred_url":"https://api.github.com/users/Haichao-Zhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haichao-Zhang/subscriptions","organizations_url":"https://api.github.com/users/Haichao-Zhang/orgs","repos_url":"https://api.github.com/users/Haichao-Zhang/repos","events_url":"https://api.github.com/users/Haichao-Zhang/events{/privacy}","received_events_url":"https://api.github.com/users/Haichao-Zhang/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PaddlePaddle/PARL/pulls/9/commits","review_comments_url":"https://api.github.com/repos/PaddlePaddle/PARL/pulls/9/comments","review_comment_url":"https://api.github.com/repos/PaddlePaddle/PARL/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PaddlePaddle/PARL/issues/9/comments","statuses_url":"https://api.github.com/repos/PaddlePaddle/PARL/statuses/89ebd99c0366432918bf9079d767efb54bf25e9e","head":{"label":"yu239:develop","ref":"develop","sha":"89ebd99c0366432918bf9079d767efb54bf25e9e","user":{"login":"yu239","id":1783632,"avatar_url":"https://avatars1.githubusercontent.com/u/1783632?v=4","gravatar_id":"","url":"https://api.github.com/users/yu239","html_url":"https://github.com/yu239","followers_url":"https://api.github.com/users/yu239/followers","following_url":"https://api.github.com/users/yu239/following{/other_user}","gists_url":"https://api.github.com/users/yu239/gists{/gist_id}","starred_url":"https://api.github.com/users/yu239/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yu239/subscriptions","organizations_url":"https://api.github.com/users/yu239/orgs","repos_url":"https://api.github.com/users/yu239/repos","events_url":"https://api.github.com/users/yu239/events{/privacy}","received_events_url":"https://api.github.com/users/yu239/received_events","type":"User","site_admin":false},"repo":{"id":132029583,"name":"RL","full_name":"yu239/RL","owner":{"login":"yu239","id":1783632,"avatar_url":"https://avatars1.githubusercontent.com/u/1783632?v=4","gravatar_id":"","url":"https://api.github.com/users/yu239","html_url":"https://github.com/yu239","followers_url":"https://api.github.com/users/yu239/followers","following_url":"https://api.github.com/users/yu239/following{/other_user}","gists_url":"https://api.github.com/users/yu239/gists{/gist_id}","starred_url":"https://api.github.com/users/yu239/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yu239/subscriptions","organizations_url":"https://api.github.com/users/yu239/orgs","repos_url":"https://api.github.com/users/yu239/repos","events_url":"https://api.github.com/users/yu239/events{/privacy}","received_events_url":"https://api.github.com/users/yu239/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yu239/RL","description":"Reinforcement learning framework","fork":true,"url":"https://api.github.com/repos/yu239/RL","forks_url":"https://api.github.com/repos/yu239/RL/forks","keys_url":"https://api.github.com/repos/yu239/RL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yu239/RL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yu239/RL/teams","hooks_url":"https://api.github.com/repos/yu239/RL/hooks","issue_events_url":"https://api.github.com/repos/yu239/RL/issues/events{/number}","events_url":"https://api.github.com/repos/yu239/RL/events","assignees_url":"https://api.github.com/repos/yu239/RL/assignees{/user}","branches_url":"https://api.github.com/repos/yu239/RL/branches{/branch}","tags_url":"https://api.github.com/repos/yu239/RL/tags","blobs_url":"https://api.github.com/repos/yu239/RL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yu239/RL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yu239/RL/git/refs{/sha}","trees_url":"https://api.github.com/repos/yu239/RL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yu239/RL/statuses/{sha}","languages_url":"https://api.github.com/repos/yu239/RL/languages","stargazers_url":"https://api.github.com/repos/yu239/RL/stargazers","contributors_url":"https://api.github.com/repos/yu239/RL/contributors","subscribers_url":"https://api.github.com/repos/yu239/RL/subscribers","subscription_url":"https://api.github.com/repos/yu239/RL/subscription","commits_url":"https://api.github.com/repos/yu239/RL/commits{/sha}","git_commits_url":"https://api.github.com/repos/yu239/RL/git/commits{/sha}","comments_url":"https://api.github.com/repos/yu239/RL/comments{/number}","issue_comment_url":"https://api.github.com/repos/yu239/RL/issues/comments{/number}","contents_url":"https://api.github.com/repos/yu239/RL/contents/{+path}","compare_url":"https://api.github.com/repos/yu239/RL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yu239/RL/merges","archive_url":"https://api.github.com/repos/yu239/RL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yu239/RL/downloads","issues_url":"https://api.github.com/repos/yu239/RL/issues{/number}","pulls_url":"https://api.github.com/repos/yu239/RL/pulls{/number}","milestones_url":"https://api.github.com/repos/yu239/RL/milestones{/number}","notifications_url":"https://api.github.com/repos/yu239/RL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yu239/RL/labels{/name}","releases_url":"https://api.github.com/repos/yu239/RL/releases{/id}","deployments_url":"https://api.github.com/repos/yu239/RL/deployments","created_at":"2018-05-03T17:39:30Z","updated_at":"2018-05-19T04:16:28Z","pushed_at":"2018-05-19T04:16:27Z","git_url":"git://github.com/yu239/RL.git","ssh_url":"git@github.com:yu239/RL.git","clone_url":"https://github.com/yu239/RL.git","svn_url":"https://github.com/yu239/RL","homepage":null,"size":25,"stargazers_count":0,"watchers_count":0,"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":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"PaddlePaddle:develop","ref":"develop","sha":"e60103f50ba7e5c26a9eae833b1499e9f88105a5","user":{"login":"PaddlePaddle","id":23534030,"avatar_url":"https://avatars3.githubusercontent.com/u/23534030?v=4","gravatar_id":"","url":"https://api.github.com/users/PaddlePaddle","html_url":"https://github.com/PaddlePaddle","followers_url":"https://api.github.com/users/PaddlePaddle/followers","following_url":"https://api.github.com/users/PaddlePaddle/following{/other_user}","gists_url":"https://api.github.com/users/PaddlePaddle/gists{/gist_id}","starred_url":"https://api.github.com/users/PaddlePaddle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaddlePaddle/subscriptions","organizations_url":"https://api.github.com/users/PaddlePaddle/orgs","repos_url":"https://api.github.com/users/PaddlePaddle/repos","events_url":"https://api.github.com/users/PaddlePaddle/events{/privacy}","received_events_url":"https://api.github.com/users/PaddlePaddle/received_events","type":"Organization","site_admin":false},"repo":{"id":131044128,"name":"PARL","full_name":"PaddlePaddle/PARL","owner":{"login":"PaddlePaddle","id":23534030,"avatar_url":"https://avatars3.githubusercontent.com/u/23534030?v=4","gravatar_id":"","url":"https://api.github.com/users/PaddlePaddle","html_url":"https://github.com/PaddlePaddle","followers_url":"https://api.github.com/users/PaddlePaddle/followers","following_url":"https://api.github.com/users/PaddlePaddle/following{/other_user}","gists_url":"https://api.github.com/users/PaddlePaddle/gists{/gist_id}","starred_url":"https://api.github.com/users/PaddlePaddle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaddlePaddle/subscriptions","organizations_url":"https://api.github.com/users/PaddlePaddle/orgs","repos_url":"https://api.github.com/users/PaddlePaddle/repos","events_url":"https://api.github.com/users/PaddlePaddle/events{/privacy}","received_events_url":"https://api.github.com/users/PaddlePaddle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PaddlePaddle/PARL","description":"Reinforcement learning framework","fork":false,"url":"https://api.github.com/repos/PaddlePaddle/PARL","forks_url":"https://api.github.com/repos/PaddlePaddle/PARL/forks","keys_url":"https://api.github.com/repos/PaddlePaddle/PARL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PaddlePaddle/PARL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PaddlePaddle/PARL/teams","hooks_url":"https://api.github.com/repos/PaddlePaddle/PARL/hooks","issue_events_url":"https://api.github.com/repos/PaddlePaddle/PARL/issues/events{/number}","events_url":"https://api.github.com/repos/PaddlePaddle/PARL/events","assignees_url":"https://api.github.com/repos/PaddlePaddle/PARL/assignees{/user}","branches_url":"https://api.github.com/repos/PaddlePaddle/PARL/branches{/branch}","tags_url":"https://api.github.com/repos/PaddlePaddle/PARL/tags","blobs_url":"https://api.github.com/repos/PaddlePaddle/PARL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PaddlePaddle/PARL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PaddlePaddle/PARL/git/refs{/sha}","trees_url":"https://api.github.com/repos/PaddlePaddle/PARL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PaddlePaddle/PARL/statuses/{sha}","languages_url":"https://api.github.com/repos/PaddlePaddle/PARL/languages","stargazers_url":"https://api.github.com/repos/PaddlePaddle/PARL/stargazers","contributors_url":"https://api.github.com/repos/PaddlePaddle/PARL/contributors","subscribers_url":"https://api.github.com/repos/PaddlePaddle/PARL/subscribers","subscription_url":"https://api.github.com/repos/PaddlePaddle/PARL/subscription","commits_url":"https://api.github.com/repos/PaddlePaddle/PARL/commits{/sha}","git_commits_url":"https://api.github.com/repos/PaddlePaddle/PARL/git/commits{/sha}","comments_url":"https://api.github.com/repos/PaddlePaddle/PARL/comments{/number}","issue_comment_url":"https://api.github.com/repos/PaddlePaddle/PARL/issues/comments{/number}","contents_url":"https://api.github.com/repos/PaddlePaddle/PARL/contents/{+path}","compare_url":"https://api.github.com/repos/PaddlePaddle/PARL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PaddlePaddle/PARL/merges","archive_url":"https://api.github.com/repos/PaddlePaddle/PARL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PaddlePaddle/PARL/downloads","issues_url":"https://api.github.com/repos/PaddlePaddle/PARL/issues{/number}","pulls_url":"https://api.github.com/repos/PaddlePaddle/PARL/pulls{/number}","milestones_url":"https://api.github.com/repos/PaddlePaddle/PARL/milestones{/number}","notifications_url":"https://api.github.com/repos/PaddlePaddle/PARL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PaddlePaddle/PARL/labels{/name}","releases_url":"https://api.github.com/repos/PaddlePaddle/PARL/releases{/id}","deployments_url":"https://api.github.com/repos/PaddlePaddle/PARL/deployments","created_at":"2018-04-25T17:54:22Z","updated_at":"2018-05-18T07:52:21Z","pushed_at":"2018-05-20T07:01:33Z","git_url":"git://github.com/PaddlePaddle/PARL.git","ssh_url":"git@github.com:PaddlePaddle/PARL.git","clone_url":"https://github.com/PaddlePaddle/PARL.git","svn_url":"https://github.com/PaddlePaddle/PARL","homepage":null,"size":19,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":4,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/PaddlePaddle/PARL/pulls/9"},"html":{"href":"https://github.com/PaddlePaddle/PARL/pull/9"},"issue":{"href":"https://api.github.com/repos/PaddlePaddle/PARL/issues/9"},"comments":{"href":"https://api.github.com/repos/PaddlePaddle/PARL/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/PaddlePaddle/PARL/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/PaddlePaddle/PARL/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PaddlePaddle/PARL/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/PaddlePaddle/PARL/statuses/89ebd99c0366432918bf9079d767efb54bf25e9e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"yu239"}}