momeara
momeara

Reputation: 1381

Tensorflow Timeline with SKFlow

The Tensorflow Timeline described here is a method of profiling tensorflow runs using the Chrome tracing machinery. However to use it, seems to require setting options in the Session.run() call, e.g.:

with tf.Session() as sess:
    run_options = tf.RunOptions(trace_level=tf.RunOptions.FULL_TRACE)
    run_metadata = tf.RunMetadata()
    sess.run(network, options=run_options, run_metadata=run_metadata)

In SKFlow one usually doesn't have access to the actual Session.run() call. Instead, one calls Estimator.fit(), e.g. from the landing page:

classifier.fit(iris.data, iris.target, steps=200, batch_size=32)

Is it possible to run SKFlow with the full trace option so Tensorflow Timeline can be used? If so, how?

Upvotes: 1

Views: 754

Answers (2)

Jim
Jim

Reputation: 650

TensorFlow contrib contains a ProfilerHook. Since it appears to have been added after 1.0 you may need to use a nightly build or copy the class definition from here.

Upvotes: 1

Yuan Tang
Yuan Tang

Reputation: 696

I am not familiar with TensorFlow Timeline but you can probably look into using SessionRunHook (originally monitors in TF.Learn) to attach with the tf.Session(). Hope this helps.

Upvotes: 0

Related Questions