Skip to content
Merged
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
2 changes: 1 addition & 1 deletion pathwaysutils/plugin_executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import jax
from jax._src.interpreters import pxla
from jaxlib.xla_extension import ifrt_programs
from jax.extend.ifrt_programs import ifrt_programs


class PluginExecutable:
Expand Down
6 changes: 3 additions & 3 deletions pathwaysutils/proxy_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"""Register the IFRT Proxy as a backend for JAX."""

import jax
from jax._src import xla_bridge
from jaxlib.xla_extension import ifrt_proxy
from jax.extend import backend
from jax.lib.xla_extension import ifrt_proxy


def register_backend_factory():
xla_bridge.register_backend_factory(
backend.register_backend_factory(
"proxy",
lambda: ifrt_proxy.get_client(
jax.config.read("jax_backend_target"),
Expand Down
7 changes: 6 additions & 1 deletion pathwaysutils/test/proxy_backend_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for the proxy backend module."""

from unittest import mock

import jax
from jax.extend import backend
from jax.lib.xla_extension import ifrt_proxy
import mock
from pathwaysutils import proxy_backend

from absl.testing import absltest
Expand All @@ -26,7 +29,9 @@ def setUp(self):
super().setUp()
jax.config.update("jax_platforms", "proxy")
jax.config.update("jax_backend_target", "grpc://localhost:12345")
backend.clear_backends()

@absltest.skip("b/408025233")
def test_no_proxy_backend_registration_raises_error(self):
self.assertRaises(RuntimeError, backend.backends)

Expand Down