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
4 changes: 2 additions & 2 deletions learned_optimization/outer_trainers/gradient_learner.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ def extract_one(idx, x):
metrics[f"mean||{cfg_name}/grad_norm"] = norm
metrics[f"mean||{family_name}/mean_loss"] = estimator_out.mean_loss
metrics[f"mean||{cfg_name}/mean_loss"] = estimator_out.mean_loss
metrics[f"sample||{family_name}/time"] = time.time() - stime
metrics[f"sample||{cfg_name}/time"] = time.time() - stime
metrics[f"sample||{family_name}/time"] = time.time() - stime # pyrefly: ignore[unsupported-operation]
metrics[f"sample||{cfg_name}/time"] = time.time() - stime # pyrefly: ignore[unsupported-operation]

metrics_list.append(metrics)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,18 @@ def mutate_fn(
beta2 = 1 - onp.exp(oml_beta2 + onp.random.normal() * 0.03)

return { # pytype: disable=bad-return-type # jax-ndarray
"learning_rate": onp.exp(loglr + offset),
"beta1": beta1,
"beta2": beta2,
"hue": onp.clip(onp.random.normal() * 0.03 + meta_params["hue"], 0, 1),
"contrast_high": contrast_high,
"contrast_low": contrast_low,
"saturation_high": saturation_high,
"saturation_low": saturation_low,
"smooth_labels": onp.clip(
"learning_rate": onp.exp(loglr + offset), # pyrefly: ignore[bad-assignment]
"beta1": beta1, # pyrefly: ignore[bad-assignment]
"beta2": beta2, # pyrefly: ignore[bad-assignment]
"hue": onp.clip(onp.random.normal() * 0.03 + meta_params["hue"], 0, 1), # pyrefly: ignore[bad-assignment]
"contrast_high": contrast_high, # pyrefly: ignore[bad-assignment]
"contrast_low": contrast_low, # pyrefly: ignore[bad-assignment]
"saturation_high": saturation_high, # pyrefly: ignore[bad-assignment]
"saturation_low": saturation_low, # pyrefly: ignore[bad-assignment]
"smooth_labels": onp.clip( # pyrefly: ignore[bad-assignment]
onp.random.normal() * 0.03 + meta_params["smooth_labels"], 0, 1
),
"batch_size": int(
"batch_size": int( # pyrefly: ignore[bad-assignment]
meta_params["batch_size"] * (1 + onp.random.normal() * 0.1)
),
}
Expand Down
Loading