Return-Path: X-Original-To: apmail-singa-dev-archive@minotaur.apache.org Delivered-To: apmail-singa-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 05A3018895 for ; Sun, 2 Aug 2015 15:07:06 +0000 (UTC) Received: (qmail 22027 invoked by uid 500); 2 Aug 2015 15:07:06 -0000 Delivered-To: apmail-singa-dev-archive@singa.apache.org Received: (qmail 22002 invoked by uid 500); 2 Aug 2015 15:07:05 -0000 Mailing-List: contact dev-help@singa.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@singa.incubator.apache.org Delivered-To: mailing list dev@singa.incubator.apache.org Received: (qmail 21992 invoked by uid 99); 2 Aug 2015 15:07:05 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Aug 2015 15:07:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 7CDD7C0099 for ; Sun, 2 Aug 2015 15:07:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.97 X-Spam-Level: X-Spam-Status: No, score=0.97 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 7iWDY-ZSnhIk for ; Sun, 2 Aug 2015 15:07:05 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id B924125073 for ; Sun, 2 Aug 2015 15:07:04 +0000 (UTC) Received: (qmail 21987 invoked by uid 99); 2 Aug 2015 15:07:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Aug 2015 15:07:04 +0000 Date: Sun, 2 Aug 2015 15:07:04 +0000 (UTC) From: "Zheng Kaiping (JIRA)" To: dev@singa.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (SINGA-44) A bug when reseting metric values MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Zheng Kaiping created SINGA-44: ---------------------------------- Summary: A bug when reseting metric values Key: SINGA-44 URL: https://issues.apache.org/jira/browse/SINGA-44 Project: Singa Issue Type: Bug Reporter: Zheng Kaiping In /src/utils/common.cc, inside the loop of "void Metric::Reset()" function, the reference of entry needs to be reset instead of the variable. Previous: for(auto e : entry_) Fix the bug: for(auto &e : entry_) If we use the previous reset method, the metric value is output as an average value for all minibatches. Then even if we have set the frequency to output metrics in job.conf (which means we need the average metric values every several minibatches), the output results are incorrect. Therefore, the previous reset method causes invalid metric value resetting operation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)