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

[DOCS] zero-shot-detection-transformer-torch example not working #5221

Open
1 of 3 tasks
daniel-bogdoll opened this issue Dec 5, 2024 · 5 comments · Fixed by #5224
Open
1 of 3 tasks

[DOCS] zero-shot-detection-transformer-torch example not working #5221

daniel-bogdoll opened this issue Dec 5, 2024 · 5 comments · Fixed by #5224
Labels
documentation Documentation work

Comments

@daniel-bogdoll
Copy link

daniel-bogdoll commented Dec 5, 2024

URL(s) with the issue

https://docs.voxel51.com/model_zoo/models.html#zero-shot-detection-transformer-torch

Description of proposal (what needs changing)

Running the example gives the following error:

Error: OwlViTForObjectDetection.forward() missing 1 required positional argument: 'input_ids'

The examples provided here should be the correct ones, have not tested though: https://docs.voxel51.com/integrations/huggingface.html#zero-shot-object-detection

Willingness to contribute

The FiftyOne Community encourages documentation contributions. Would you or another member of your organization be willing to contribute a fix for this documentation issue to the FiftyOne codebase?

  • Yes. I can contribute a documentation fix independently
  • Yes. I would be willing to contribute a documentation fix with guidance from the FiftyOne community
  • No. I cannot contribute a documentation fix at this time
@daniel-bogdoll daniel-bogdoll added the documentation Documentation work label Dec 5, 2024
@jacobmarks
Copy link
Contributor

Hey @daniel-bogdoll , thanks for pointing this out! I think the documentation needs to add the class names, which is why this error is occurring. It should work if you add, for instance,

classes=["cat", "dog", "bird", "fish", "turtle"]

@daniel-bogdoll
Copy link
Author

daniel-bogdoll commented Dec 5, 2024

@jacobmarks Should I just go ahead and update the example in the docs?

@jacobmarks
Copy link
Contributor

Go for it!

@brimoor
Copy link
Contributor

brimoor commented Dec 5, 2024

@daniel-bogdoll Some helpful hints 😄

  1. Instructions to build the docs locally
  2. Model zoo docs are a bit unique: the model listing is generated from this template. You'll notice that if you want a custom code block for a certain model, you have to write an if block based on its name, tags, etc

Let @jacobmarks know if you need any help!

@daniel-bogdoll
Copy link
Author

@brimoor Thanks! Worked well, just one little thing I needed to do manually that was missing in the instructions:

sudo apt install pandoc

as I got

Notebook error:
PandocMissing in recipes/adding_classifications.ipynb:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants