Skip to content

Commit 2bef12e

Browse files
aichendoubletensorflower-gardener
authored andcommitted
Internal change
PiperOrigin-RevId: 326604435
1 parent 432a448 commit 2bef12e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

official/core/train_utils.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ def parse_configuration(flags_obj):
4040

4141
# 1. Get the default config from the registered experiment.
4242
params = exp_factory.get_exp_config(flags_obj.experiment)
43-
params.override({
44-
'runtime': {
45-
'tpu': flags_obj.tpu,
46-
}
47-
})
4843

4944
# 2. Get the first level of override from `--config_file`.
5045
# `--config_file` is typically used as a template that specifies the common
@@ -53,7 +48,14 @@ def parse_configuration(flags_obj):
5348
params = hyperparams.override_params_dict(
5449
params, config_file, is_strict=True)
5550

56-
# 3. Get the second level of override from `--params_override`.
51+
# 3. Override the TPU address.
52+
params.override({
53+
'runtime': {
54+
'tpu': flags_obj.tpu,
55+
}
56+
})
57+
58+
# 4. Get the second level of override from `--params_override`.
5759
# `--params_override` is typically used as a further override over the
5860
# template. For example, one may define a particular template for training
5961
# ResNet50 on ImageNet in a config file and pass it via `--config_file`,

0 commit comments

Comments
 (0)