Lets just not log wonky histos
@@ -215,6 +215,7 @@ def tf_summary_to_dict(tf_summary_str_or_pb, namespace=""):
# audio = wandb.Audio(six.BytesIO(value.audio.encoded_audio_string),
# sample_rate=value.audio.sample_rate, content_type=value.audio.content_type)
elif kind == "histo":
+ tag = namespaced_tag(value.tag, namespace)
if len(value.histo.bucket_limit) >= 3:
first = value.histo.bucket_limit[0] + \
value.histo.bucket_limit[0] - value.histo.bucket_limit[1]
@@ -222,12 +223,6 @@ def tf_summary_to_dict(tf_summary_str_or_pb, namespace=""):
value.histo.bucket_limit[-2] - value.histo.bucket_limit[-3]
np_histogram = (list(value.histo.bucket), [
first] + value.histo.bucket_limit[:-1] + [last])
- else:
- first = value.histo.bucket_limit[0]
- last = value.histo.bucket_limit[-1]
- np_histogram = (list(value.histo.bucket), [
- first] + value.histo.bucket_limit[:-1] + [last])
- tag = namespaced_tag(value.tag, namespace)
try:
#TODO: we should just re-bin if there are too many buckets
values[tag] = wandb.Histogram(
@@ -235,6 +230,9 @@ def tf_summary_to_dict(tf_summary_str_or_pb, namespace=""):
except ValueError:
wandb.termwarn("Not logging key \"{}\". Histograms must have fewer than {} bins".format(
tag, wandb.Histogram.MAX_LENGTH), repeat=False)
+ else:
+ #TODO: is there a case where we can render this?
+ wandb.termwarn("Not logging key \"{}\". Found a histogram with only 2 bins.".format(tag), repeat=False)
elif value.tag == "_hparams_/session_start_info":
if wandb.util.get_module("tensorboard.plugins.hparams"):
from tensorboard.plugins.hparams import plugin_data_pb2
