Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scalars: speed up test and mark as “medium” #2327

Merged
merged 1 commit into from
Jun 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tensorboard/plugins/scalar/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ py_library(

py_test(
name = "scalars_plugin_test",
size = "small",
size = "medium",
srcs = ["scalars_plugin_test.py"],
main = "scalars_plugin_test.py",
srcs_version = "PY2AND3",
Expand Down
5 changes: 3 additions & 2 deletions tensorboard/plugins/scalar/scalars_plugin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
@test_util.run_v1_only('Requires contrib for db writer or uses op.Placeholder')
class ScalarsPluginTest(tf.test.TestCase):

_STEPS = 99
_STEPS = 9

_LEGACY_SCALAR_TAG = 'ancient-values'
_SCALAR_TAG = 'simple-values'
Expand Down Expand Up @@ -101,9 +101,10 @@ def generate_run_to_db(self, experiment_name, run_name):

with tf.compat.v1.Session() as sess:
sess.run(tf.contrib.summary.summary_writer_initializer_op())
summaries = tf.contrib.summary.all_summary_ops()
for step in xrange(self._STEPS):
feed_dict = {global_step: step}
sess.run(tf.contrib.summary.all_summary_ops(), feed_dict=feed_dict)
sess.run(summaries, feed_dict=feed_dict)
sess.run(flush_op)

def testRoutesProvided(self):
Expand Down