{"action":"created","comment":{"url":"https://api.github.com/repos/h2oai/h2o-3/pulls/comments/175914608","pull_request_review_id":105526828,"id":175914608,"diff_hunk":"@@ -13,24 +13,57 @@\n  */\n public class CountingErrorConsumer extends EasyPredictModelWrapper.ErrorConsumer {\n \n-  private AtomicLong dataTransformationErrorsCount = new AtomicLong();\n-  private Map<String, AtomicLong> unknownCategoricalsPerColumn = new ConcurrentHashMap<>();\n+  private Map<String, AtomicLong> dataTransformationErrorsCountPerColumn;\n+  private Map<String, AtomicLong> unknownCategoricalsPerColumn;\n \n   /**\n    * @param model An instance of {@link GenModel}\n    */\n   public CountingErrorConsumer(GenModel model) {\n+    initializeDataTransformationErrorsCount(model);\n+    initializeUnknownCategoricalsPerColumn(model);\n+  }\n+\n+  /**\n+   * Initializes the map of data transformation errors for each column that is not related to response variable,\n+   * excluding response column. The map is initialized as unmodifiable and thread-safe.\n+   *\n+   * @param model {@link GenModel} the data trasnformation errors count map is initialized for\n+   */\n+  private void initializeDataTransformationErrorsCount(GenModel model) {\n+    String responseColumnName = model.isSupervised() ? model.getResponseName() : null;\n+\n+    dataTransformationErrorsCountPerColumn = new ConcurrentHashMap<>();\n+    for (String column : model.getNames()) {\n+      // Do not perform check for response column if the model is unsupervised\n+      if (!model.isSupervised() || !responseColumnName.equals(column)) {","path":"h2o-genmodel/src/main/java/hex/genmodel/easy/error/CountingErrorConsumer.java","position":29,"original_position":29,"commit_id":"396cb64ac6c7a5f4ce7acf59e03718420af4ba58","original_commit_id":"396cb64ac6c7a5f4ce7acf59e03718420af4ba58","user":{"login":"michalkurka","id":20690218,"avatar_url":"https://avatars2.githubusercontent.com/u/20690218?v=4","gravatar_id":"","url":"https://api.github.com/users/michalkurka","html_url":"https://github.com/michalkurka","followers_url":"https://api.github.com/users/michalkurka/followers","following_url":"https://api.github.com/users/michalkurka/following{/other_user}","gists_url":"https://api.github.com/users/michalkurka/gists{/gist_id}","starred_url":"https://api.github.com/users/michalkurka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalkurka/subscriptions","organizations_url":"https://api.github.com/users/michalkurka/orgs","repos_url":"https://api.github.com/users/michalkurka/repos","events_url":"https://api.github.com/users/michalkurka/events{/privacy}","received_events_url":"https://api.github.com/users/michalkurka/received_events","type":"User","site_admin":false},"body":"I would rather do `column.equals(responseColumnName)` - rather be safe and account for the case when responseColumnName would be null","created_at":"2018-03-20T20:39:36Z","updated_at":"2018-03-20T20:39:36Z","html_url":"https://github.com/h2oai/h2o-3/pull/2176#discussion_r175914608","pull_request_url":"https://api.github.com/repos/h2oai/h2o-3/pulls/2176","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/h2oai/h2o-3/pulls/comments/175914608"},"html":{"href":"https://github.com/h2oai/h2o-3/pull/2176#discussion_r175914608"},"pull_request":{"href":"https://api.github.com/repos/h2oai/h2o-3/pulls/2176"}}},"pull_request":{"url":"https://api.github.com/repos/h2oai/h2o-3/pulls/2176","id":176031164,"html_url":"https://github.com/h2oai/h2o-3/pull/2176","diff_url":"https://github.com/h2oai/h2o-3/pull/2176.diff","patch_url":"https://github.com/h2oai/h2o-3/pull/2176.patch","issue_url":"https://api.github.com/repos/h2oai/h2o-3/issues/2176","number":2176,"state":"open","locked":false,"title":"CountingErrorConsumer gathers data transformation errors per column","user":{"login":"Pscheidl","id":8769110,"avatar_url":"https://avatars3.githubusercontent.com/u/8769110?v=4","gravatar_id":"","url":"https://api.github.com/users/Pscheidl","html_url":"https://github.com/Pscheidl","followers_url":"https://api.github.com/users/Pscheidl/followers","following_url":"https://api.github.com/users/Pscheidl/following{/other_user}","gists_url":"https://api.github.com/users/Pscheidl/gists{/gist_id}","starred_url":"https://api.github.com/users/Pscheidl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pscheidl/subscriptions","organizations_url":"https://api.github.com/users/Pscheidl/orgs","repos_url":"https://api.github.com/users/Pscheidl/repos","events_url":"https://api.github.com/users/Pscheidl/events{/privacy}","received_events_url":"https://api.github.com/users/Pscheidl/received_events","type":"User","site_admin":false},"body":"Today, during a call with customer, I discovered that our `CountingErrorConsumer` is not gathering data per column when it comes to transformation errors.\r\n\r\nThis quick PR fixes it.","created_at":"2018-03-19T21:31:11Z","updated_at":"2018-03-20T20:39:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0cdd25881fa73dcaa210d44eb9504db2118948f","assignee":{"login":"Pscheidl","id":8769110,"avatar_url":"https://avatars3.githubusercontent.com/u/8769110?v=4","gravatar_id":"","url":"https://api.github.com/users/Pscheidl","html_url":"https://github.com/Pscheidl","followers_url":"https://api.github.com/users/Pscheidl/followers","following_url":"https://api.github.com/users/Pscheidl/following{/other_user}","gists_url":"https://api.github.com/users/Pscheidl/gists{/gist_id}","starred_url":"https://api.github.com/users/Pscheidl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pscheidl/subscriptions","organizations_url":"https://api.github.com/users/Pscheidl/orgs","repos_url":"https://api.github.com/users/Pscheidl/repos","events_url":"https://api.github.com/users/Pscheidl/events{/privacy}","received_events_url":"https://api.github.com/users/Pscheidl/received_events","type":"User","site_admin":false},"assignees":[{"login":"Pscheidl","id":8769110,"avatar_url":"https://avatars3.githubusercontent.com/u/8769110?v=4","gravatar_id":"","url":"https://api.github.com/users/Pscheidl","html_url":"https://github.com/Pscheidl","followers_url":"https://api.github.com/users/Pscheidl/followers","following_url":"https://api.github.com/users/Pscheidl/following{/other_user}","gists_url":"https://api.github.com/users/Pscheidl/gists{/gist_id}","starred_url":"https://api.github.com/users/Pscheidl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pscheidl/subscriptions","organizations_url":"https://api.github.com/users/Pscheidl/orgs","repos_url":"https://api.github.com/users/Pscheidl/repos","events_url":"https://api.github.com/users/Pscheidl/events{/privacy}","received_events_url":"https://api.github.com/users/Pscheidl/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"tomkraljevic","id":4442567,"avatar_url":"https://avatars0.githubusercontent.com/u/4442567?v=4","gravatar_id":"","url":"https://api.github.com/users/tomkraljevic","html_url":"https://github.com/tomkraljevic","followers_url":"https://api.github.com/users/tomkraljevic/followers","following_url":"https://api.github.com/users/tomkraljevic/following{/other_user}","gists_url":"https://api.github.com/users/tomkraljevic/gists{/gist_id}","starred_url":"https://api.github.com/users/tomkraljevic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomkraljevic/subscriptions","organizations_url":"https://api.github.com/users/tomkraljevic/orgs","repos_url":"https://api.github.com/users/tomkraljevic/repos","events_url":"https://api.github.com/users/tomkraljevic/events{/privacy}","received_events_url":"https://api.github.com/users/tomkraljevic/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/h2oai/h2o-3/pulls/2176/commits","review_comments_url":"https://api.github.com/repos/h2oai/h2o-3/pulls/2176/comments","review_comment_url":"https://api.github.com/repos/h2oai/h2o-3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/h2oai/h2o-3/issues/2176/comments","statuses_url":"https://api.github.com/repos/h2oai/h2o-3/statuses/396cb64ac6c7a5f4ce7acf59e03718420af4ba58","head":{"label":"h2oai:pavel_counting_transformations_errors_consumer","ref":"pavel_counting_transformations_errors_consumer","sha":"396cb64ac6c7a5f4ce7acf59e03718420af4ba58","user":{"login":"h2oai","id":1402695,"avatar_url":"https://avatars2.githubusercontent.com/u/1402695?v=4","gravatar_id":"","url":"https://api.github.com/users/h2oai","html_url":"https://github.com/h2oai","followers_url":"https://api.github.com/users/h2oai/followers","following_url":"https://api.github.com/users/h2oai/following{/other_user}","gists_url":"https://api.github.com/users/h2oai/gists{/gist_id}","starred_url":"https://api.github.com/users/h2oai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h2oai/subscriptions","organizations_url":"https://api.github.com/users/h2oai/orgs","repos_url":"https://api.github.com/users/h2oai/repos","events_url":"https://api.github.com/users/h2oai/events{/privacy}","received_events_url":"https://api.github.com/users/h2oai/received_events","type":"Organization","site_admin":false},"repo":{"id":17371412,"name":"h2o-3","full_name":"h2oai/h2o-3","owner":{"login":"h2oai","id":1402695,"avatar_url":"https://avatars2.githubusercontent.com/u/1402695?v=4","gravatar_id":"","url":"https://api.github.com/users/h2oai","html_url":"https://github.com/h2oai","followers_url":"https://api.github.com/users/h2oai/followers","following_url":"https://api.github.com/users/h2oai/following{/other_user}","gists_url":"https://api.github.com/users/h2oai/gists{/gist_id}","starred_url":"https://api.github.com/users/h2oai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h2oai/subscriptions","organizations_url":"https://api.github.com/users/h2oai/orgs","repos_url":"https://api.github.com/users/h2oai/repos","events_url":"https://api.github.com/users/h2oai/events{/privacy}","received_events_url":"https://api.github.com/users/h2oai/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/h2oai/h2o-3","description":"Open Source Fast Scalable Machine Learning Platform For Smarter Applications (Deep Learning, Gradient Boosting, Random Forest, Generalized Linear Modeling (Logistic Regression, Elastic Net), K-Means, PCA, Stacked Ensembles, Automatic Machine Learning (AutoML), ...)","fork":false,"url":"https://api.github.com/repos/h2oai/h2o-3","forks_url":"https://api.github.com/repos/h2oai/h2o-3/forks","keys_url":"https://api.github.com/repos/h2oai/h2o-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/h2oai/h2o-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/h2oai/h2o-3/teams","hooks_url":"https://api.github.com/repos/h2oai/h2o-3/hooks","issue_events_url":"https://api.github.com/repos/h2oai/h2o-3/issues/events{/number}","events_url":"https://api.github.com/repos/h2oai/h2o-3/events","assignees_url":"https://api.github.com/repos/h2oai/h2o-3/assignees{/user}","branches_url":"https://api.github.com/repos/h2oai/h2o-3/branches{/branch}","tags_url":"https://api.github.com/repos/h2oai/h2o-3/tags","blobs_url":"https://api.github.com/repos/h2oai/h2o-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/h2oai/h2o-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/h2oai/h2o-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/h2oai/h2o-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/h2oai/h2o-3/statuses/{sha}","languages_url":"https://api.github.com/repos/h2oai/h2o-3/languages","stargazers_url":"https://api.github.com/repos/h2oai/h2o-3/stargazers","contributors_url":"https://api.github.com/repos/h2oai/h2o-3/contributors","subscribers_url":"https://api.github.com/repos/h2oai/h2o-3/subscribers","subscription_url":"https://api.github.com/repos/h2oai/h2o-3/subscription","commits_url":"https://api.github.com/repos/h2oai/h2o-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/h2oai/h2o-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/h2oai/h2o-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/h2oai/h2o-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/h2oai/h2o-3/contents/{+path}","compare_url":"https://api.github.com/repos/h2oai/h2o-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/h2oai/h2o-3/merges","archive_url":"https://api.github.com/repos/h2oai/h2o-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/h2oai/h2o-3/downloads","issues_url":"https://api.github.com/repos/h2oai/h2o-3/issues{/number}","pulls_url":"https://api.github.com/repos/h2oai/h2o-3/pulls{/number}","milestones_url":"https://api.github.com/repos/h2oai/h2o-3/milestones{/number}","notifications_url":"https://api.github.com/repos/h2oai/h2o-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/h2oai/h2o-3/labels{/name}","releases_url":"https://api.github.com/repos/h2oai/h2o-3/releases{/id}","deployments_url":"https://api.github.com/repos/h2oai/h2o-3/deployments","created_at":"2014-03-03T16:08:07Z","updated_at":"2018-03-20T20:26:06Z","pushed_at":"2018-03-20T20:27:57Z","git_url":"git://github.com/h2oai/h2o-3.git","ssh_url":"git@github.com:h2oai/h2o-3.git","clone_url":"https://github.com/h2oai/h2o-3.git","svn_url":"https://github.com/h2oai/h2o-3","homepage":"http://h2o.ai","size":427804,"stargazers_count":2939,"watchers_count":2939,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1167,"mirror_url":null,"archived":false,"open_issues_count":61,"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":1167,"open_issues":61,"watchers":2939,"default_branch":"master"}},"base":{"label":"h2oai:master","ref":"master","sha":"4e65ef05821f57978b1830c32a5336f19887df2a","user":{"login":"h2oai","id":1402695,"avatar_url":"https://avatars2.githubusercontent.com/u/1402695?v=4","gravatar_id":"","url":"https://api.github.com/users/h2oai","html_url":"https://github.com/h2oai","followers_url":"https://api.github.com/users/h2oai/followers","following_url":"https://api.github.com/users/h2oai/following{/other_user}","gists_url":"https://api.github.com/users/h2oai/gists{/gist_id}","starred_url":"https://api.github.com/users/h2oai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h2oai/subscriptions","organizations_url":"https://api.github.com/users/h2oai/orgs","repos_url":"https://api.github.com/users/h2oai/repos","events_url":"https://api.github.com/users/h2oai/events{/privacy}","received_events_url":"https://api.github.com/users/h2oai/received_events","type":"Organization","site_admin":false},"repo":{"id":17371412,"name":"h2o-3","full_name":"h2oai/h2o-3","owner":{"login":"h2oai","id":1402695,"avatar_url":"https://avatars2.githubusercontent.com/u/1402695?v=4","gravatar_id":"","url":"https://api.github.com/users/h2oai","html_url":"https://github.com/h2oai","followers_url":"https://api.github.com/users/h2oai/followers","following_url":"https://api.github.com/users/h2oai/following{/other_user}","gists_url":"https://api.github.com/users/h2oai/gists{/gist_id}","starred_url":"https://api.github.com/users/h2oai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h2oai/subscriptions","organizations_url":"https://api.github.com/users/h2oai/orgs","repos_url":"https://api.github.com/users/h2oai/repos","events_url":"https://api.github.com/users/h2oai/events{/privacy}","received_events_url":"https://api.github.com/users/h2oai/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/h2oai/h2o-3","description":"Open Source Fast Scalable Machine Learning Platform For Smarter Applications (Deep Learning, Gradient Boosting, Random Forest, Generalized Linear Modeling (Logistic Regression, Elastic Net), K-Means, PCA, Stacked Ensembles, Automatic Machine Learning (AutoML), ...)","fork":false,"url":"https://api.github.com/repos/h2oai/h2o-3","forks_url":"https://api.github.com/repos/h2oai/h2o-3/forks","keys_url":"https://api.github.com/repos/h2oai/h2o-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/h2oai/h2o-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/h2oai/h2o-3/teams","hooks_url":"https://api.github.com/repos/h2oai/h2o-3/hooks","issue_events_url":"https://api.github.com/repos/h2oai/h2o-3/issues/events{/number}","events_url":"https://api.github.com/repos/h2oai/h2o-3/events","assignees_url":"https://api.github.com/repos/h2oai/h2o-3/assignees{/user}","branches_url":"https://api.github.com/repos/h2oai/h2o-3/branches{/branch}","tags_url":"https://api.github.com/repos/h2oai/h2o-3/tags","blobs_url":"https://api.github.com/repos/h2oai/h2o-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/h2oai/h2o-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/h2oai/h2o-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/h2oai/h2o-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/h2oai/h2o-3/statuses/{sha}","languages_url":"https://api.github.com/repos/h2oai/h2o-3/languages","stargazers_url":"https://api.github.com/repos/h2oai/h2o-3/stargazers","contributors_url":"https://api.github.com/repos/h2oai/h2o-3/contributors","subscribers_url":"https://api.github.com/repos/h2oai/h2o-3/subscribers","subscription_url":"https://api.github.com/repos/h2oai/h2o-3/subscription","commits_url":"https://api.github.com/repos/h2oai/h2o-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/h2oai/h2o-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/h2oai/h2o-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/h2oai/h2o-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/h2oai/h2o-3/contents/{+path}","compare_url":"https://api.github.com/repos/h2oai/h2o-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/h2oai/h2o-3/merges","archive_url":"https://api.github.com/repos/h2oai/h2o-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/h2oai/h2o-3/downloads","issues_url":"https://api.github.com/repos/h2oai/h2o-3/issues{/number}","pulls_url":"https://api.github.com/repos/h2oai/h2o-3/pulls{/number}","milestones_url":"https://api.github.com/repos/h2oai/h2o-3/milestones{/number}","notifications_url":"https://api.github.com/repos/h2oai/h2o-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/h2oai/h2o-3/labels{/name}","releases_url":"https://api.github.com/repos/h2oai/h2o-3/releases{/id}","deployments_url":"https://api.github.com/repos/h2oai/h2o-3/deployments","created_at":"2014-03-03T16:08:07Z","updated_at":"2018-03-20T20:26:06Z","pushed_at":"2018-03-20T20:27:57Z","git_url":"git://github.com/h2oai/h2o-3.git","ssh_url":"git@github.com:h2oai/h2o-3.git","clone_url":"https://github.com/h2oai/h2o-3.git","svn_url":"https://github.com/h2oai/h2o-3","homepage":"http://h2o.ai","size":427804,"stargazers_count":2939,"watchers_count":2939,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1167,"mirror_url":null,"archived":false,"open_issues_count":61,"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":1167,"open_issues":61,"watchers":2939,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/h2oai/h2o-3/pulls/2176"},"html":{"href":"https://github.com/h2oai/h2o-3/pull/2176"},"issue":{"href":"https://api.github.com/repos/h2oai/h2o-3/issues/2176"},"comments":{"href":"https://api.github.com/repos/h2oai/h2o-3/issues/2176/comments"},"review_comments":{"href":"https://api.github.com/repos/h2oai/h2o-3/pulls/2176/comments"},"review_comment":{"href":"https://api.github.com/repos/h2oai/h2o-3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/h2oai/h2o-3/pulls/2176/commits"},"statuses":{"href":"https://api.github.com/repos/h2oai/h2o-3/statuses/396cb64ac6c7a5f4ce7acf59e03718420af4ba58"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"michalkurka"}}