{"action":"created","comment":{"url":"https://api.github.com/repos/prodo-ai/plz/pulls/comments/231418842","pull_request_review_id":172383723,"id":231418842,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTQxODg0Mg==","diff_hunk":"@@ -310,40 +348,113 @@ aws ec2 describe-instances --region eu-west-1\n ./start_aws_controller\n ```\n \n-## Example\n+## Examples\n \n-In the directory `plz/examples/python` there is a minimal example showing\n-how to do input and output with `plz`. You can also see the directory\n-`plz/tests/end-to-end` for examples on how to use parameters and measures,\n-which this documentation doesn't cover yet.\n-\n-*Note: if you want to run the example using the AWS instances, be aware that\n+*Note: if you want to run the examples using the AWS instances, be aware that\n this has a cost. You can change the value of\n `\"max_bid_price_in_dollars_per_hour\": N` in `plz.config.json` to any value\n-you like. The example takes around 5 minutes to run.\n-The value in the provided file is 0.5 dollars/hour. See the following note as\n-well.*\n+you like. Examples takes around 5 minutes to run.\n+The value in the provided configs range from 0.5 dollars/hour to 2 dollars/hour\n+(for GPU-powered machines). See the following note as well.*\n \n *Note: unless you add `\"instance_max_uptime_in_minutes\": null,` to your\n-`plz.config.json`, the instance terminates after 60 minutes.  That's on\n-purpose, in case you're just trying the tool and something doesn't go well\n-(like, there's a power cut). You can always use `plz list` and `plz kill`\n-before leaving your computer, as to make sure that there no instances remaining.\n-For maximum assurance, you can check your instances in the AWS console.*\n+`plz.config.json`, all AWS instances you start terminate after 60 minutes.\n+That's on purpose, in case you're just trying the tool and something doesn't\n+go well (like, there's a power cut). You can always use `plz list` and\n+`plz kill` before leaving your computer, as to make sure that there no\n+instances remaining. For maximum assurance, you can check your instances in\n+the AWS console.*\n+\n+\n+### Pytorch\n+\n+In the directory `plz/examples/pytorch` there's a full-fledged example that\n+shows how to do the classical training for character recognition using\n+LeNets, using a subset of the well-known MNIST dataset. There's a simple\n+example using only python, described in the section below.\n+\n+Anything related to `plz` is in `main.py`. In fact the most relevant lines\n+are the following ones:\n+\n+```\n+def get_from_plz_config(key: str, non_plz_value: T) -> T:\n+    configuration_file = os.environ.get('CONFIGURATION_FILE', None)\n+    if configuration_file is not None:\n+        with open(configuration_file) as c:\n+            config = json.load(c)\n+        return config[key]\n+    else:\n+        return non_plz_value\n+[...]\n+    input_directory = get_from_plz_config(\n+        'input_directory', os.path.join('..', 'data'))\n+    output_directory = get_from_plz_config('output_directory', 'models')\n+    parameters = get_from_plz_config('parameters', DEFAULT_PARAMETERS)\n+    measures_directory = get_from_plz_config('measures_directory', 'measures')\n+    summary_measures_path = get_from_plz_config(\n+        'summary_measures_path',\n+        os.path.join('measures', 'summary'))","path":"README.md","position":292,"original_position":292,"commit_id":"917ea5a637413a91331248e3997d0d1a0583cdd0","original_commit_id":"917ea5a637413a91331248e3997d0d1a0583cdd0","user":{"login":"kprimerakis","id":42539119,"node_id":"MDQ6VXNlcjQyNTM5MTE5","avatar_url":"https://avatars0.githubusercontent.com/u/42539119?v=4","gravatar_id":"","url":"https://api.github.com/users/kprimerakis","html_url":"https://github.com/kprimerakis","followers_url":"https://api.github.com/users/kprimerakis/followers","following_url":"https://api.github.com/users/kprimerakis/following{/other_user}","gists_url":"https://api.github.com/users/kprimerakis/gists{/gist_id}","starred_url":"https://api.github.com/users/kprimerakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kprimerakis/subscriptions","organizations_url":"https://api.github.com/users/kprimerakis/orgs","repos_url":"https://api.github.com/users/kprimerakis/repos","events_url":"https://api.github.com/users/kprimerakis/events{/privacy}","received_events_url":"https://api.github.com/users/kprimerakis/received_events","type":"User","site_admin":false},"body":"Not that it matters for the purposes of this, but at this point you have read the poor file 5 times.","created_at":"2018-11-07T08:41:55Z","updated_at":"2018-11-07T08:59:33Z","html_url":"https://github.com/prodo-ai/plz/pull/197#discussion_r231418842","pull_request_url":"https://api.github.com/repos/prodo-ai/plz/pulls/197","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/prodo-ai/plz/pulls/comments/231418842"},"html":{"href":"https://github.com/prodo-ai/plz/pull/197#discussion_r231418842"},"pull_request":{"href":"https://api.github.com/repos/prodo-ai/plz/pulls/197"}}},"pull_request":{"url":"https://api.github.com/repos/prodo-ai/plz/pulls/197","id":228762001,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NzYyMDAx","html_url":"https://github.com/prodo-ai/plz/pull/197","diff_url":"https://github.com/prodo-ai/plz/pull/197.diff","patch_url":"https://github.com/prodo-ai/plz/pull/197.patch","issue_url":"https://api.github.com/repos/prodo-ai/plz/issues/197","number":197,"state":"open","locked":false,"title":"Add pytorch example and several improvements to README","user":{"login":"sergiogiro","id":4258800,"node_id":"MDQ6VXNlcjQyNTg4MDA=","avatar_url":"https://avatars1.githubusercontent.com/u/4258800?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiogiro","html_url":"https://github.com/sergiogiro","followers_url":"https://api.github.com/users/sergiogiro/followers","following_url":"https://api.github.com/users/sergiogiro/following{/other_user}","gists_url":"https://api.github.com/users/sergiogiro/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiogiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiogiro/subscriptions","organizations_url":"https://api.github.com/users/sergiogiro/orgs","repos_url":"https://api.github.com/users/sergiogiro/repos","events_url":"https://api.github.com/users/sergiogiro/events{/privacy}","received_events_url":"https://api.github.com/users/sergiogiro/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-06T16:51:59Z","updated_at":"2018-11-07T08:59:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41d013c020fc512c5eccbe7cead6633dc479c749","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/prodo-ai/plz/pulls/197/commits","review_comments_url":"https://api.github.com/repos/prodo-ai/plz/pulls/197/comments","review_comment_url":"https://api.github.com/repos/prodo-ai/plz/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prodo-ai/plz/issues/197/comments","statuses_url":"https://api.github.com/repos/prodo-ai/plz/statuses/917ea5a637413a91331248e3997d0d1a0583cdd0","head":{"label":"prodo-ai:improve-readme","ref":"improve-readme","sha":"917ea5a637413a91331248e3997d0d1a0583cdd0","user":{"login":"prodo-ai","id":20758341,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNzU4MzQx","avatar_url":"https://avatars3.githubusercontent.com/u/20758341?v=4","gravatar_id":"","url":"https://api.github.com/users/prodo-ai","html_url":"https://github.com/prodo-ai","followers_url":"https://api.github.com/users/prodo-ai/followers","following_url":"https://api.github.com/users/prodo-ai/following{/other_user}","gists_url":"https://api.github.com/users/prodo-ai/gists{/gist_id}","starred_url":"https://api.github.com/users/prodo-ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prodo-ai/subscriptions","organizations_url":"https://api.github.com/users/prodo-ai/orgs","repos_url":"https://api.github.com/users/prodo-ai/repos","events_url":"https://api.github.com/users/prodo-ai/events{/privacy}","received_events_url":"https://api.github.com/users/prodo-ai/received_events","type":"Organization","site_admin":false},"repo":{"id":117868411,"node_id":"MDEwOlJlcG9zaXRvcnkxMTc4Njg0MTE=","name":"plz","full_name":"prodo-ai/plz","private":false,"owner":{"login":"prodo-ai","id":20758341,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNzU4MzQx","avatar_url":"https://avatars3.githubusercontent.com/u/20758341?v=4","gravatar_id":"","url":"https://api.github.com/users/prodo-ai","html_url":"https://github.com/prodo-ai","followers_url":"https://api.github.com/users/prodo-ai/followers","following_url":"https://api.github.com/users/prodo-ai/following{/other_user}","gists_url":"https://api.github.com/users/prodo-ai/gists{/gist_id}","starred_url":"https://api.github.com/users/prodo-ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prodo-ai/subscriptions","organizations_url":"https://api.github.com/users/prodo-ai/orgs","repos_url":"https://api.github.com/users/prodo-ai/repos","events_url":"https://api.github.com/users/prodo-ai/events{/privacy}","received_events_url":"https://api.github.com/users/prodo-ai/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/prodo-ai/plz","description":"Say the magic word 😸","fork":false,"url":"https://api.github.com/repos/prodo-ai/plz","forks_url":"https://api.github.com/repos/prodo-ai/plz/forks","keys_url":"https://api.github.com/repos/prodo-ai/plz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prodo-ai/plz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prodo-ai/plz/teams","hooks_url":"https://api.github.com/repos/prodo-ai/plz/hooks","issue_events_url":"https://api.github.com/repos/prodo-ai/plz/issues/events{/number}","events_url":"https://api.github.com/repos/prodo-ai/plz/events","assignees_url":"https://api.github.com/repos/prodo-ai/plz/assignees{/user}","branches_url":"https://api.github.com/repos/prodo-ai/plz/branches{/branch}","tags_url":"https://api.github.com/repos/prodo-ai/plz/tags","blobs_url":"https://api.github.com/repos/prodo-ai/plz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prodo-ai/plz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prodo-ai/plz/git/refs{/sha}","trees_url":"https://api.github.com/repos/prodo-ai/plz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prodo-ai/plz/statuses/{sha}","languages_url":"https://api.github.com/repos/prodo-ai/plz/languages","stargazers_url":"https://api.github.com/repos/prodo-ai/plz/stargazers","contributors_url":"https://api.github.com/repos/prodo-ai/plz/contributors","subscribers_url":"https://api.github.com/repos/prodo-ai/plz/subscribers","subscription_url":"https://api.github.com/repos/prodo-ai/plz/subscription","commits_url":"https://api.github.com/repos/prodo-ai/plz/commits{/sha}","git_commits_url":"https://api.github.com/repos/prodo-ai/plz/git/commits{/sha}","comments_url":"https://api.github.com/repos/prodo-ai/plz/comments{/number}","issue_comment_url":"https://api.github.com/repos/prodo-ai/plz/issues/comments{/number}","contents_url":"https://api.github.com/repos/prodo-ai/plz/contents/{+path}","compare_url":"https://api.github.com/repos/prodo-ai/plz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prodo-ai/plz/merges","archive_url":"https://api.github.com/repos/prodo-ai/plz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prodo-ai/plz/downloads","issues_url":"https://api.github.com/repos/prodo-ai/plz/issues{/number}","pulls_url":"https://api.github.com/repos/prodo-ai/plz/pulls{/number}","milestones_url":"https://api.github.com/repos/prodo-ai/plz/milestones{/number}","notifications_url":"https://api.github.com/repos/prodo-ai/plz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prodo-ai/plz/labels{/name}","releases_url":"https://api.github.com/repos/prodo-ai/plz/releases{/id}","deployments_url":"https://api.github.com/repos/prodo-ai/plz/deployments","created_at":"2018-01-17T17:20:46Z","updated_at":"2018-11-06T17:36:00Z","pushed_at":"2018-11-06T17:56:23Z","git_url":"git://github.com/prodo-ai/plz.git","ssh_url":"git@github.com:prodo-ai/plz.git","clone_url":"https://github.com/prodo-ai/plz.git","svn_url":"https://github.com/prodo-ai/plz","homepage":"","size":5288,"stargazers_count":19,"watchers_count":19,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":19,"default_branch":"master"}},"base":{"label":"prodo-ai:master","ref":"master","sha":"c76d1204789c11384334671db813df10a1d944af","user":{"login":"prodo-ai","id":20758341,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNzU4MzQx","avatar_url":"https://avatars3.githubusercontent.com/u/20758341?v=4","gravatar_id":"","url":"https://api.github.com/users/prodo-ai","html_url":"https://github.com/prodo-ai","followers_url":"https://api.github.com/users/prodo-ai/followers","following_url":"https://api.github.com/users/prodo-ai/following{/other_user}","gists_url":"https://api.github.com/users/prodo-ai/gists{/gist_id}","starred_url":"https://api.github.com/users/prodo-ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prodo-ai/subscriptions","organizations_url":"https://api.github.com/users/prodo-ai/orgs","repos_url":"https://api.github.com/users/prodo-ai/repos","events_url":"https://api.github.com/users/prodo-ai/events{/privacy}","received_events_url":"https://api.github.com/users/prodo-ai/received_events","type":"Organization","site_admin":false},"repo":{"id":117868411,"node_id":"MDEwOlJlcG9zaXRvcnkxMTc4Njg0MTE=","name":"plz","full_name":"prodo-ai/plz","private":false,"owner":{"login":"prodo-ai","id":20758341,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNzU4MzQx","avatar_url":"https://avatars3.githubusercontent.com/u/20758341?v=4","gravatar_id":"","url":"https://api.github.com/users/prodo-ai","html_url":"https://github.com/prodo-ai","followers_url":"https://api.github.com/users/prodo-ai/followers","following_url":"https://api.github.com/users/prodo-ai/following{/other_user}","gists_url":"https://api.github.com/users/prodo-ai/gists{/gist_id}","starred_url":"https://api.github.com/users/prodo-ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prodo-ai/subscriptions","organizations_url":"https://api.github.com/users/prodo-ai/orgs","repos_url":"https://api.github.com/users/prodo-ai/repos","events_url":"https://api.github.com/users/prodo-ai/events{/privacy}","received_events_url":"https://api.github.com/users/prodo-ai/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/prodo-ai/plz","description":"Say the magic word 😸","fork":false,"url":"https://api.github.com/repos/prodo-ai/plz","forks_url":"https://api.github.com/repos/prodo-ai/plz/forks","keys_url":"https://api.github.com/repos/prodo-ai/plz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prodo-ai/plz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prodo-ai/plz/teams","hooks_url":"https://api.github.com/repos/prodo-ai/plz/hooks","issue_events_url":"https://api.github.com/repos/prodo-ai/plz/issues/events{/number}","events_url":"https://api.github.com/repos/prodo-ai/plz/events","assignees_url":"https://api.github.com/repos/prodo-ai/plz/assignees{/user}","branches_url":"https://api.github.com/repos/prodo-ai/plz/branches{/branch}","tags_url":"https://api.github.com/repos/prodo-ai/plz/tags","blobs_url":"https://api.github.com/repos/prodo-ai/plz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prodo-ai/plz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prodo-ai/plz/git/refs{/sha}","trees_url":"https://api.github.com/repos/prodo-ai/plz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prodo-ai/plz/statuses/{sha}","languages_url":"https://api.github.com/repos/prodo-ai/plz/languages","stargazers_url":"https://api.github.com/repos/prodo-ai/plz/stargazers","contributors_url":"https://api.github.com/repos/prodo-ai/plz/contributors","subscribers_url":"https://api.github.com/repos/prodo-ai/plz/subscribers","subscription_url":"https://api.github.com/repos/prodo-ai/plz/subscription","commits_url":"https://api.github.com/repos/prodo-ai/plz/commits{/sha}","git_commits_url":"https://api.github.com/repos/prodo-ai/plz/git/commits{/sha}","comments_url":"https://api.github.com/repos/prodo-ai/plz/comments{/number}","issue_comment_url":"https://api.github.com/repos/prodo-ai/plz/issues/comments{/number}","contents_url":"https://api.github.com/repos/prodo-ai/plz/contents/{+path}","compare_url":"https://api.github.com/repos/prodo-ai/plz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prodo-ai/plz/merges","archive_url":"https://api.github.com/repos/prodo-ai/plz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prodo-ai/plz/downloads","issues_url":"https://api.github.com/repos/prodo-ai/plz/issues{/number}","pulls_url":"https://api.github.com/repos/prodo-ai/plz/pulls{/number}","milestones_url":"https://api.github.com/repos/prodo-ai/plz/milestones{/number}","notifications_url":"https://api.github.com/repos/prodo-ai/plz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prodo-ai/plz/labels{/name}","releases_url":"https://api.github.com/repos/prodo-ai/plz/releases{/id}","deployments_url":"https://api.github.com/repos/prodo-ai/plz/deployments","created_at":"2018-01-17T17:20:46Z","updated_at":"2018-11-06T17:36:00Z","pushed_at":"2018-11-06T17:56:23Z","git_url":"git://github.com/prodo-ai/plz.git","ssh_url":"git@github.com:prodo-ai/plz.git","clone_url":"https://github.com/prodo-ai/plz.git","svn_url":"https://github.com/prodo-ai/plz","homepage":"","size":5288,"stargazers_count":19,"watchers_count":19,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prodo-ai/plz/pulls/197"},"html":{"href":"https://github.com/prodo-ai/plz/pull/197"},"issue":{"href":"https://api.github.com/repos/prodo-ai/plz/issues/197"},"comments":{"href":"https://api.github.com/repos/prodo-ai/plz/issues/197/comments"},"review_comments":{"href":"https://api.github.com/repos/prodo-ai/plz/pulls/197/comments"},"review_comment":{"href":"https://api.github.com/repos/prodo-ai/plz/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prodo-ai/plz/pulls/197/commits"},"statuses":{"href":"https://api.github.com/repos/prodo-ai/plz/statuses/917ea5a637413a91331248e3997d0d1a0583cdd0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kprimerakis"}}