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

add guards for missing location/dimensions while rendering 3d bounding boxes #5195

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

sashankaryal
Copy link
Contributor

@sashankaryal sashankaryal commented Nov 27, 2024

What changes are proposed in this pull request?

Although it's a violation of the contract if 3D labels don't have location and dimensions properties, the app shouldn't crash if that's the case. This PR adds resilience against that behavior.

How is this patch tested? If it is not, please explain why.

Locally.

Release Notes

Is this a user-facing change that should be mentioned in the release notes?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release
    notes for FiftyOne users.

What areas of FiftyOne does this PR affect?

  • App: FiftyOne application changes
  • Build: Build and test infrastructure changes
  • Core: Core fiftyone Python library changes
  • Documentation: FiftyOne documentation changes
  • Other

Summary by CodeRabbit

  • New Features

    • Enhanced display of confusion matrices with detailed hover information.
    • Improved filtering for cuboid overlays in the 3D labels component.
    • Added functionality to compute leaky splits in datasets, improving model evaluation accuracy.
  • Bug Fixes

    • Refined logic for loading evaluations to ensure only those with results are displayed.
    • Improved error handling for dataset serialization and evaluation results processing.
  • Documentation

    • Expanded documentation on plugin development and usage, including new sections on leaky splits and plugin anatomy.

@sashankaryal sashankaryal self-assigned this Nov 27, 2024
Copy link
Contributor

coderabbitai bot commented Nov 27, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request introduces several modifications across multiple components related to model evaluation and data visualization. Key changes include enhancements to the Evaluation and EvaluationPlot components for better handling of confusion matrices and evaluation metrics. The logic for rendering cuboid overlays in the ThreeDLabels component has been refined, and various updates have been made to improve error handling and data processing in the DetectionOverlay and threed-label-processor. Additionally, documentation has been expanded to clarify plugin development and usage.

Changes

File Change Summary
app/packages/core/src/plugins/SchemaIO/components/NativeModelEvaluationView/Evaluation.tsx Updated hover template for confusion matrices, refined slicing logic for confusion matrix data, adjusted state management for evaluations.
app/packages/core/src/plugins/SchemaIO/components/NativeModelEvaluationView/EvaluationPlot.tsx Added merge import from lodash, created mergedLayout for layout construction, updated Plot component's layout prop.
app/packages/looker-3d/src/labels/index.tsx Added conditions for filtering cuboid overlays based on dimensions and location.
app/packages/looker/src/overlays/detection.ts Refined draw method in DetectionOverlay to require dimensions and location for filling 3D rectangles.
app/packages/looker/src/worker/threed-label-processor.ts Enhanced detection label processing by adding checks for location and dimensions.
docs/source/brain.rst Added section on "Leaky Splits" detailing how to compute and handle duplicates in datasets.
docs/source/plugins/developing_plugins.rst Extensive modifications for clarity on plugin development, including anatomy, setup, and examples.
docs/source/plugins/using_plugins.rst Restructured sections on downloading and managing plugins, updated command examples, and clarified operator execution.
fiftyone/core/plots/plotly.py Added gt_field and pred_field parameters to confusion matrix plotting functions for improved hover templates.
fiftyone/core/singletons.py Updated DatasetSingleton class's __call__ method to include a force argument in _update_last_loaded_at.
fiftyone/operators/builtins/panels/model_evaluation/__init__.py Modified on_load method to append only evaluations with results, added has_evaluation_results method for better organization.
fiftyone/operators/executor.py Enhanced error handling in execute_or_delegate_operator to prevent NoneType errors with inputs.
fiftyone/operators/types.py Updated argument descriptions for img method in Object and ImageView classes to clarify functionality.
fiftyone/server/query.py Modified serialize_dataset function to change dataset loading mechanism and refine error handling.
fiftyone/utils/eval/base.py Improved handling of ids in _confusion_matrix method based on tabulate_ids parameter.

Possibly related PRs

Suggested labels

bug, enhancement

Suggested reviewers

  • ritch
  • imanjra

🐰 In the forest, changes abound,
With metrics clearer, joy is found.
Confusion matrices now delight,
In every hover, data's bright!
From plots to panels, all align,
A hop of progress, oh so fine!
🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sashankaryal sashankaryal changed the base branch from develop to release/v1.1.0 November 27, 2024 19:57
@sashankaryal sashankaryal requested a review from a team November 27, 2024 19:58
@sashankaryal sashankaryal merged commit 34961bb into release/v1.1.0 Nov 27, 2024
11 of 12 checks passed
@sashankaryal sashankaryal deleted the fix/3d-bad-labels branch November 27, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants