<commit_before>syntax = "proto3";

package tensorflow;

import "tensorflow/core/framework/graph.proto";

// Tensor Tracer Report proto gives information about the trace including:
// - TensorTracerConfig: version, device, num replicas, trace mode.
// - Graphdef, e.g., list of operations, tensors
// - TracedTensorDef:
//    * Name of the tensor
//    * Tracepoint name if provided.
//    * Index of the tensor in the compact cache if traced.
//    * Explanation for why the tensor is traced or not.
message TensorTracerReport {
  TensorTracerConfig config = 1;

  // Tensorflow graph.
  tensorflow.GraphDef graphdef = 2;

  // A map from tensor name to its TracedTensorDef.
  map<string, TracedTensorDef> tensordef = 3;

  // The fingerprint of the TensorTracerReport (fingerprint calculation excludes
  // this field and graphdef).
  string fingerprint = 4;

  // The function_name passed to the function_callback
  // that produced this TensorTracerReport
  string concrete_function_name = 5;
<commit_msg>Adds the last common stack frame computed by TensorTracer to the report proto.<commit_after>syntax = "proto3";

package tensorflow;

import "tensorflow/core/framework/graph.proto";

// Tensor Tracer Report proto gives information about the trace including:
// - TensorTracerConfig: version, device, num replicas, trace mode.
// - Graphdef, e.g., list of operations, tensors
// - TracedTensorDef:
//    * Name of the tensor
//    * Tracepoint name if provided.
//    * Index of the tensor in the compact cache if traced.
//    * Explanation for why the tensor is traced or not.
message TensorTracerReport {
  TensorTracerConfig config = 1;

  // Tensorflow graph.
  tensorflow.GraphDef graphdef = 2;

  // A map from tensor name to its TracedTensorDef.
  map<string, TracedTensorDef> tensordef = 3;

  // The fingerprint of the TensorTracerReport (fingerprint calculation excludes
  // this field and graphdef).
  string fingerprint = 4;

  // The function_name passed to the function_callback
  // that produced this TensorTracerReport
  string concrete_function_name = 5;

  // The index of the last stack frame where the stack traces for all output
  // operations in the graph have the same value.
  int32 last_common_frame_no = 6;

{'fraction_non_alphanumeric': 0.07935800267498885, 'fraction_numerical': 0.006687472135532769, 'mean_word_length': 3.524193548387097, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1874754', 'n_tokens_mistral': 648, 'n_tokens_neox': 610, 'n_words': 251}