Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
vwxyzjn committed Oct 18, 2022
1 parent a98383d commit b430540
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cleanrl/dqn.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ def linear_schedule(start_e: float, end_e: float, duration: int, t: int):
writer.add_scalar("eval/episodic_return", episodic_return, idx)

if args.upload_model:
from cleanrl_utils.huggingface import upload_to_hub
from cleanrl_utils.huggingface import push_to_hub

repo_name = f"{args.env_id}-{args.exp_name}-seed{args.seed}"
repo_id = f"{args.hf_entity}/{repo_name}" if args.hf_entity else repo_name
upload_to_hub(args, episodic_returns, repo_id, "DQN", f"runs/{run_name}", f"videos/{run_name}-eval")
push_to_hub(args, episodic_returns, repo_id, "DQN", f"runs/{run_name}", f"videos/{run_name}-eval")
2 changes: 1 addition & 1 deletion cleanrl_utils/huggingface.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
HUGGINGFACE_README_FILE_NAME = "README.md"


def upload_to_hub(
def push_to_hub(
args: argparse.Namespace,
episodic_returns: List,
repo_id: str,
Expand Down

0 comments on commit b430540

Please sign in to comment.