huggingface / deep-rl-class

This repo contains the syllabus of the Hugging Face Deep Reinforcement Learning Course.
Apache License 2.0
3.87k stars 592 forks source link

[HANDS-ON BUG] Unit-1 LunarLander - not able to push trained agent to the Hub #462

Closed bantu-4879 closed 9 months ago

bantu-4879 commented 9 months ago

Describe the bug

A clear and concise description of what the bug is - kernel keeps running on this code

package_to_hub(model=model, 
               model_name=model_name, 
               model_architecture=model_architecture, 
               env_id=env_id, 
               eval_env=eval_env, 
               repo_id=repo_id, 
               commit_message=commit_message)

I run all the previous necessary steps but when it comes to this code it keeps on running indefinitely and LFS upload shows 0/4

Notebook Link

Material

If not:

michelepangrazi commented 9 months ago

I obtain the same problem.

The code below:

package_to_hub(model=model, # Our trained model model_name=model_name, # The name of our trained model model_architecture=model_architecture, # The model architecture we used: in our case PPO env_id=env_id, # Name of the environment eval_env=eval_env, # Evaluation Environment repo_id=repo_id, # id of the model repository from the Hugging Face Hub (repo_id = {organization}/{repo_name} for instance ThomasSimonini/ppo-LunarLander-v2 commit_message=commit_message)

create correctly the repository in the model section but empty and stay stuck indefinitely without push anything

michelepangrazi commented 9 months ago

Hi @bantu-4879, i used the sudgestion of @Drakrig in this issue https://github.com/huggingface/deep-rl-class/issues/460 and work for me

package_to_hub(model=model, model_name=model_name, model_architecture=model_architecture, env_id=env_id, eval_env=eval_env, repo_id=repo_id, token=TOKEN_AS_STRING, commit_message=commit_message)