Browse Source

Fix bug: patch to make hoc available

tags/v1.2.0-rc1
lixiaohui 4 years ago
parent
commit
f5d2a46356
2 changed files with 153 additions and 21 deletions
  1. +22
    -0
      mindinsight/datavisual/data_transform/summary_watcher.py
  2. +131
    -21
      mindinsight/datavisual/proto_files/mindinsight_summary_pb2.py

+ 22
- 0
mindinsight/datavisual/data_transform/summary_watcher.py View File

@@ -14,6 +14,7 @@
# ============================================================================ # ============================================================================
"""Summary watcher module.""" """Summary watcher module."""
import json
import os import os
import re import re
import datetime import datetime
@@ -214,11 +215,18 @@ class SummaryWatcher:
if relative_path not in summary_dict: if relative_path not in summary_dict:
summary_dict[relative_path] = _new_entry(ctime, mtime) summary_dict[relative_path] = _new_entry(ctime, mtime)
job_dict = _get_explain_job_info(summary_base_dir, relative_path, timestamp)
summary_dict[relative_path].update(job_dict)
if summary_dict[relative_path]['create_time'] < ctime: if summary_dict[relative_path]['create_time'] < ctime:
summary_dict[relative_path].update({ summary_dict[relative_path].update({
'create_time': ctime, 'create_time': ctime,
'update_time': mtime, 'update_time': mtime,
}) })
job_dict = _get_explain_job_info(summary_base_dir, relative_path, timestamp)
summary_dict[relative_path].update(job_dict)
if not summary_pattern: if not summary_pattern:
summary_dict[relative_path]['graph_files'] += 1 summary_dict[relative_path]['graph_files'] += 1
elif entry.name.endswith(LINEAGE_SUMMARY_SUFFIX): elif entry.name.endswith(LINEAGE_SUMMARY_SUFFIX):
@@ -476,3 +484,17 @@ def _new_entry(ctime, mtime, profiler=None):
'graph_files': 0, 'graph_files': 0,
'profiler': profiler 'profiler': profiler
} }
def _get_explain_job_info(summary_base_dir, relative_path, timestamp):
"""Get explain job info."""
json_path = os.path.join(summary_base_dir, relative_path.lstrip("./"), f"_explain_{timestamp}",
"manifest.json")
if os.path.exists(json_path):
with open(json_path, "r") as f:
job_dict = json.load(f)
return job_dict
# Set default value to make it compatible with previous version
job_dict = {"saliency_map": True, "hierarchical_occlusion": False}
return job_dict

+ 131
- 21
mindinsight/datavisual/proto_files/mindinsight_summary_pb2.py View File

@@ -2,6 +2,8 @@
# Generated by the protocol buffer compiler. DO NOT EDIT! # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mindinsight_summary.proto # source: mindinsight_summary.proto


import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
@@ -18,8 +20,8 @@ DESCRIPTOR = _descriptor.FileDescriptor(
name='mindinsight_summary.proto', name='mindinsight_summary.proto',
package='mindinsight', package='mindinsight',
syntax='proto2', syntax='proto2',
serialized_options=b'\370\001\001',
serialized_pb=b'\n\x19mindinsight_summary.proto\x12\x0bmindinsight\x1a\x18mindinsight_anf_ir.proto\"\xc3\x01\n\x05\x45vent\x12\x11\n\twall_time\x18\x01 \x02(\x01\x12\x0c\n\x04step\x18\x02 \x01(\x03\x12\x11\n\x07version\x18\x03 \x01(\tH\x00\x12,\n\tgraph_def\x18\x04 \x01(\x0b\x32\x17.mindinsight.GraphProtoH\x00\x12\'\n\x07summary\x18\x05 \x01(\x0b\x32\x14.mindinsight.SummaryH\x00\x12\'\n\x07\x65xplain\x18\x06 \x01(\x0b\x32\x14.mindinsight.ExplainH\x00\x42\x06\n\x04what\"\xc0\x04\n\x07Summary\x12)\n\x05value\x18\x01 \x03(\x0b\x32\x1a.mindinsight.Summary.Value\x1aQ\n\x05Image\x12\x0e\n\x06height\x18\x01 \x02(\x05\x12\r\n\x05width\x18\x02 \x02(\x05\x12\x12\n\ncolorspace\x18\x03 \x02(\x05\x12\x15\n\rencoded_image\x18\x04 \x02(\x0c\x1a\xf0\x01\n\tHistogram\x12\x36\n\x07\x62uckets\x18\x01 \x03(\x0b\x32%.mindinsight.Summary.Histogram.bucket\x12\x11\n\tnan_count\x18\x02 \x01(\x03\x12\x15\n\rpos_inf_count\x18\x03 \x01(\x03\x12\x15\n\rneg_inf_count\x18\x04 \x01(\x03\x12\x0b\n\x03max\x18\x05 \x01(\x01\x12\x0b\n\x03min\x18\x06 \x01(\x01\x12\x0b\n\x03sum\x18\x07 \x01(\x01\x12\r\n\x05\x63ount\x18\x08 \x01(\x03\x1a\x34\n\x06\x62ucket\x12\x0c\n\x04left\x18\x01 \x02(\x01\x12\r\n\x05width\x18\x02 \x02(\x01\x12\r\n\x05\x63ount\x18\x03 \x02(\x03\x1a\xc3\x01\n\x05Value\x12\x0b\n\x03tag\x18\x01 \x02(\t\x12\x16\n\x0cscalar_value\x18\x03 \x01(\x02H\x00\x12+\n\x05image\x18\x04 \x01(\x0b\x32\x1a.mindinsight.Summary.ImageH\x00\x12*\n\x06tensor\x18\x08 \x01(\x0b\x32\x18.mindinsight.TensorProtoH\x00\x12\x33\n\thistogram\x18\t \x01(\x0b\x32\x1e.mindinsight.Summary.HistogramH\x00\x42\x07\n\x05value\"\xcb\x06\n\x07\x45xplain\x12\x11\n\tsample_id\x18\x01 \x01(\x05\x12\x12\n\nimage_path\x18\x02 \x01(\t\x12\x1a\n\x12ground_truth_label\x18\x03 \x03(\x05\x12\x31\n\tinference\x18\x04 \x01(\x0b\x32\x1e.mindinsight.Explain.Inference\x12\x35\n\x0b\x65xplanation\x18\x05 \x03(\x0b\x32 .mindinsight.Explain.Explanation\x12\x31\n\tbenchmark\x18\x06 \x03(\x0b\x32\x1e.mindinsight.Explain.Benchmark\x12/\n\x08metadata\x18\x07 \x01(\x0b\x32\x1d.mindinsight.Explain.Metadata\x12\x0e\n\x06status\x18\x08 \x01(\t\x1a\x9c\x02\n\tInference\x12\x19\n\x11ground_truth_prob\x18\x01 \x03(\x02\x12\x17\n\x0fpredicted_label\x18\x02 \x03(\x05\x12\x16\n\x0epredicted_prob\x18\x03 \x03(\x02\x12\x1c\n\x14ground_truth_prob_sd\x18\x04 \x03(\x02\x12#\n\x1bground_truth_prob_itl95_low\x18\x05 \x03(\x02\x12\"\n\x1aground_truth_prob_itl95_hi\x18\x06 \x03(\x02\x12\x19\n\x11predicted_prob_sd\x18\x07 \x03(\x02\x12 \n\x18predicted_prob_itl95_low\x18\x08 \x03(\x02\x12\x1f\n\x17predicted_prob_itl95_hi\x18\t \x03(\x02\x1aJ\n\x0b\x45xplanation\x12\x16\n\x0e\x65xplain_method\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\x05\x12\x14\n\x0cheatmap_path\x18\x03 \x01(\t\x1ag\n\tBenchmark\x12\x18\n\x10\x62\x65nchmark_method\x18\x01 \x01(\t\x12\x16\n\x0e\x65xplain_method\x18\x02 \x01(\t\x12\x13\n\x0btotal_score\x18\x03 \x01(\x02\x12\x13\n\x0blabel_score\x18\x04 \x03(\x02\x1aK\n\x08Metadata\x12\r\n\x05label\x18\x01 \x03(\t\x12\x16\n\x0e\x65xplain_method\x18\x02 \x03(\t\x12\x18\n\x10\x62\x65nchmark_method\x18\x03 \x03(\tB\x03\xf8\x01\x01'
serialized_options=_b('\370\001\001'),
serialized_pb=_b('\n\x19mindinsight_summary.proto\x12\x0bmindinsight\x1a\x18mindinsight_anf_ir.proto\"\xc3\x01\n\x05\x45vent\x12\x11\n\twall_time\x18\x01 \x02(\x01\x12\x0c\n\x04step\x18\x02 \x01(\x03\x12\x11\n\x07version\x18\x03 \x01(\tH\x00\x12,\n\tgraph_def\x18\x04 \x01(\x0b\x32\x17.mindinsight.GraphProtoH\x00\x12\'\n\x07summary\x18\x05 \x01(\x0b\x32\x14.mindinsight.SummaryH\x00\x12\'\n\x07\x65xplain\x18\x06 \x01(\x0b\x32\x14.mindinsight.ExplainH\x00\x42\x06\n\x04what\"\xc0\x04\n\x07Summary\x12)\n\x05value\x18\x01 \x03(\x0b\x32\x1a.mindinsight.Summary.Value\x1aQ\n\x05Image\x12\x0e\n\x06height\x18\x01 \x02(\x05\x12\r\n\x05width\x18\x02 \x02(\x05\x12\x12\n\ncolorspace\x18\x03 \x02(\x05\x12\x15\n\rencoded_image\x18\x04 \x02(\x0c\x1a\xf0\x01\n\tHistogram\x12\x36\n\x07\x62uckets\x18\x01 \x03(\x0b\x32%.mindinsight.Summary.Histogram.bucket\x12\x11\n\tnan_count\x18\x02 \x01(\x03\x12\x15\n\rpos_inf_count\x18\x03 \x01(\x03\x12\x15\n\rneg_inf_count\x18\x04 \x01(\x03\x12\x0b\n\x03max\x18\x05 \x01(\x01\x12\x0b\n\x03min\x18\x06 \x01(\x01\x12\x0b\n\x03sum\x18\x07 \x01(\x01\x12\r\n\x05\x63ount\x18\x08 \x01(\x03\x1a\x34\n\x06\x62ucket\x12\x0c\n\x04left\x18\x01 \x02(\x01\x12\r\n\x05width\x18\x02 \x02(\x01\x12\r\n\x05\x63ount\x18\x03 \x02(\x03\x1a\xc3\x01\n\x05Value\x12\x0b\n\x03tag\x18\x01 \x02(\t\x12\x16\n\x0cscalar_value\x18\x03 \x01(\x02H\x00\x12+\n\x05image\x18\x04 \x01(\x0b\x32\x1a.mindinsight.Summary.ImageH\x00\x12*\n\x06tensor\x18\x08 \x01(\x0b\x32\x18.mindinsight.TensorProtoH\x00\x12\x33\n\thistogram\x18\t \x01(\x0b\x32\x1e.mindinsight.Summary.HistogramH\x00\x42\x07\n\x05value\"\xeb\x07\n\x07\x45xplain\x12\x11\n\tsample_id\x18\x01 \x01(\x05\x12\x12\n\nimage_path\x18\x02 \x01(\t\x12\x1a\n\x12ground_truth_label\x18\x03 \x03(\x05\x12\x31\n\tinference\x18\x04 \x01(\x0b\x32\x1e.mindinsight.Explain.Inference\x12\x35\n\x0b\x65xplanation\x18\x05 \x03(\x0b\x32 .mindinsight.Explain.Explanation\x12\x31\n\tbenchmark\x18\x06 \x03(\x0b\x32\x1e.mindinsight.Explain.Benchmark\x12/\n\x08metadata\x18\x07 \x01(\x0b\x32\x1d.mindinsight.Explain.Metadata\x12\x0e\n\x06status\x18\x08 \x01(\t\x12%\n\x03hoc\x18\t \x03(\x0b\x32\x18.mindinsight.Explain.Hoc\x1a\x9c\x02\n\tInference\x12\x19\n\x11ground_truth_prob\x18\x01 \x03(\x02\x12\x17\n\x0fpredicted_label\x18\x02 \x03(\x05\x12\x16\n\x0epredicted_prob\x18\x03 \x03(\x02\x12\x1c\n\x14ground_truth_prob_sd\x18\x04 \x03(\x02\x12#\n\x1bground_truth_prob_itl95_low\x18\x05 \x03(\x02\x12\"\n\x1aground_truth_prob_itl95_hi\x18\x06 \x03(\x02\x12\x19\n\x11predicted_prob_sd\x18\x07 \x03(\x02\x12 \n\x18predicted_prob_itl95_low\x18\x08 \x03(\x02\x12\x1f\n\x17predicted_prob_itl95_hi\x18\t \x03(\x02\x1aJ\n\x0b\x45xplanation\x12\x16\n\x0e\x65xplain_method\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\x05\x12\x14\n\x0cheatmap_path\x18\x03 \x01(\t\x1ag\n\tBenchmark\x12\x18\n\x10\x62\x65nchmark_method\x18\x01 \x01(\t\x12\x16\n\x0e\x65xplain_method\x18\x02 \x01(\t\x12\x13\n\x0btotal_score\x18\x03 \x01(\x02\x12\x13\n\x0blabel_score\x18\x04 \x03(\x02\x1aK\n\x08Metadata\x12\r\n\x05label\x18\x01 \x03(\t\x12\x16\n\x0e\x65xplain_method\x18\x02 \x03(\t\x12\x18\n\x10\x62\x65nchmark_method\x18\x03 \x03(\t\x1a%\n\x08HocLayer\x12\x0c\n\x04prob\x18\x01 \x01(\x02\x12\x0b\n\x03\x62ox\x18\x02 \x03(\x05\x1aP\n\x03Hoc\x12\r\n\x05label\x18\x01 \x01(\x05\x12\x0c\n\x04mask\x18\x02 \x01(\t\x12,\n\x05layer\x18\x03 \x03(\x0b\x32\x1d.mindinsight.Explain.HocLayerB\x03\xf8\x01\x01')
, ,
dependencies=[mindinsight__anf__ir__pb2.DESCRIPTOR,]) dependencies=[mindinsight__anf__ir__pb2.DESCRIPTOR,])


@@ -50,7 +52,7 @@ _EVENT = _descriptor.Descriptor(
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='version', full_name='mindinsight.Event.version', index=2, name='version', full_name='mindinsight.Event.version', index=2,
number=3, type=9, cpp_type=9, label=1, number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR), serialized_options=None, file=DESCRIPTOR),
@@ -126,7 +128,7 @@ _SUMMARY_IMAGE = _descriptor.Descriptor(
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='encoded_image', full_name='mindinsight.Summary.Image.encoded_image', index=3, name='encoded_image', full_name='mindinsight.Summary.Image.encoded_image', index=3,
number=4, type=12, cpp_type=9, label=2, number=4, type=12, cpp_type=9, label=2,
has_default_value=False, default_value=b"",
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR), serialized_options=None, file=DESCRIPTOR),
@@ -279,7 +281,7 @@ _SUMMARY_VALUE = _descriptor.Descriptor(
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='tag', full_name='mindinsight.Summary.Value.tag', index=0, name='tag', full_name='mindinsight.Summary.Value.tag', index=0,
number=1, type=9, cpp_type=9, label=2, number=1, type=9, cpp_type=9, label=2,
has_default_value=False, default_value=b"".decode('utf-8'),
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR), serialized_options=None, file=DESCRIPTOR),
@@ -443,8 +445,8 @@ _EXPLAIN_INFERENCE = _descriptor.Descriptor(
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
serialized_start=1147,
serialized_end=1431,
serialized_start=1186,
serialized_end=1470,
) )


_EXPLAIN_EXPLANATION = _descriptor.Descriptor( _EXPLAIN_EXPLANATION = _descriptor.Descriptor(
@@ -457,7 +459,7 @@ _EXPLAIN_EXPLANATION = _descriptor.Descriptor(
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='explain_method', full_name='mindinsight.Explain.Explanation.explain_method', index=0, name='explain_method', full_name='mindinsight.Explain.Explanation.explain_method', index=0,
number=1, type=9, cpp_type=9, label=1, number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR), serialized_options=None, file=DESCRIPTOR),
@@ -471,7 +473,7 @@ _EXPLAIN_EXPLANATION = _descriptor.Descriptor(
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='heatmap_path', full_name='mindinsight.Explain.Explanation.heatmap_path', index=2, name='heatmap_path', full_name='mindinsight.Explain.Explanation.heatmap_path', index=2,
number=3, type=9, cpp_type=9, label=1, number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR), serialized_options=None, file=DESCRIPTOR),
@@ -487,8 +489,8 @@ _EXPLAIN_EXPLANATION = _descriptor.Descriptor(
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
serialized_start=1433,
serialized_end=1507,
serialized_start=1472,
serialized_end=1546,
) )


_EXPLAIN_BENCHMARK = _descriptor.Descriptor( _EXPLAIN_BENCHMARK = _descriptor.Descriptor(
@@ -501,14 +503,14 @@ _EXPLAIN_BENCHMARK = _descriptor.Descriptor(
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='benchmark_method', full_name='mindinsight.Explain.Benchmark.benchmark_method', index=0, name='benchmark_method', full_name='mindinsight.Explain.Benchmark.benchmark_method', index=0,
number=1, type=9, cpp_type=9, label=1, number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR), serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='explain_method', full_name='mindinsight.Explain.Benchmark.explain_method', index=1, name='explain_method', full_name='mindinsight.Explain.Benchmark.explain_method', index=1,
number=2, type=9, cpp_type=9, label=1, number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR), serialized_options=None, file=DESCRIPTOR),
@@ -538,8 +540,8 @@ _EXPLAIN_BENCHMARK = _descriptor.Descriptor(
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
serialized_start=1509,
serialized_end=1612,
serialized_start=1548,
serialized_end=1651,
) )


_EXPLAIN_METADATA = _descriptor.Descriptor( _EXPLAIN_METADATA = _descriptor.Descriptor(
@@ -582,8 +584,89 @@ _EXPLAIN_METADATA = _descriptor.Descriptor(
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
serialized_start=1614,
serialized_end=1689,
serialized_start=1653,
serialized_end=1728,
)

_EXPLAIN_HOCLAYER = _descriptor.Descriptor(
name='HocLayer',
full_name='mindinsight.Explain.HocLayer',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='prob', full_name='mindinsight.Explain.HocLayer.prob', index=0,
number=1, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='box', full_name='mindinsight.Explain.HocLayer.box', index=1,
number=2, type=5, cpp_type=1, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=1730,
serialized_end=1767,
)

_EXPLAIN_HOC = _descriptor.Descriptor(
name='Hoc',
full_name='mindinsight.Explain.Hoc',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='label', full_name='mindinsight.Explain.Hoc.label', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='mask', full_name='mindinsight.Explain.Hoc.mask', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='layer', full_name='mindinsight.Explain.Hoc.layer', index=2,
number=3, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=1769,
serialized_end=1849,
) )


_EXPLAIN = _descriptor.Descriptor( _EXPLAIN = _descriptor.Descriptor(
@@ -603,7 +686,7 @@ _EXPLAIN = _descriptor.Descriptor(
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='image_path', full_name='mindinsight.Explain.image_path', index=1, name='image_path', full_name='mindinsight.Explain.image_path', index=1,
number=2, type=9, cpp_type=9, label=1, number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR), serialized_options=None, file=DESCRIPTOR),
@@ -645,14 +728,21 @@ _EXPLAIN = _descriptor.Descriptor(
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='status', full_name='mindinsight.Explain.status', index=7, name='status', full_name='mindinsight.Explain.status', index=7,
number=8, type=9, cpp_type=9, label=1, number=8, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='hoc', full_name='mindinsight.Explain.hoc', index=8,
number=9, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR), serialized_options=None, file=DESCRIPTOR),
], ],
extensions=[ extensions=[
], ],
nested_types=[_EXPLAIN_INFERENCE, _EXPLAIN_EXPLANATION, _EXPLAIN_BENCHMARK, _EXPLAIN_METADATA, ],
nested_types=[_EXPLAIN_INFERENCE, _EXPLAIN_EXPLANATION, _EXPLAIN_BENCHMARK, _EXPLAIN_METADATA, _EXPLAIN_HOCLAYER, _EXPLAIN_HOC, ],
enum_types=[ enum_types=[
], ],
serialized_options=None, serialized_options=None,
@@ -662,7 +752,7 @@ _EXPLAIN = _descriptor.Descriptor(
oneofs=[ oneofs=[
], ],
serialized_start=846, serialized_start=846,
serialized_end=1689,
serialized_end=1849,
) )


_EVENT.fields_by_name['graph_def'].message_type = mindinsight__anf__ir__pb2._GRAPHPROTO _EVENT.fields_by_name['graph_def'].message_type = mindinsight__anf__ir__pb2._GRAPHPROTO
@@ -705,10 +795,14 @@ _EXPLAIN_INFERENCE.containing_type = _EXPLAIN
_EXPLAIN_EXPLANATION.containing_type = _EXPLAIN _EXPLAIN_EXPLANATION.containing_type = _EXPLAIN
_EXPLAIN_BENCHMARK.containing_type = _EXPLAIN _EXPLAIN_BENCHMARK.containing_type = _EXPLAIN
_EXPLAIN_METADATA.containing_type = _EXPLAIN _EXPLAIN_METADATA.containing_type = _EXPLAIN
_EXPLAIN_HOCLAYER.containing_type = _EXPLAIN
_EXPLAIN_HOC.fields_by_name['layer'].message_type = _EXPLAIN_HOCLAYER
_EXPLAIN_HOC.containing_type = _EXPLAIN
_EXPLAIN.fields_by_name['inference'].message_type = _EXPLAIN_INFERENCE _EXPLAIN.fields_by_name['inference'].message_type = _EXPLAIN_INFERENCE
_EXPLAIN.fields_by_name['explanation'].message_type = _EXPLAIN_EXPLANATION _EXPLAIN.fields_by_name['explanation'].message_type = _EXPLAIN_EXPLANATION
_EXPLAIN.fields_by_name['benchmark'].message_type = _EXPLAIN_BENCHMARK _EXPLAIN.fields_by_name['benchmark'].message_type = _EXPLAIN_BENCHMARK
_EXPLAIN.fields_by_name['metadata'].message_type = _EXPLAIN_METADATA _EXPLAIN.fields_by_name['metadata'].message_type = _EXPLAIN_METADATA
_EXPLAIN.fields_by_name['hoc'].message_type = _EXPLAIN_HOC
DESCRIPTOR.message_types_by_name['Event'] = _EVENT DESCRIPTOR.message_types_by_name['Event'] = _EVENT
DESCRIPTOR.message_types_by_name['Summary'] = _SUMMARY DESCRIPTOR.message_types_by_name['Summary'] = _SUMMARY
DESCRIPTOR.message_types_by_name['Explain'] = _EXPLAIN DESCRIPTOR.message_types_by_name['Explain'] = _EXPLAIN
@@ -789,6 +883,20 @@ Explain = _reflection.GeneratedProtocolMessageType('Explain', (_message.Message,
# @@protoc_insertion_point(class_scope:mindinsight.Explain.Metadata) # @@protoc_insertion_point(class_scope:mindinsight.Explain.Metadata)
}) })
, ,

'HocLayer' : _reflection.GeneratedProtocolMessageType('HocLayer', (_message.Message,), {
'DESCRIPTOR' : _EXPLAIN_HOCLAYER,
'__module__' : 'mindinsight_summary_pb2'
# @@protoc_insertion_point(class_scope:mindinsight.Explain.HocLayer)
})
,

'Hoc' : _reflection.GeneratedProtocolMessageType('Hoc', (_message.Message,), {
'DESCRIPTOR' : _EXPLAIN_HOC,
'__module__' : 'mindinsight_summary_pb2'
# @@protoc_insertion_point(class_scope:mindinsight.Explain.Hoc)
})
,
'DESCRIPTOR' : _EXPLAIN, 'DESCRIPTOR' : _EXPLAIN,
'__module__' : 'mindinsight_summary_pb2' '__module__' : 'mindinsight_summary_pb2'
# @@protoc_insertion_point(class_scope:mindinsight.Explain) # @@protoc_insertion_point(class_scope:mindinsight.Explain)
@@ -798,6 +906,8 @@ _sym_db.RegisterMessage(Explain.Inference)
_sym_db.RegisterMessage(Explain.Explanation) _sym_db.RegisterMessage(Explain.Explanation)
_sym_db.RegisterMessage(Explain.Benchmark) _sym_db.RegisterMessage(Explain.Benchmark)
_sym_db.RegisterMessage(Explain.Metadata) _sym_db.RegisterMessage(Explain.Metadata)
_sym_db.RegisterMessage(Explain.HocLayer)
_sym_db.RegisterMessage(Explain.Hoc)




DESCRIPTOR._options = None DESCRIPTOR._options = None


Loading…
Cancel
Save