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

[BUG] Unexpected keyword argument 'dynamic' in labeled image parser #2302

Closed
2 of 6 tasks
radao opened this issue Nov 14, 2022 · 2 comments · Fixed by #2304
Closed
2 of 6 tasks

[BUG] Unexpected keyword argument 'dynamic' in labeled image parser #2302

radao opened this issue Nov 14, 2022 · 2 comments · Fixed by #2304
Labels
bug Bug fixes

Comments

@radao
Copy link
Contributor

radao commented Nov 14, 2022

System information

  • OS Platform and Distribution: OSX 12.4
  • Python version: 3.10
  • FiftyOne version: 0.18.0
  • FiftyOne installed from (pip or source): pip

Describe the problem

Using dataset.add_labeled_images results in an unexpected keyword argument 'dynamic'.

Code to reproduce issue

import fiftyone as fo
import fiftyone.utils.data as foud

class LabeledImageSampleParser(foud.LabeledImageSampleParser):
    @property
    def has_image_path(self) -> bool:
        return True

    @property
    def has_image_metadata(self) -> bool:
        return False

    def get_image_path(self) -> str:
        return self.current_sample["image_path"]

    @property
    def label_cls(self) -> fo.Classification:
        return fo.Classification

    def get_label(self) -> fo.Classification:
        return fo.Classification(label="my-label")

dataset = fo.Dataset()
samples = [{"image_path": "~/Downloads/u1f624_u1f920.png"}]
sample_parser = LabeledImageSampleParser()
dataset.add_labeled_images(samples, sample_parser)

Other info/logs

  File "/Users/radao/virtualenvs/ml-template/lib/python3.10/site-packages/fiftyone/core/dataset.py", line 4081, in add_labeled_images
    return foud.add_labeled_images(
TypeError: add_labeled_images() got an unexpected keyword argument 'dynamic'

What areas of FiftyOne does this bug affect?

  • App: FiftyOne application issue
  • Core: Core Python library issue
  • Server: FiftyOne server issue

Willingness to contribute

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

  • Yes. I can contribute a fix for this bug independently
  • Yes. I would be willing to contribute a fix for this bug with guidance from the FiftyOne community
  • No. I cannot contribute a bug fix at this time
@radao radao added the bug Bug fixes label Nov 14, 2022
@brimoor brimoor mentioned this issue Nov 14, 2022
@brimoor
Copy link
Contributor

brimoor commented Nov 14, 2022

Good catch! This was a regression in v0.18. I patched this in #2304 and added some tests to prevent this from happening in the future

@radao
Copy link
Contributor Author

radao commented Nov 14, 2022

Awesome, thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants