Example #1
0
 def test_pb_contents(self):
     result = hp.hparams_config_pb(
         hparams=self.hparams,
         metrics=self.metrics,
         time_created_secs=self.time_created_secs,
     )
     self._check_summary(result)
Example #2
0
def _HParamExperiment(hparams, metrics):
    from tensorboard.plugins.hparams import summary_v2 as hp

    return hp.hparams_config_pb(
        hparams=[_HParam(key, vals) for key, vals in hparams.items()],
        metrics=[hp.Metric(tag) for tag in metrics],
    )
Example #3
0
 def test_pb_is_tensorboard_copy_of_proto(self):
     result = hp.hparams_config_pb(
         hparams=self.hparams,
         metrics=self.metrics,
         time_created_secs=self.time_created_secs,
     )
     self.assertIsInstance(result, summary_pb2.Summary)
     self.assertNotIsInstance(result, tf.compat.v1.Summary)
Example #4
0
def Experiment(hparams, metrics):
    return hp.hparams_config_pb(
        hparams=[HParam(name, vals) for name, vals in hparams.items()],
        metrics=[Metric(name) for name in metrics])