@@ -26,6 +26,10 @@ rsync --existing "$1"/tensorflow/core/protobuf/*.proto tensorboard/compat/proto/
26
26
rsync --existing " $1 " /tensorflow/core/profiler/* .proto tensorboard/compat/proto/
27
27
rsync --existing " $1 " /tensorflow/core/util/* .proto tensorboard/compat/proto/
28
28
rsync --existing " $1 " /tensorflow/python/framework/* .proto tensorboard/compat/proto/
29
+ if [ -d " " $1 " /tensorflow/tsl/protobuf" ] # This directory first appears in TF 2.11
30
+ then
31
+ rsync --existing " $1 " /tensorflow/tsl/protobuf/* .proto tensorboard/compat/proto/
32
+ fi
29
33
30
34
# Rewrite file paths and package names and disable LINT checks.
31
35
find tensorboard/compat/proto/ -type f -name ' *.proto' -exec perl -pi \
@@ -34,6 +38,7 @@ find tensorboard/compat/proto/ -type f -name '*.proto' -exec perl -pi \
34
38
-e ' s|tensorflow/core/profiler|tensorboard/compat/proto|g;' \
35
39
-e ' s|tensorflow/core/util|tensorboard/compat/proto|g;' \
36
40
-e ' s|tensorflow/python/framework|tensorboard/compat/proto|g;' \
41
+ -e ' s|tensorflow/tsl/protobuf|tensorboard/compat/proto|g;' \
37
42
-e ' s|package tensorflow.tfprof;|package tensorboard;|g;' \
38
43
-e ' s|package tensorflow;|package tensorboard;|g;' \
39
44
-e ' s|tensorflow\.DataType|tensorboard.DataType|g;' \
@@ -60,9 +65,9 @@ find tensorboard/compat/proto/ -type f -name '*.proto' -exec perl -pi \
60
65
printf ' tb_proto_library(\n'
61
66
printf ' name = "%s",\n' " ${f% .proto} "
62
67
printf ' srcs = ["%s"],\n' " $f "
63
- if grep -q ' ^import "tensorboard/' " $f " ; then
68
+ if grep -q ' ^import\( public\)* "tensorboard/' " $f " ; then
64
69
printf ' deps = [\n'
65
- grep ' ^import "tensorboard/' " $f " | sort |
70
+ grep ' ^import\( public\)* "tensorboard/' " $f " | sort |
66
71
sed -e ' s#.*compat/proto/\([^.]*\).*# ":\1",#'
67
72
printf ' ],\n'
68
73
fi
0 commit comments