From 46b5c4012d2ef76c9d92bb0d88a6b107aee83814 Mon Sep 17 00:00:00 2001 From: Yuqi Li Date: Tue, 7 Mar 2023 10:13:13 -0800 Subject: [PATCH] add custom metadata in metadata_schema. PiperOrigin-RevId: 514768756 --- mediapipe/framework/calculator_profile.proto | 3 --- mediapipe/framework/profiler/trace_buffer.h | 4 ---- mediapipe/tasks/cc/metadata/metadata_version.cc | 2 +- mediapipe/tasks/metadata/metadata_schema.fbs | 3 ++- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/mediapipe/framework/calculator_profile.proto b/mediapipe/framework/calculator_profile.proto index 082d0a869..d86162ea5 100644 --- a/mediapipe/framework/calculator_profile.proto +++ b/mediapipe/framework/calculator_profile.proto @@ -137,9 +137,6 @@ message GraphTrace { TPU_TASK_INVOKE = 17; CPU_TASK_INVOKE = 18; } - // //depot/mediapipe/framework/mediapipe_profiling.h:profiler_census_tags, - // //depot/mediapipe/framework/profiler/trace_buffer.h:event_type_list, - // ) // The timing for one packet set being processed at one caclulator node. message CalculatorTrace { diff --git a/mediapipe/framework/profiler/trace_buffer.h b/mediapipe/framework/profiler/trace_buffer.h index 9ad4314fd..b44d8f0bf 100644 --- a/mediapipe/framework/profiler/trace_buffer.h +++ b/mediapipe/framework/profiler/trace_buffer.h @@ -112,10 +112,6 @@ struct TraceEvent { static constexpr EventType GPU_TASK_INVOKE = GraphTrace::GPU_TASK_INVOKE; static constexpr EventType TPU_TASK_INVOKE = GraphTrace::TPU_TASK_INVOKE; static constexpr EventType CPU_TASK_INVOKE = GraphTrace::CPU_TASK_INVOKE; - - // //depot/mediapipe/framework/mediapipe_profiling.h:profiler_census_tags, - // //depot/mediapipe/framework/calculator_profile.proto:event_type, - // ) }; // Packet trace log buffer. diff --git a/mediapipe/tasks/cc/metadata/metadata_version.cc b/mediapipe/tasks/cc/metadata/metadata_version.cc index e836eb7ec..923d3aa56 100644 --- a/mediapipe/tasks/cc/metadata/metadata_version.cc +++ b/mediapipe/tasks/cc/metadata/metadata_version.cc @@ -285,7 +285,7 @@ void UpdateMinimumVersionForTable( min_version); } - // Checks for the options field. + // Checks for the custom metadata field. if (table->custom_metadata() != nullptr) { UpdateMinimumVersion(GetMemberVersion(SchemaMembers::kCustomMetadata), min_version); diff --git a/mediapipe/tasks/metadata/metadata_schema.fbs b/mediapipe/tasks/metadata/metadata_schema.fbs index 56161b711..3253e1ea8 100644 --- a/mediapipe/tasks/metadata/metadata_schema.fbs +++ b/mediapipe/tasks/metadata/metadata_schema.fbs @@ -680,6 +680,8 @@ table SubGraphMetadata { // Added in: 1.2.0 output_tensor_groups:[TensorGroup]; + // A list of custom metadata. + // Added in: 1.5.0. custom_metadata:[CustomMetadata]; } @@ -726,6 +728,5 @@ table ModelMetadata { // the metadata is populated into a TFLite model. min_parser_version:string; } -// metadata_version.cc) root_type ModelMetadata;