Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal #1631

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from orbax.experimental.model.core.python.saved_model_proto import node_builder
from orbax.experimental.model.core.python.saved_model_proto import nodes

from .net.proto2.contrib.pyutil import compare
from tensorflow.python.util.protobuf import compare
from absl.testing import absltest

Node = nodes.Node
Expand All @@ -30,7 +30,7 @@
class NodesTest(absltest.TestCase):

def assertProtoEqual(self, a, b):
compare.assertProto2Equal(self, a, b)
compare.assertProtoEqual(self, a, b)

def test_node(self):
node = Node(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from orbax.experimental.model import core as obm
from orbax.experimental.model.jax2obm import jax_specific_info
from orbax.experimental.model.jax2obm import jax_supplemental_pb2
from .net.proto2.contrib.pyutil import compare
from tensorflow.python.util.protobuf import compare
from google.protobuf import text_format
from absl.testing import absltest

Expand Down Expand Up @@ -102,7 +102,7 @@ def test_to_shape_dtype_refinements_proto(self):
}
}
"""
compare.assertProto2Equal(
compare.assertProtoEqual(
self,
jax_specific_info._to_shape_dtype_refinements_proto(input1),
text_format.Parse(
Expand Down Expand Up @@ -135,7 +135,7 @@ def test_to_shape_dtype_refinements_proto(self):
}
}
"""
compare.assertProto2Equal(
compare.assertProtoEqual(
self,
jax_specific_info._to_shape_dtype_refinements_proto(input2),
text_format.Parse(
Expand Down
10 changes: 5 additions & 5 deletions model/orbax/experimental/model/jax2obm/main_lib_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from orbax.experimental.model.jax2obm import jax_supplemental_pb2
from orbax.experimental.model.jax2obm import main_lib

from .net.proto2.contrib.pyutil import compare
from tensorflow.python.util.protobuf import compare
from google.protobuf import text_format
from absl.testing import absltest

Expand Down Expand Up @@ -586,7 +586,7 @@ def _generated_sharded_params():
expected_manifest_proto = text_format.Parse(
expected_manifest_proto_text, obm.manifest_pb2.Manifest()
)
compare.assertProto2Equal(
compare.assertProtoEqual(
self,
manifest_proto,
expected_manifest_proto,
Expand Down Expand Up @@ -620,7 +620,7 @@ def _generated_sharded_params():
expected_orchestration_proto_text,
obm.simple_orchestration_pb2.SimpleOrchestration(),
)
compare.assertProto2Equal(
compare.assertProtoEqual(
self, expected_orchestration_proto, orchestration_proto
)

Expand Down Expand Up @@ -671,7 +671,7 @@ def _generated_sharded_params():
expected_jax_supplemental_proto_text,
jax_supplemental_pb2.Function(),
)
compare.assertProto2Equal(
compare.assertProtoEqual(
self, expected_jax_supplemental_proto, jax_supplemental_proto
)

Expand Down Expand Up @@ -1190,7 +1190,7 @@ def get_mesh():
expected_manifest_proto_text, obm.manifest_pb2.Manifest()
)

compare.assertProto2Equal(
compare.assertProtoEqual(
self,
manifest_proto,
expected_manifest_proto,
Expand Down
6 changes: 3 additions & 3 deletions model/orbax/experimental/model/jax2obm/sharding_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import numpy as np
from orbax.experimental.model import core as obm
from orbax.experimental.model.jax2obm import sharding
from .net.proto2.contrib.pyutil import compare
from tensorflow.python.util.protobuf import compare
from google.protobuf import text_format
from absl.testing import absltest

Expand Down Expand Up @@ -47,7 +47,7 @@ def test_jax_mesh_to_obm_device_mesh(self):
expected_device_mesh = text_format.Parse(
expected_device_mesh_text, obm.manifest_pb2.DeviceMesh()
)
compare.assertProto2Equal(
compare.assertProtoEqual(
self,
device_mesh,
expected_device_mesh,
Expand Down Expand Up @@ -174,7 +174,7 @@ def test_jax_mesh_to_obm_device_assignment_by_coords(self):
expected_device_assignment_by_coords_text,
obm.manifest_pb2.DeviceAssignmentByCoords(),
)
compare.assertProto2Equal(
compare.assertProtoEqual(
self,
device_assignment_by_coords,
expected_device_assignment_by_coords,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from orbax.experimental.model.tf2obm.tf_concrete_functions_to_obm import TF_SAVED_MODEL_SUPPLEMENTAL_NAME
import tensorflow as tf

from .net.proto2.contrib.pyutil import compare
from tensorflow.python.util.protobuf import compare
from google.protobuf import text_format
from absl.testing import absltest

Expand Down Expand Up @@ -332,7 +332,7 @@ def tf_fn(a):
expected_manifest_proto = text_format.Parse(
expected_manifest_proto_text, obm.manifest_pb2.Manifest()
)
compare.assertProto2Equal(
compare.assertProtoEqual(
self,
manifest_proto,
expected_manifest_proto,
Expand Down Expand Up @@ -360,7 +360,7 @@ def tf_fn(a):
expected_pre_processor_proto_text,
tf_concrete_function_handle_pb2.TfConcreteFunctionHandle(),
)
compare.assertProto2Equal(
compare.assertProtoEqual(
self,
pre_processor_proto,
expected_pre_processor_proto,
Expand Down Expand Up @@ -388,7 +388,7 @@ def tf_fn(a):
expected_post_processor_proto_text,
tf_concrete_function_handle_pb2.TfConcreteFunctionHandle(),
)
compare.assertProto2Equal(
compare.assertProtoEqual(
self,
post_processor_proto,
expected_post_processor_proto,
Expand Down