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

Aadi/sample-efficiency #24

Merged
merged 2 commits into from
Apr 22, 2024
Merged

Aadi/sample-efficiency #24

merged 2 commits into from
Apr 22, 2024

Conversation

aaprasad
Copy link
Contributor

@aaprasad aaprasad commented Nov 10, 2023

Add functionality to randomly sample chunks from dataset to be used for training to enable sample-efficiency experiments

Summary by CodeRabbit

  • New Features

    • Introduced data classes Instance and Frame for enhanced data handling in tracking applications.
    • Added new EvalDataset class for merging datasets during evaluation.
    • Implemented TrackQueue class for managing tracking queues.
    • New persistent tracking settings in model configurations to improve tracking consistency.
    • Enhanced visualization options in video annotation.
  • Enhancements

    • Improved model loading and checkpoint handling in configuration settings.
    • Refined data handling in various datasets to work with new data structures.
    • Updated inference functions to handle frames and instances more effectively.
  • Bug Fixes

    • Fixed device compatibility issues in model embedding operations.
    • Corrected bounding box calculations in data utilities.
  • Documentation

    • Updated function docstrings for clarity and consistency across modules.
  • Refactor

    • Optimized memory usage by altering data handling in post-processing.
    • Streamlined metrics evaluation in the model runner.
  • Tests

    • Expanded test coverage for new data structures and tracking functionalities.
  • Chores

    • Updated dependencies in environment configurations to support new functionalities.

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Attention: Patch coverage is 93.54839% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 75.65%. Comparing base (3f21a02) to head (e7ca49f).

❗ Current head e7ca49f differs from pull request most recent head dd51119. Consider uploading reports for the commit dd51119 to get more accurate results

Files Patch % Lines
biogtr/datasets/cell_tracking_dataset.py 80.00% 1 Missing ⚠️
biogtr/datasets/microscopy_dataset.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           aadi-device-fix      #24      +/-   ##
===================================================
+ Coverage            75.39%   75.65%   +0.25%     
===================================================
  Files                   24       24              
  Lines                 1508     1532      +24     
===================================================
+ Hits                  1137     1159      +22     
- Misses                 371      373       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aaprasad aaprasad changed the base branch from main to aadi-device-fix November 10, 2023 06:30
Co-authored-by: aaprasad <aaprasad.ucsd.edu>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

coderabbitai bot commented Apr 22, 2024

Important

Auto Review Skipped

Auto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The recent updates focus on enhancing the BioGTR framework by refining data structures, improving dataset handling, and optimizing inference and tracking functionalities. Major enhancements include the integration of new data classes for better data representation and management, adjustments in dataset modules for efficient data processing, and significant refinements in inference methods to support robust tracking and evaluation.

Changes

Files Change Summary
biogtr/data_structures.py, .../datasets/... Introduced new data classes Instance and Frame, updated dataset handling with new parameters and methods.
biogtr/config.py, .../models/... Enhanced configuration and model handling including imports, parameter updates, and method refinements.
biogtr/inference/... Improved inference functionalities, added new tracking and evaluation methods, and updated existing functions.
biogtr/training/..., environment.yml, .../environment_cpu.yml Updated training configurations, added new dependencies, and refined loss computation methods.
biogtr/visualize.py, tests/... Modified visualization tools and expanded testing coverage to include new functionalities and data structures.

Poem

🐇✨
In the land of code, where the data hops,
A rabbit tweaked the locks and props.
Frames and tracks now neatly align,
With models that learn and beautifully define.
Oh, how the bytes dance and twirl,
In this ever-updating digital world! 🌍💻
🐇✨


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@aaprasad
Copy link
Contributor Author

@coderabbitai review

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Actionable comments outside the diff hunks (1)
biogtr/models/attention_head.py (1)

Line range hint 9-9: Consider addressing the TODO about adding named tensors.

Would you like me to help implement this feature or should I open a GitHub issue to track this task?

biogtr/inference/tracker.py Show resolved Hide resolved
tests/fixtures/torch.py Show resolved Hide resolved
@@ -80,7 +81,7 @@ def main(cfg: DictConfig):
if cfg.view_batch.no_train:
return

model = train_cfg.get_gtr_runner()
model = train_cfg.get_gtr_runner() # TODO see if we can use torch.compile()
Copy link
Contributor

@coderabbitai coderabbitai bot Apr 22, 2024

Choose a reason for hiding this comment

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

Consider addressing the TODO about using torch.compile().

Would you like me to help implement this feature or should I open a GitHub issue to track this task?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

open an issue

Copy link
Contributor

Choose a reason for hiding this comment

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

@aaprasad, I've successfully opened a GitHub issue to track the task of investigating and potentially implementing torch.compile() in train.py. You can view and manage the issue here. If there's anything else you need, feel free to let me know!

Analysis chain
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Create a GitHub issue regarding the implementation of `torch.compile()` in `train.py`
gh issue create --title "Investigate and potentially implement \`torch.compile()\` in \`train.py\`" --body "There is a TODO comment in the \`train.py\` script suggesting the potential use of \`torch.compile()\`. This issue is to investigate whether \`torch.compile()\` can be beneficial for the project and, if so, to plan its implementation.

Related PR: https://github.com/talmolab/biogtr/pull/24
Comment URL: https://github.com/talmolab/biogtr/pull/24#discussion_r1575428228" --repo talmolab/biogtr

Length of output: 538

@aaprasad aaprasad marked this pull request as ready for review April 22, 2024 22:47
@aaprasad aaprasad merged commit e4dd76a into aadi-device-fix Apr 22, 2024
3 checks passed
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.

1 participant