{"action":"created","comment":{"url":"https://api.github.com/repos/pytorch/ignite/pulls/comments/204409200","pull_request_review_id":139481839,"id":204409200,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDQwOTIwMA==","diff_hunk":"@@ -1,6 +1,42 @@\n ignite.metrics\n ==============\n \n+Metrics provide a way to compute various quantities of interest in an online\n+fashion without having to store the entire output history of a model.\n+\n+In practice user needs to attach metric instance to engine. Metric value is\n+computed using engine's output:\n+\n+    .. code-block:: python\n+\n+        def process_function(engine, batch):\n+            # ...\n+            return y_pred, y\n+\n+        engine = Engine(process_function)\n+        metric = CategoricalAccuracy()\n+        metric.attach(engine, \"accuracy\")\n+\n+If engine's output is not in the format `y_pred, y`, user can use `output_transform`:","path":"docs/source/metrics.rst","position":20,"original_position":20,"commit_id":"599f1fa9953d07b077302780d8bd7d5ebe67a3df","original_commit_id":"599f1fa9953d07b077302780d8bd7d5ebe67a3df","user":{"login":"alykhantejani","id":687194,"node_id":"MDQ6VXNlcjY4NzE5NA==","avatar_url":"https://avatars1.githubusercontent.com/u/687194?v=4","gravatar_id":"","url":"https://api.github.com/users/alykhantejani","html_url":"https://github.com/alykhantejani","followers_url":"https://api.github.com/users/alykhantejani/followers","following_url":"https://api.github.com/users/alykhantejani/following{/other_user}","gists_url":"https://api.github.com/users/alykhantejani/gists{/gist_id}","starred_url":"https://api.github.com/users/alykhantejani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alykhantejani/subscriptions","organizations_url":"https://api.github.com/users/alykhantejani/orgs","repos_url":"https://api.github.com/users/alykhantejani/repos","events_url":"https://api.github.com/users/alykhantejani/events{/privacy}","received_events_url":"https://api.github.com/users/alykhantejani/received_events","type":"User","site_admin":false},"body":"If **the** engine's output is not in the format `y_pred, y`, **the** user can use  **the** `output_transform` **argument to transform it**:","created_at":"2018-07-23T13:53:57Z","updated_at":"2018-07-23T13:54:18Z","html_url":"https://github.com/pytorch/ignite/pull/214#discussion_r204409200","pull_request_url":"https://api.github.com/repos/pytorch/ignite/pulls/214","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/pytorch/ignite/pulls/comments/204409200"},"html":{"href":"https://github.com/pytorch/ignite/pull/214#discussion_r204409200"},"pull_request":{"href":"https://api.github.com/repos/pytorch/ignite/pulls/214"}}},"pull_request":{"url":"https://api.github.com/repos/pytorch/ignite/pulls/214","id":202881681,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyODgxNjgx","html_url":"https://github.com/pytorch/ignite/pull/214","diff_url":"https://github.com/pytorch/ignite/pull/214.diff","patch_url":"https://github.com/pytorch/ignite/pull/214.patch","issue_url":"https://api.github.com/repos/pytorch/ignite/issues/214","number":214,"state":"open","locked":false,"title":"Update metrics docs, added example of usage of `output_transform`","user":{"login":"vfdev-5","id":2459423,"node_id":"MDQ6VXNlcjI0NTk0MjM=","avatar_url":"https://avatars0.githubusercontent.com/u/2459423?v=4","gravatar_id":"","url":"https://api.github.com/users/vfdev-5","html_url":"https://github.com/vfdev-5","followers_url":"https://api.github.com/users/vfdev-5/followers","following_url":"https://api.github.com/users/vfdev-5/following{/other_user}","gists_url":"https://api.github.com/users/vfdev-5/gists{/gist_id}","starred_url":"https://api.github.com/users/vfdev-5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vfdev-5/subscriptions","organizations_url":"https://api.github.com/users/vfdev-5/orgs","repos_url":"https://api.github.com/users/vfdev-5/repos","events_url":"https://api.github.com/users/vfdev-5/events{/privacy}","received_events_url":"https://api.github.com/users/vfdev-5/received_events","type":"User","site_admin":false},"body":"Addresses #213 \r\n\r\n- Needed to move below ` __metaclass__ = ABCMeta` as it disables docs generation.\r\n- Added example with `output_transform`\r\n\r\ncc @jasonkriss ","created_at":"2018-07-20T15:23:00Z","updated_at":"2018-07-23T13:54:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"739513e1eda57e265bc7b3b18acd97a4da6a473e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pytorch/ignite/pulls/214/commits","review_comments_url":"https://api.github.com/repos/pytorch/ignite/pulls/214/comments","review_comment_url":"https://api.github.com/repos/pytorch/ignite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pytorch/ignite/issues/214/comments","statuses_url":"https://api.github.com/repos/pytorch/ignite/statuses/599f1fa9953d07b077302780d8bd7d5ebe67a3df","head":{"label":"vfdev-5:issue_213","ref":"issue_213","sha":"599f1fa9953d07b077302780d8bd7d5ebe67a3df","user":{"login":"vfdev-5","id":2459423,"node_id":"MDQ6VXNlcjI0NTk0MjM=","avatar_url":"https://avatars0.githubusercontent.com/u/2459423?v=4","gravatar_id":"","url":"https://api.github.com/users/vfdev-5","html_url":"https://github.com/vfdev-5","followers_url":"https://api.github.com/users/vfdev-5/followers","following_url":"https://api.github.com/users/vfdev-5/following{/other_user}","gists_url":"https://api.github.com/users/vfdev-5/gists{/gist_id}","starred_url":"https://api.github.com/users/vfdev-5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vfdev-5/subscriptions","organizations_url":"https://api.github.com/users/vfdev-5/orgs","repos_url":"https://api.github.com/users/vfdev-5/repos","events_url":"https://api.github.com/users/vfdev-5/events{/privacy}","received_events_url":"https://api.github.com/users/vfdev-5/received_events","type":"User","site_admin":false},"repo":{"id":112336645,"node_id":"MDEwOlJlcG9zaXRvcnkxMTIzMzY2NDU=","name":"ignite","full_name":"vfdev-5/ignite","owner":{"login":"vfdev-5","id":2459423,"node_id":"MDQ6VXNlcjI0NTk0MjM=","avatar_url":"https://avatars0.githubusercontent.com/u/2459423?v=4","gravatar_id":"","url":"https://api.github.com/users/vfdev-5","html_url":"https://github.com/vfdev-5","followers_url":"https://api.github.com/users/vfdev-5/followers","following_url":"https://api.github.com/users/vfdev-5/following{/other_user}","gists_url":"https://api.github.com/users/vfdev-5/gists{/gist_id}","starred_url":"https://api.github.com/users/vfdev-5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vfdev-5/subscriptions","organizations_url":"https://api.github.com/users/vfdev-5/orgs","repos_url":"https://api.github.com/users/vfdev-5/repos","events_url":"https://api.github.com/users/vfdev-5/events{/privacy}","received_events_url":"https://api.github.com/users/vfdev-5/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vfdev-5/ignite","description":null,"fork":true,"url":"https://api.github.com/repos/vfdev-5/ignite","forks_url":"https://api.github.com/repos/vfdev-5/ignite/forks","keys_url":"https://api.github.com/repos/vfdev-5/ignite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vfdev-5/ignite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vfdev-5/ignite/teams","hooks_url":"https://api.github.com/repos/vfdev-5/ignite/hooks","issue_events_url":"https://api.github.com/repos/vfdev-5/ignite/issues/events{/number}","events_url":"https://api.github.com/repos/vfdev-5/ignite/events","assignees_url":"https://api.github.com/repos/vfdev-5/ignite/assignees{/user}","branches_url":"https://api.github.com/repos/vfdev-5/ignite/branches{/branch}","tags_url":"https://api.github.com/repos/vfdev-5/ignite/tags","blobs_url":"https://api.github.com/repos/vfdev-5/ignite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vfdev-5/ignite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vfdev-5/ignite/git/refs{/sha}","trees_url":"https://api.github.com/repos/vfdev-5/ignite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vfdev-5/ignite/statuses/{sha}","languages_url":"https://api.github.com/repos/vfdev-5/ignite/languages","stargazers_url":"https://api.github.com/repos/vfdev-5/ignite/stargazers","contributors_url":"https://api.github.com/repos/vfdev-5/ignite/contributors","subscribers_url":"https://api.github.com/repos/vfdev-5/ignite/subscribers","subscription_url":"https://api.github.com/repos/vfdev-5/ignite/subscription","commits_url":"https://api.github.com/repos/vfdev-5/ignite/commits{/sha}","git_commits_url":"https://api.github.com/repos/vfdev-5/ignite/git/commits{/sha}","comments_url":"https://api.github.com/repos/vfdev-5/ignite/comments{/number}","issue_comment_url":"https://api.github.com/repos/vfdev-5/ignite/issues/comments{/number}","contents_url":"https://api.github.com/repos/vfdev-5/ignite/contents/{+path}","compare_url":"https://api.github.com/repos/vfdev-5/ignite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vfdev-5/ignite/merges","archive_url":"https://api.github.com/repos/vfdev-5/ignite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vfdev-5/ignite/downloads","issues_url":"https://api.github.com/repos/vfdev-5/ignite/issues{/number}","pulls_url":"https://api.github.com/repos/vfdev-5/ignite/pulls{/number}","milestones_url":"https://api.github.com/repos/vfdev-5/ignite/milestones{/number}","notifications_url":"https://api.github.com/repos/vfdev-5/ignite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vfdev-5/ignite/labels{/name}","releases_url":"https://api.github.com/repos/vfdev-5/ignite/releases{/id}","deployments_url":"https://api.github.com/repos/vfdev-5/ignite/deployments","created_at":"2017-11-28T13:07:24Z","updated_at":"2018-07-20T14:47:36Z","pushed_at":"2018-07-21T19:56:45Z","git_url":"git://github.com/vfdev-5/ignite.git","ssh_url":"git@github.com:vfdev-5/ignite.git","clone_url":"https://github.com/vfdev-5/ignite.git","svn_url":"https://github.com/vfdev-5/ignite","homepage":null,"size":2195,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pytorch:master","ref":"master","sha":"70c36fa364b686561c88a18a65d08f4f1a4b70ae","user":{"login":"pytorch","id":21003710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDAzNzEw","avatar_url":"https://avatars3.githubusercontent.com/u/21003710?v=4","gravatar_id":"","url":"https://api.github.com/users/pytorch","html_url":"https://github.com/pytorch","followers_url":"https://api.github.com/users/pytorch/followers","following_url":"https://api.github.com/users/pytorch/following{/other_user}","gists_url":"https://api.github.com/users/pytorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pytorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytorch/subscriptions","organizations_url":"https://api.github.com/users/pytorch/orgs","repos_url":"https://api.github.com/users/pytorch/repos","events_url":"https://api.github.com/users/pytorch/events{/privacy}","received_events_url":"https://api.github.com/users/pytorch/received_events","type":"Organization","site_admin":false},"repo":{"id":111835796,"node_id":"MDEwOlJlcG9zaXRvcnkxMTE4MzU3OTY=","name":"ignite","full_name":"pytorch/ignite","owner":{"login":"pytorch","id":21003710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDAzNzEw","avatar_url":"https://avatars3.githubusercontent.com/u/21003710?v=4","gravatar_id":"","url":"https://api.github.com/users/pytorch","html_url":"https://github.com/pytorch","followers_url":"https://api.github.com/users/pytorch/followers","following_url":"https://api.github.com/users/pytorch/following{/other_user}","gists_url":"https://api.github.com/users/pytorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pytorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytorch/subscriptions","organizations_url":"https://api.github.com/users/pytorch/orgs","repos_url":"https://api.github.com/users/pytorch/repos","events_url":"https://api.github.com/users/pytorch/events{/privacy}","received_events_url":"https://api.github.com/users/pytorch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pytorch/ignite","description":"High-level library to help with training neural networks in PyTorch","fork":false,"url":"https://api.github.com/repos/pytorch/ignite","forks_url":"https://api.github.com/repos/pytorch/ignite/forks","keys_url":"https://api.github.com/repos/pytorch/ignite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pytorch/ignite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pytorch/ignite/teams","hooks_url":"https://api.github.com/repos/pytorch/ignite/hooks","issue_events_url":"https://api.github.com/repos/pytorch/ignite/issues/events{/number}","events_url":"https://api.github.com/repos/pytorch/ignite/events","assignees_url":"https://api.github.com/repos/pytorch/ignite/assignees{/user}","branches_url":"https://api.github.com/repos/pytorch/ignite/branches{/branch}","tags_url":"https://api.github.com/repos/pytorch/ignite/tags","blobs_url":"https://api.github.com/repos/pytorch/ignite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pytorch/ignite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pytorch/ignite/git/refs{/sha}","trees_url":"https://api.github.com/repos/pytorch/ignite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pytorch/ignite/statuses/{sha}","languages_url":"https://api.github.com/repos/pytorch/ignite/languages","stargazers_url":"https://api.github.com/repos/pytorch/ignite/stargazers","contributors_url":"https://api.github.com/repos/pytorch/ignite/contributors","subscribers_url":"https://api.github.com/repos/pytorch/ignite/subscribers","subscription_url":"https://api.github.com/repos/pytorch/ignite/subscription","commits_url":"https://api.github.com/repos/pytorch/ignite/commits{/sha}","git_commits_url":"https://api.github.com/repos/pytorch/ignite/git/commits{/sha}","comments_url":"https://api.github.com/repos/pytorch/ignite/comments{/number}","issue_comment_url":"https://api.github.com/repos/pytorch/ignite/issues/comments{/number}","contents_url":"https://api.github.com/repos/pytorch/ignite/contents/{+path}","compare_url":"https://api.github.com/repos/pytorch/ignite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pytorch/ignite/merges","archive_url":"https://api.github.com/repos/pytorch/ignite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pytorch/ignite/downloads","issues_url":"https://api.github.com/repos/pytorch/ignite/issues{/number}","pulls_url":"https://api.github.com/repos/pytorch/ignite/pulls{/number}","milestones_url":"https://api.github.com/repos/pytorch/ignite/milestones{/number}","notifications_url":"https://api.github.com/repos/pytorch/ignite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pytorch/ignite/labels{/name}","releases_url":"https://api.github.com/repos/pytorch/ignite/releases{/id}","deployments_url":"https://api.github.com/repos/pytorch/ignite/deployments","created_at":"2017-11-23T17:31:21Z","updated_at":"2018-07-23T11:26:45Z","pushed_at":"2018-07-21T19:56:46Z","git_url":"git://github.com/pytorch/ignite.git","ssh_url":"git@github.com:pytorch/ignite.git","clone_url":"https://github.com/pytorch/ignite.git","svn_url":"https://github.com/pytorch/ignite","homepage":"https://pytorch.org/ignite","size":1722,"stargazers_count":543,"watchers_count":543,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":53,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":53,"open_issues":12,"watchers":543,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pytorch/ignite/pulls/214"},"html":{"href":"https://github.com/pytorch/ignite/pull/214"},"issue":{"href":"https://api.github.com/repos/pytorch/ignite/issues/214"},"comments":{"href":"https://api.github.com/repos/pytorch/ignite/issues/214/comments"},"review_comments":{"href":"https://api.github.com/repos/pytorch/ignite/pulls/214/comments"},"review_comment":{"href":"https://api.github.com/repos/pytorch/ignite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pytorch/ignite/pulls/214/commits"},"statuses":{"href":"https://api.github.com/repos/pytorch/ignite/statuses/599f1fa9953d07b077302780d8bd7d5ebe67a3df"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"alykhantejani"}}