-
Notifications
You must be signed in to change notification settings - Fork 608
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
[Benchmark] Evaluate detections with map_samples #5596
base: project/map-samples
Are you sure you want to change the base?
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
@@ -260,7 +264,26 @@ def _map_batch(args: Tuple[int, int, fomb.SampleBatch]): | |||
if process_sample_count is not None: | |||
with process_sample_count.get_lock(): | |||
process_sample_count.value += 1 | |||
except Exception as err: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want the same logic for any exception, only map function errors.
If you're seeing other errors raised not related to the map function that means our code is erroring and not the user's input for that sample. So we should just fix it instead of forwarding it along.
fiftyone/core/map/process.py
Outdated
@@ -136,8 +136,11 @@ def _map_sample_batches( | |||
if batch_count.value >= num_batches: | |||
break | |||
else: | |||
# Update progress bar | |||
pb.update() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
@@ -56,10 +63,12 @@ def update_samples( | |||
sample_collection, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above method, either remove the types or make them correct and simplified.
@j053y : we won't be merging this PR since it's a working benchmarking script :) but I will cherry-pick the bug fix and create a new PR for |
What changes are proposed in this pull request?
(Please fill in changes proposed in this fix)
How is this patch tested? If it is not, please explain why.
(Details)
Release Notes
Is this a user-facing change that should be mentioned in the release notes?
notes for FiftyOne users.
(Details in 1-2 sentences. You can just refer to another PR with a description
if this PR is part of a larger change.)
What areas of FiftyOne does this PR affect?
fiftyone
Python library changes