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

DNS test cloud issue. #1531

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
4 changes: 2 additions & 2 deletions t5x/checkpoint_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,13 @@ def detect_checkpoint_type(
)
return checkpoint_type
else:
checkpoint_type = CheckpointTypes.T5X
checkpoint_type = CheckpointTypes.ORBAX
_warn_if_unexpected_type(
checkpoint_path,
checkpoint_type,
expected,
'Did not detect ts.Spec nor the {"version", "optimizer"} keys in the'
'checkpoint msgpack file, so the checkpoint was assumed to be '
'written with T5X.',
'written with Orbax.',
)
return checkpoint_type
4 changes: 2 additions & 2 deletions t5x/checkpoint_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def test_detect_checkpoint_type(self):
ret = checkpoint_utils.detect_checkpoint_type(
orbax_ckpt, expected=checkpoint_utils.CheckpointTypes.ORBAX
)
self.assertEqual(ret, checkpoint_utils.CheckpointTypes.T5X)
self.assertEqual(ret, checkpoint_utils.CheckpointTypes.ORBAX)

with self.assertLogs(level="WARN") as log_output:
checkpoint_utils.detect_checkpoint_type(
Expand All @@ -185,7 +185,7 @@ def test_detect_checkpoint_type(self):
self.assertRegex(
log_output[0][0].message,
".*to be CheckpointTypes.T5X_TF format, but the actual detected format"
" was CheckpointTypes.T5X.*",
" was CheckpointTypes.ORBAX.*",
)


Expand Down
2 changes: 1 addition & 1 deletion t5x/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def evaluate(
] = utils.TrainStateInitializer,
train_eval_get_dataset_fn: utils.GetEvalDatasetCallable = utils.get_training_eval_datasets,
fallback_init_rng: Optional[int] = None,
use_orbax: bool = True,
use_orbax: bool = False,
):
"""Evaluation function.

Expand Down
2 changes: 1 addition & 1 deletion t5x/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def infer(
output_vocab_feature_name: str = 'targets',
file_extension: str = 'jsonl',
keep_aux_as_numpy: bool = False,
use_orbax: bool = True,
use_orbax: bool = False,
):
"""Infer function.

Expand Down
2 changes: 1 addition & 1 deletion t5x/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def train(
train_state_initializer_cls: Type[
utils.TrainStateInitializer
] = utils.TrainStateInitializer,
use_orbax: bool = True,
use_orbax: bool = False,
verify_matching_vocabs_fn: Optional[
Callable[[utils.DatasetConfig, models.BaseTransformerModel], None]
] = utils.verify_matching_vocabs,
Expand Down
Loading