Unverified Commit 663f0c19 authored by camenduru's avatar camenduru Committed by GitHub
Browse files

[Flax] fix extra copy pasta 🍝 (#1187)

parent 6cf72a9b
...@@ -327,22 +327,6 @@ def main(): ...@@ -327,22 +327,6 @@ def main():
if args.seed is not None: if args.seed is not None:
set_seed(args.seed) set_seed(args.seed)
if jax.process_index() == 0:
if args.push_to_hub:
if args.hub_model_id is None:
repo_name = get_full_repo_name(Path(args.output_dir).name, token=args.hub_token)
else:
repo_name = args.hub_model_id
repo = Repository(args.output_dir, clone_from=repo_name)
with open(os.path.join(args.output_dir, ".gitignore"), "w+") as gitignore:
if "step_*" not in gitignore:
gitignore.write("step_*\n")
if "epoch_*" not in gitignore:
gitignore.write("epoch_*\n")
elif args.output_dir is not None:
os.makedirs(args.output_dir, exist_ok=True)
rng = jax.random.PRNGKey(args.seed) rng = jax.random.PRNGKey(args.seed)
if args.with_prior_preservation: if args.with_prior_preservation:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment