Skip to content

Commit

Permalink
Updated jax.config import
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 575151388
  • Loading branch information
superbobry authored and Copybara-Service committed Oct 20, 2023
1 parent 1bb3b89 commit 2a4356a
Show file tree
Hide file tree
Showing 322 changed files with 330 additions and 330 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
@@ -1,4 +1,4 @@
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
@@ -1,4 +1,4 @@
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion docs/.readthedocs.yaml
@@ -1,4 +1,4 @@
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion oss_scripts/oss_pip_install.sh
@@ -1,4 +1,4 @@
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion oss_scripts/oss_release.sh
@@ -1,4 +1,4 @@
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion oss_scripts/oss_tests.sh
@@ -1,4 +1,4 @@
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/__init__.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/data/__init__.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/data/debug_data_pipeline.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/data/inputs.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/data/inputs_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/data/text_encoder.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/data/text_encoder_build_subword.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/data/text_encoder_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/data/tf_inputs.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/data/tf_inputs_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/data/tokenizer.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/data/tokenizer_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/examples/Knowledge_Tracing_Transformer.ipynb
Expand Up @@ -121,7 +121,7 @@
"from google.cloud.bigquery import LoadJobConfig, QueryJobConfig, \\\r\n",
" SchemaField, SourceFormat\r\n",
"import jax\r\n",
"from jax.config import config\r\n",
"from jax import config\r\n",
"import pandas as pd\r\n",
"import numpy as np\r\n",
"import requests\r\n",
Expand Down
Expand Up @@ -157,7 +157,7 @@
" TPU_DRIVER_MODE = 1\n",
"\n",
"# The following is required to use TPU Driver as JAX's backend.\n",
"from jax.config import config\n",
"from jax import config\n",
"config.FLAGS.jax_xla_backend = \"tpu_driver\"\n",
"config.FLAGS.jax_backend_target = \"grpc://\" + os.environ['COLAB_TPU_ADDR']\n",
"print(config.FLAGS.jax_backend_target)"
Expand Down
2 changes: 1 addition & 1 deletion trax/fastmath/__init__.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/fastmath/jax.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/fastmath/numpy.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/fastmath/ops.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/fastmath/ops_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/fastmath/tf.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/import_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/jaxboard.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/__init__.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/acceleration.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions trax/layers/acceleration_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,7 @@

from absl.testing import absltest

from jax.config import config
from jax import config
import numpy as np

from trax import fastmath
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/activation_fns.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/activation_fns_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/assert_shape.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/assert_shape_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/attention.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/attention_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/base.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/base_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/combinators.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/combinators_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/convolution.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/convolution_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/core.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/core_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/deconvolution.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/deconvolution_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/initializers.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/initializers_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/metrics.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/metrics_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/normalization.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/normalization_test.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion trax/layers/pooling.py
@@ -1,5 +1,5 @@
# coding=utf-8
# Copyright 2022 The Trax Authors.
# Copyright 2023 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 2a4356a

Please sign in to comment.