Skip to content

I am getting the following error while publish the trained model on the Hub  #46

@Sayantad

Description

@Sayantad

Description: While running the following code snipet :

from huggingface_sb3 import package_to_hub

package_to_hub(
model=model,
model_name=f"a2c-{env_id}",
model_architecture="A2C",
env_id=env_id,
eval_env=eval_env,
repo_id=f"dasayantan/a2c-{env_id}", # Change the username
commit_message="Initial commit",
)

I am getting this error:

ℹ This function will save, evaluate, generate a video of your agent,
create a model card and push everything to the hub. It might take up to 1min.
This is a work in progress: if you encounter a bug, please open an issue.
/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_auth.py:94: UserWarning:
The secret HF_TOKEN does not exist in your Colab secrets.
To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.
You will be able to reuse this secret in all of your notebooks.
Please note that authentication is recommended but still optional to access public models or datasets.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/stable_baselines3/common/evaluation.py:67: UserWarning: Evaluation environment is not wrapped with a Monitor wrapper. This may result in reporting modified episode lengths and rewards, if other wrappers happen to modify these. Consider wrapping environment first with Monitor wrapper.
warnings.warn(
Saving video to /tmp/tmphw7u31gr/-step-0-to-step-1000.mp4
/usr/local/lib/python3.10/dist-packages/moviepy/config_defaults.py:1: DeprecationWarning: invalid escape sequence '\P'
"""
Moviepy - Building video /tmp/tmphw7u31gr/-step-0-to-step-1000.mp4.
Moviepy - Writing video /tmp/tmphw7u31gr/-step-0-to-step-1000.mp4

Moviepy - Done !
Moviepy - video ready /tmp/tmphw7u31gr/-step-0-to-step-1000.mp4
✘ 'DummyVecEnv' object has no attribute 'video_recorder'
✘ We are unable to generate a replay of your agent, the package_to_hub
process continues
✘ Please open an issue at
https://github.com/huggingface/huggingface_sb3/issues
ℹ Pushing repo dasayantan/a2c-PandaReachDense-v3 to the Hugging Face
Hub
policy.optimizer.pth: 100%
 48.5k/48.5k [00:00<00:00, 89.9kB/s]
policy.pth: 100%
 46.4k/46.4k [00:00<00:00, 94.5kB/s]
pytorch_variables.pth: 100%
 864/864 [00:00<00:00, 5.35kB/s]
Upload 5 LFS files: 100%
 5/5 [00:00<00:00,  1.55it/s]
a2c-PandaReachDense-v3.zip: 100%
 114k/114k [00:00<00:00, 97.2kB/s]
vec_normalize.pkl: 100%
 2.64k/2.64k [00:00<00:00, 17.8kB/s]
ℹ Your model is pushed to the Hub. You can view your model here:
https://huggingface.co/dasayantan/a2c-PandaReachDense-v3/tree/main/
CommitInfo(commit_url='https://huggingface.co/dasayantan/a2c-PandaReachDense-v3/commit/8ac0c95466b34ac57e320f5357c035e5f113923e', commit_message='Initial commit', commit_description='', oid='8ac0c95466b34ac57e320f5357c035e5f113923e', pr_url=None, repo_url=RepoUrl('https://huggingface.co/dasayantan/a2c-PandaReachDense-v3', endpoint='https://huggingface.co/', repo_type='model', repo_id='dasayantan/a2c-PandaReachDense-v3'), pr_revision=None, pr_num=None)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions