{"action":"created","comment":{"url":"https://api.github.com/repos/PaddlePaddle/models/pulls/comments/144519221","pull_request_review_id":69186776,"id":144519221,"diff_hunk":"@@ -1,16 +1,41 @@\n-#!/usr/bin/env python\n-# -*- coding: utf-8 -*-\n import sys\n import os\n import gzip\n+import click\n \n import paddle.v2 as paddle\n \n import reader\n from network_conf import nest_net\n-from utils import logger\n-\n-\n+from utils import logger, load_dict\n+\n+\n+@click.command('infer')\n+@click.option(\n+    \"--data_path\",\n+    default=None,\n+    help=(\"path of data for inference (default: None). \"\n+          \"if this parameter is not set, \"\n+          \"imdb test dataset will be used.\"))\n+@click.option(\n+    \"--model_path\",\n+    type=str,\n+    default='models/params_pass_00000.tar.gz',","path":"nested_sequence/text_classification/infer.py","position":23,"original_position":28,"commit_id":"e89af968b069e0828847e5839f17d0ee607aa320","original_commit_id":"28dd91639ba2750c85b0943c004174958e3d772d","user":{"login":"lcy-seso","id":5842774,"avatar_url":"https://avatars2.githubusercontent.com/u/5842774?v=4","gravatar_id":"","url":"https://api.github.com/users/lcy-seso","html_url":"https://github.com/lcy-seso","followers_url":"https://api.github.com/users/lcy-seso/followers","following_url":"https://api.github.com/users/lcy-seso/following{/other_user}","gists_url":"https://api.github.com/users/lcy-seso/gists{/gist_id}","starred_url":"https://api.github.com/users/lcy-seso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcy-seso/subscriptions","organizations_url":"https://api.github.com/users/lcy-seso/orgs","repos_url":"https://api.github.com/users/lcy-seso/repos","events_url":"https://api.github.com/users/lcy-seso/events{/privacy}","received_events_url":"https://api.github.com/users/lcy-seso/received_events","type":"User","site_admin":false},"body":"1. 不要设置这个默认参数，让这个字段变成 required 的，让用户来指定。\r\n2. 需要的是一个目录来存储所有保存的模型，而不是一个文件名。不要让后面轮次的模型，覆盖前面的。留下来让用户做模型选择。","created_at":"2017-10-13T10:32:04Z","updated_at":"2017-10-13T10:35:12Z","html_url":"https://github.com/PaddlePaddle/models/pull/367#discussion_r144519221","pull_request_url":"https://api.github.com/repos/PaddlePaddle/models/pulls/367","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/PaddlePaddle/models/pulls/comments/144519221"},"html":{"href":"https://github.com/PaddlePaddle/models/pull/367#discussion_r144519221"},"pull_request":{"href":"https://api.github.com/repos/PaddlePaddle/models/pulls/367"}}},"pull_request":{"url":"https://api.github.com/repos/PaddlePaddle/models/pulls/367","id":146104009,"html_url":"https://github.com/PaddlePaddle/models/pull/367","diff_url":"https://github.com/PaddlePaddle/models/pull/367.diff","patch_url":"https://github.com/PaddlePaddle/models/pull/367.patch","issue_url":"https://api.github.com/repos/PaddlePaddle/models/issues/367","number":367,"state":"open","locked":false,"title":"add text classification demo for nested sequence data","user":{"login":"peterzhang2029","id":11489242,"avatar_url":"https://avatars1.githubusercontent.com/u/11489242?v=4","gravatar_id":"","url":"https://api.github.com/users/peterzhang2029","html_url":"https://github.com/peterzhang2029","followers_url":"https://api.github.com/users/peterzhang2029/followers","following_url":"https://api.github.com/users/peterzhang2029/following{/other_user}","gists_url":"https://api.github.com/users/peterzhang2029/gists{/gist_id}","starred_url":"https://api.github.com/users/peterzhang2029/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterzhang2029/subscriptions","organizations_url":"https://api.github.com/users/peterzhang2029/orgs","repos_url":"https://api.github.com/users/peterzhang2029/repos","events_url":"https://api.github.com/users/peterzhang2029/events{/privacy}","received_events_url":"https://api.github.com/users/peterzhang2029/received_events","type":"User","site_admin":false},"body":"resolve https://github.com/PaddlePaddle/models/issues/366 ","created_at":"2017-10-12T02:29:22Z","updated_at":"2017-10-13T10:35:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c57ab570426bae461a25ce8efd4cb83adae9bad","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/PaddlePaddle/models/pulls/367/commits","review_comments_url":"https://api.github.com/repos/PaddlePaddle/models/pulls/367/comments","review_comment_url":"https://api.github.com/repos/PaddlePaddle/models/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PaddlePaddle/models/issues/367/comments","statuses_url":"https://api.github.com/repos/PaddlePaddle/models/statuses/e89af968b069e0828847e5839f17d0ee607aa320","head":{"label":"peterzhang2029:nest_text_classification","ref":"nest_text_classification","sha":"e89af968b069e0828847e5839f17d0ee607aa320","user":{"login":"peterzhang2029","id":11489242,"avatar_url":"https://avatars1.githubusercontent.com/u/11489242?v=4","gravatar_id":"","url":"https://api.github.com/users/peterzhang2029","html_url":"https://github.com/peterzhang2029","followers_url":"https://api.github.com/users/peterzhang2029/followers","following_url":"https://api.github.com/users/peterzhang2029/following{/other_user}","gists_url":"https://api.github.com/users/peterzhang2029/gists{/gist_id}","starred_url":"https://api.github.com/users/peterzhang2029/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterzhang2029/subscriptions","organizations_url":"https://api.github.com/users/peterzhang2029/orgs","repos_url":"https://api.github.com/users/peterzhang2029/repos","events_url":"https://api.github.com/users/peterzhang2029/events{/privacy}","received_events_url":"https://api.github.com/users/peterzhang2029/received_events","type":"User","site_admin":false},"repo":{"id":103531756,"name":"models","full_name":"peterzhang2029/models","owner":{"login":"peterzhang2029","id":11489242,"avatar_url":"https://avatars1.githubusercontent.com/u/11489242?v=4","gravatar_id":"","url":"https://api.github.com/users/peterzhang2029","html_url":"https://github.com/peterzhang2029","followers_url":"https://api.github.com/users/peterzhang2029/followers","following_url":"https://api.github.com/users/peterzhang2029/following{/other_user}","gists_url":"https://api.github.com/users/peterzhang2029/gists{/gist_id}","starred_url":"https://api.github.com/users/peterzhang2029/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterzhang2029/subscriptions","organizations_url":"https://api.github.com/users/peterzhang2029/orgs","repos_url":"https://api.github.com/users/peterzhang2029/repos","events_url":"https://api.github.com/users/peterzhang2029/events{/privacy}","received_events_url":"https://api.github.com/users/peterzhang2029/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peterzhang2029/models","description":"Model configurations","fork":true,"url":"https://api.github.com/repos/peterzhang2029/models","forks_url":"https://api.github.com/repos/peterzhang2029/models/forks","keys_url":"https://api.github.com/repos/peterzhang2029/models/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peterzhang2029/models/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peterzhang2029/models/teams","hooks_url":"https://api.github.com/repos/peterzhang2029/models/hooks","issue_events_url":"https://api.github.com/repos/peterzhang2029/models/issues/events{/number}","events_url":"https://api.github.com/repos/peterzhang2029/models/events","assignees_url":"https://api.github.com/repos/peterzhang2029/models/assignees{/user}","branches_url":"https://api.github.com/repos/peterzhang2029/models/branches{/branch}","tags_url":"https://api.github.com/repos/peterzhang2029/models/tags","blobs_url":"https://api.github.com/repos/peterzhang2029/models/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peterzhang2029/models/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peterzhang2029/models/git/refs{/sha}","trees_url":"https://api.github.com/repos/peterzhang2029/models/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peterzhang2029/models/statuses/{sha}","languages_url":"https://api.github.com/repos/peterzhang2029/models/languages","stargazers_url":"https://api.github.com/repos/peterzhang2029/models/stargazers","contributors_url":"https://api.github.com/repos/peterzhang2029/models/contributors","subscribers_url":"https://api.github.com/repos/peterzhang2029/models/subscribers","subscription_url":"https://api.github.com/repos/peterzhang2029/models/subscription","commits_url":"https://api.github.com/repos/peterzhang2029/models/commits{/sha}","git_commits_url":"https://api.github.com/repos/peterzhang2029/models/git/commits{/sha}","comments_url":"https://api.github.com/repos/peterzhang2029/models/comments{/number}","issue_comment_url":"https://api.github.com/repos/peterzhang2029/models/issues/comments{/number}","contents_url":"https://api.github.com/repos/peterzhang2029/models/contents/{+path}","compare_url":"https://api.github.com/repos/peterzhang2029/models/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peterzhang2029/models/merges","archive_url":"https://api.github.com/repos/peterzhang2029/models/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peterzhang2029/models/downloads","issues_url":"https://api.github.com/repos/peterzhang2029/models/issues{/number}","pulls_url":"https://api.github.com/repos/peterzhang2029/models/pulls{/number}","milestones_url":"https://api.github.com/repos/peterzhang2029/models/milestones{/number}","notifications_url":"https://api.github.com/repos/peterzhang2029/models/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peterzhang2029/models/labels{/name}","releases_url":"https://api.github.com/repos/peterzhang2029/models/releases{/id}","deployments_url":"https://api.github.com/repos/peterzhang2029/models/deployments","created_at":"2017-09-14T12:51:56Z","updated_at":"2017-09-14T12:51:58Z","pushed_at":"2017-10-13T10:18:09Z","git_url":"git://github.com/peterzhang2029/models.git","ssh_url":"git@github.com:peterzhang2029/models.git","clone_url":"https://github.com/peterzhang2029/models.git","svn_url":"https://github.com/peterzhang2029/models","homepage":"","size":41442,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"PaddlePaddle:develop","ref":"develop","sha":"6fc18c3acde30b03d102493f209e2639f3277a48","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":88868842,"name":"models","full_name":"PaddlePaddle/models","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/models","description":"Model configurations","fork":false,"url":"https://api.github.com/repos/PaddlePaddle/models","forks_url":"https://api.github.com/repos/PaddlePaddle/models/forks","keys_url":"https://api.github.com/repos/PaddlePaddle/models/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PaddlePaddle/models/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PaddlePaddle/models/teams","hooks_url":"https://api.github.com/repos/PaddlePaddle/models/hooks","issue_events_url":"https://api.github.com/repos/PaddlePaddle/models/issues/events{/number}","events_url":"https://api.github.com/repos/PaddlePaddle/models/events","assignees_url":"https://api.github.com/repos/PaddlePaddle/models/assignees{/user}","branches_url":"https://api.github.com/repos/PaddlePaddle/models/branches{/branch}","tags_url":"https://api.github.com/repos/PaddlePaddle/models/tags","blobs_url":"https://api.github.com/repos/PaddlePaddle/models/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PaddlePaddle/models/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PaddlePaddle/models/git/refs{/sha}","trees_url":"https://api.github.com/repos/PaddlePaddle/models/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PaddlePaddle/models/statuses/{sha}","languages_url":"https://api.github.com/repos/PaddlePaddle/models/languages","stargazers_url":"https://api.github.com/repos/PaddlePaddle/models/stargazers","contributors_url":"https://api.github.com/repos/PaddlePaddle/models/contributors","subscribers_url":"https://api.github.com/repos/PaddlePaddle/models/subscribers","subscription_url":"https://api.github.com/repos/PaddlePaddle/models/subscription","commits_url":"https://api.github.com/repos/PaddlePaddle/models/commits{/sha}","git_commits_url":"https://api.github.com/repos/PaddlePaddle/models/git/commits{/sha}","comments_url":"https://api.github.com/repos/PaddlePaddle/models/comments{/number}","issue_comment_url":"https://api.github.com/repos/PaddlePaddle/models/issues/comments{/number}","contents_url":"https://api.github.com/repos/PaddlePaddle/models/contents/{+path}","compare_url":"https://api.github.com/repos/PaddlePaddle/models/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PaddlePaddle/models/merges","archive_url":"https://api.github.com/repos/PaddlePaddle/models/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PaddlePaddle/models/downloads","issues_url":"https://api.github.com/repos/PaddlePaddle/models/issues{/number}","pulls_url":"https://api.github.com/repos/PaddlePaddle/models/pulls{/number}","milestones_url":"https://api.github.com/repos/PaddlePaddle/models/milestones{/number}","notifications_url":"https://api.github.com/repos/PaddlePaddle/models/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PaddlePaddle/models/labels{/name}","releases_url":"https://api.github.com/repos/PaddlePaddle/models/releases{/id}","deployments_url":"https://api.github.com/repos/PaddlePaddle/models/deployments","created_at":"2017-04-20T13:30:15Z","updated_at":"2017-10-12T03:45:59Z","pushed_at":"2017-10-13T10:18:10Z","git_url":"git://github.com/PaddlePaddle/models.git","ssh_url":"git@github.com:PaddlePaddle/models.git","clone_url":"https://github.com/PaddlePaddle/models.git","svn_url":"https://github.com/PaddlePaddle/models","homepage":"","size":41187,"stargazers_count":79,"watchers_count":79,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":79,"forks":79,"open_issues":79,"watchers":79,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/PaddlePaddle/models/pulls/367"},"html":{"href":"https://github.com/PaddlePaddle/models/pull/367"},"issue":{"href":"https://api.github.com/repos/PaddlePaddle/models/issues/367"},"comments":{"href":"https://api.github.com/repos/PaddlePaddle/models/issues/367/comments"},"review_comments":{"href":"https://api.github.com/repos/PaddlePaddle/models/pulls/367/comments"},"review_comment":{"href":"https://api.github.com/repos/PaddlePaddle/models/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PaddlePaddle/models/pulls/367/commits"},"statuses":{"href":"https://api.github.com/repos/PaddlePaddle/models/statuses/e89af968b069e0828847e5839f17d0ee607aa320"}},"author_association":"NONE"}}
{"actor":{"display_login":"lcy-seso"}}