mxnet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-mxnet] access2rohit commented on a change in pull request #16088: remove 'foo' and other print msg from test
Date Wed, 04 Sep 2019 05:59:28 GMT
access2rohit commented on a change in pull request #16088: remove 'foo' and other print msg
from test
URL: https://github.com/apache/incubator-mxnet/pull/16088#discussion_r320583826
 
 

 ##########
 File path: tests/python/unittest/test_profiler.py
 ##########
 @@ -152,23 +151,24 @@ def makeParams():
         template = ''.join('{%d}' % i for i in range(len(objects)))
         return template, objects
 
-    def doLog():
+    def get_log():
         template, objects = makeParams()
+        logs = []
         for _ in range(100000):
-            logging.info(template.format(*objects))
+            logs.append(template.format(*objects))
+        return logs
 
-    logging.basicConfig()
     if do_enable_profiler is True:
         enable_profiler('test_profile_event.json')
     event = profiler.Event("test_profile_event")
     event.start()
     start = time.time()
     var = mx.nd.ones((1000, 500))
-    doLog()
+    assert len(get_log()) == 100000
     var.asnumpy()
     stop = time.time()
     event.stop()
-    print('run took: %.3f' % (stop - start))
 
 Review comment:
   if this is printed only once do we need to remove it ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message