cjolivier01 commented on a change in pull request #8972: Profiling 
enhancements, python API, vtune and chrome tracing objects, etc.
URL: https://github.com/apache/incubator-mxnet/pull/8972#discussion_r174309509
 
 

 ##########
 File path: python/mxnet/profiler.py
 ##########
 @@ -35,13 +68,16 @@ def profiler_set_config(mode='symbolic', 
filename='profile.json'):
     filename : string, optional
         The name of output trace file. Defaults to 'profile.json'.
     """
-    mode2int = {'symbolic': 0, 'all': 1}
-    check_call(_LIB.MXSetProfilerConfig(
-        ctypes.c_int(mode2int[mode]),
-        c_str(filename)))
+    warnings.warn('profiler.profiler_set_config() is deprecated. ' \
+                  'Please use profiler.set_config() instead')
+    keys = c_str_array([key for key in ["profile_" + mode, "filename"]])
+    values = c_str_array([str(val) for val in [True, filename]])
+    assert len(keys) == len(values)
+    check_call(_LIB.MXSetProfilerConfig(len(keys), keys, values))
+
 
-def profiler_set_state(state='stop'):
 
 Review comment:
   That change was suggested by Eric, so please take that up with him

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


With regards,
Apache Git Services

Reply via email to