Exemplo n.º 1
0
 def tags_impl(self, ctx, experiment):
     mapping = self._data_provider.list_tensors(
         ctx, experiment_id=experiment, plugin_name=self.plugin_name)
     result = {run: {} for run in mapping}
     for (run, tag_to_content) in mapping.items():
         result[run] = []
         for (tag, metadatum) in tag_to_content.items():
             md = metadata.parse_plugin_metadata(metadatum.plugin_content)
             if not self._version_checker.ok(md.version, run, tag):
                 continue
             content = metadata.parse_plugin_metadata(
                 metadatum.plugin_content)
             result[run].append(tag)
     return result
Exemplo n.º 2
0
 def tags_impl(self, ctx, experiment):
     mapping = self._data_provider.list_tensors(
         ctx, experiment_id=experiment, plugin_name=self.plugin_name)
     result = {run: {} for run in mapping}
     for (run, tag_to_content) in six.iteritems(mapping):
         result[run] = []
         for (tag, metadatum) in six.iteritems(tag_to_content):
             content = metadata.parse_plugin_metadata(
                 metadatum.plugin_content)
             result[run].append(tag)
     return result
Exemplo n.º 3
0
 def testMetadata(self):
     data = metadata.create_summary_metadata(None)
     plugin_data = data.plugin_data
     content = plugin_data.content
     metadata_content = metadata.parse_plugin_metadata(content)
     self.assertEqual(data.plugin_data.plugin_name, "npmi")