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

fix pylint: Using variable 'p_eval_step' before assignment #651

Merged
merged 1 commit into from
May 15, 2024
Merged
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: 4 additions & 0 deletions MaxText/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ def train_loop(config, state=None):
print("Loading the compiled function...", flush=True)
# Need to pass train signature and state to determine i/o shapes of train_state for now.
p_train_step = maxtext_utils.load_compiled(config, functional_train, state)
# TODO: p_eval_step is not yet supported in load_compiled
p_eval_step = None
print("Loaded compiled function!", flush=True)
else:
p_train_step = jax.jit(
Expand All @@ -475,6 +477,8 @@ def train_loop(config, state=None):
static_argnums=static_argnums_eval,
donate_argnums=donate_argnums_eval,
)
else:
p_eval_step = None

local_metrics_file = open(config.metrics_file, "a", encoding="utf8") if config.metrics_file else None
running_gcs_metrics = [] if config.gcs_metrics else None
Expand Down
Loading