Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve discoverability on the hub #325

Merged
merged 15 commits into from
Aug 19, 2024
Merged

Conversation

NielsRogge
Copy link
Contributor

What this does

Great to see you're leveraging the PyTorchModelHubMixin (wondering how you discovered it? ;) )

This PR aims to improve the discoverability of models pushed using lerobot on the hub. The Mixin class has undergone quite some improvements, you can now also include metadata which will get pushed automatically into the model card.

Refer to the docs: https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin

cc @Wauplin

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @NielsRogge! Looks like a good addition to me :)

lerobot/common/policies/act/modeling_act.py Outdated Show resolved Hide resolved
lerobot/common/policies/diffusion/modeling_diffusion.py Outdated Show resolved Hide resolved
lerobot/common/policies/tdmpc/modeling_tdmpc.py Outdated Show resolved Hide resolved
lerobot/common/policies/vqbet/modeling_vqbet.py Outdated Show resolved Hide resolved
NielsRogge and others added 4 commits August 15, 2024 10:17
Co-authored-by: Lucain <lucainp@gmail.com>
Co-authored-by: Lucain <lucainp@gmail.com>
Co-authored-by: Lucain <lucainp@gmail.com>
class ACTPolicy(nn.Module, PyTorchModelHubMixin,
library_name="lerobot",
repo_url="https://github.com/huggingface/lerobot",
tags=["act-policy", "robotics"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since "act-policy" is added as a tag here, it would make sense to add the policy as a tag for DiffusionPolicy, TDMPCPolicy and VQBeTPolicy as well.

Copy link
Collaborator

@aliberts aliberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you a lot @NielsRogge, this is a great addition!
I left a few minor comments, almost ready to merge for me.
Also, I synced with main to fix the CI as we recently fixed a bug in #361 which you still had ;)
And thank you @Wauplin for the review!

.pre-commit-config.yaml Outdated Show resolved Hide resolved
PyTorchModelHubMixin,
library_name="lerobot",
repo_url="https://github.com/huggingface/lerobot",
tags=["robotics", "act-policy"],
Copy link
Collaborator

@aliberts aliberts Aug 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EDIT: Deleted suggestion

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personal preference but I'd rather set a single tag act-policy (and same for the other policies). Feels more self-explanatory to me + in the UI it will allow to click on the act-policy tag to list all models with it. If split in two tags, you can filter models with act but some might not even be policies or robotics related. Especially in the case of diffusion-policy where "diffusion" alone can mean everything.

Copy link
Collaborator

@aliberts aliberts Aug 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha I see, I updated my comments. Thanks for the tip.

lerobot/common/policies/diffusion/modeling_diffusion.py Outdated Show resolved Hide resolved
@aliberts aliberts added ✨ Enhancement New feature or request 🧠 Policies Something policies-related labels Aug 17, 2024
NielsRogge and others added 2 commits August 18, 2024 20:20
Co-authored-by: Simon Alibert <75076266+aliberts@users.noreply.github.com>
Co-authored-by: Simon Alibert <75076266+aliberts@users.noreply.github.com>
Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency. Or is there a special purpose I haven't seen?

lerobot/common/policies/vqbet/modeling_vqbet.py Outdated Show resolved Hide resolved
lerobot/common/policies/tdmpc/modeling_tdmpc.py Outdated Show resolved Hide resolved
NielsRogge and others added 2 commits August 19, 2024 10:49
Co-authored-by: Lucain <lucainp@gmail.com>
Co-authored-by: Lucain <lucainp@gmail.com>
@aliberts
Copy link
Collaborator

For consistency. Or is there a special purpose I haven't seen?

To my knowledge, both VQBeT and TDMPC are always referred to as such (google search: vqbet, tdmpc) no need for "policy", while that's much less true for diffusion and ACT.

@Wauplin
Copy link
Contributor

Wauplin commented Aug 19, 2024

As you prefer. It feels weird to me not to have the same naming convention between diffusion-policy and vqbet for example. But I'm not from the field either so feel free to ignore

@aliberts
Copy link
Collaborator

@alexander-soare, @Cadene WDYT?

@alexander-soare
Copy link
Collaborator

@alexander-soare, @Cadene WDYT?

In response to the "policy" naming. I think Diffusion Policy is the only one that needs it in the official name. Then we decided in our code to append Policy to everything and now DiffusionPolicy is weird because in some ways it should be DiffusionPolicyPolicy.

Anyway, I think this weirdness should be isolated to just our class naming. Everything else should just be "act", "vqbet", "diffusion-policy", "tdmpc".

Copy link
Collaborator

@aliberts aliberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @NielsRogge!

@aliberts aliberts merged commit 86bbd16 into huggingface:main Aug 19, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Enhancement New feature or request 🧠 Policies Something policies-related
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants