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

Update to new TensorFlow conda package #1726

Merged
merged 20 commits into from
Apr 8, 2024

Conversation

eberrigan
Copy link
Contributor

@eberrigan eberrigan commented Mar 29, 2024

Description

Notes:

  • Mac CI/builds are disabled here (work continued in Fix CI on macosx-arm64 #1734)
  • Channels are still set to sleap/label/dev until the new TensorFlow v2.7.0 package is moved over to main (this will break v1.3.3 installs)

Types of changes

  • Bugfix
  • New feature
  • Refactor / Code style update (no logical changes)
  • Build / CI changes
  • Documentation Update
  • Other (explain)

Does this address any currently open issues?

#1721

Outside contributors checklist

  • Review the guidelines for contributing to this repository
  • Read and sign the CLA and add yourself to the authors list
  • Make sure you are making a pull request against the develop branch (not main). Also you should start your branch off develop
  • Add tests that prove your fix is effective or that your feature works
  • Add necessary documentation (if appropriate)

Thank you for contributing to SLEAP!

❤️

Summary by CodeRabbit

  • New Features
    • Added new dependencies qudida, albumentations, and ndx-pose to enhance functionality.
  • Changes
    • Updated the installation behavior of dependencies by modifying pip install commands.
    • Adjusted version constraints for several packages including opencv-python, tensorflow, and others to ensure compatibility and performance.
    • Improved data augmentation capabilities by modifying the uniform_noise function and adding relevant tests.
  • Bug Fixes
    • Removed unnecessary packages from requirements to streamline installation and dependency management.

Copy link

coderabbitai bot commented Mar 29, 2024

Warning

Rate Limit Exceeded

@talmo has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 3 minutes and 9 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between f0f8462 and 1960cf8.

Walkthrough

The changes made across various files aim to enhance compatibility, update dependencies, and refine functionality. These adjustments include modifying dependencies, updating version constraints, and refining scripts to address potential issues and improve the overall build and runtime environment.

Changes

Files Change Summary
.conda/bld.bat, .conda/build.sh Removed --no-binary option for qudida,albumentations in pip install command.
.conda/meta.yaml, pypi_requirements.txt,
.conda_mac/meta.yaml
Added qudida, albumentations, ndx-pose; updated version constraints; adjusted build number.
requirements.txt Updated versions; removed ndx-pose, albumentations; added tensorflow-hub for specific platforms.
sleap/nn/data/augmentation.py,
tests/nn/data/test_augmentation.py
Modified uniform_noise function; added tests for AlbumentationsAugmenter.
environment.yml, environment_no_cuda.yml Updated tensorflow version constraint.
sleap/version.py Updated version number from "1.3.3" to "1.4.0".
.github/workflows/build.yml,
.github/workflows/ci.yml
Updated macOS version in matrix configuration.
environment_mac.yml Added importlib-metadata; updated networkx; commented out tensorflow-hub.
.conda/condarc.yaml Added a commented-out channel link for sleap.

Possibly related issues

  • Issue Inference breaks in TensorFlow 2.10 #1721: The changes in TensorFlow version constraints and dependency adjustments could potentially address the inference issues mentioned, by ensuring compatibility with TensorFlow 2.7 and avoiding the problematic TensorFlow 2.10 version.
  • Issue Google Colab: GPUs: None detected #1644: By adjusting the TensorFlow version and updating dependencies, this PR might indirectly support resolving GPU detection failures in Google Colab, although the direct link is less clear without specific changes targeting CUDA/CuDNN compatibility.

🐰✨
In the land of code and binary,
A rabbit hopped, making changes finely.
Dependencies updated, versions aligned,
For better builds and peace of mind.
🌟📦
"Hop, skip, a leap," it cheerfully said,
"Towards a future, smoothly led."

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.

Copy link

@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: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between bc69dd0 and 165eae0.
Files ignored due to path filters (3)
  • environment.yml is excluded by !**/*.yml
  • environment_mac.yml is excluded by !**/*.yml
  • environment_no_cuda.yml is excluded by !**/*.yml
Files selected for processing (7)
  • .conda/bld.bat (1 hunks)
  • .conda/build.sh (1 hunks)
  • .conda/meta.yaml (2 hunks)
  • pypi_requirements.txt (2 hunks)
  • requirements.txt (2 hunks)
  • sleap/nn/data/augmentation.py (1 hunks)
  • tests/nn/data/test_augmentation.py (3 hunks)
Additional Context Used
Additional comments not posted (7)
.conda/bld.bat (1)

10-10: Removing the --no-binary qudida,albumentations option from the pip install command will allow pip to use binary distributions for these packages if available. This can lead to faster installations and potentially avoid compilation issues. However, it's recommended to add a comment explaining this change for the benefit of future maintainers.

requirements.txt (1)

2-7: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-14]

The changes to requirements.txt, including the removal of ndx-pose and albumentations and updates to version constraints for several packages, appear to be aimed at ensuring compatibility with TensorFlow 2.7.4. It's important to verify that these changes do not introduce conflicts with other dependencies and align with the project's requirements.

.conda/build.sh (1)

10-10: Removing the --no-binary qudida,albumentations option from the pip install command will allow pip to use binary distributions for these packages if available. It's recommended to add a shebang (e.g., #!/bin/bash) at the top of the script for clarity and a comment explaining this change for the benefit of future maintainers.

pypi_requirements.txt (1)

3-17: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [6-38]

The updates to pypi_requirements.txt, including the introduction of new dependencies like albumentations and ndx-pose and adjustments to version constraints for several packages, appear to be aimed at ensuring compatibility with TensorFlow 2.7.4. It's important to verify that these changes do not introduce conflicts with other dependencies and align with the project's requirements.

.conda/meta.yaml (1)

55-57: Adding new dependencies qudida, albumentations, and ndx-pose to both requirements and run sections in the .conda/meta.yaml file appears to be aimed at managing these dependencies through conda, possibly for compatibility with TensorFlow 2.7.4. It's important to verify that these additions do not introduce version conflicts and are compatible with the project's requirements.

Also applies to: 88-90

tests/nn/data/test_augmentation.py (1)

1-1: The addition of import statements, fixtures for dummy data and augmentation configuration, and tests for the AlbumentationsAugmenter class in tests/nn/data/test_augmentation.py enhances test coverage and ensures the correctness of data augmentation functionalities. The use of fixtures is commendable for organizing test data and making tests more readable and maintainable.

Also applies to: 13-63, 66-92, 144-168

sleap/nn/data/augmentation.py (1)

198-199: Adding remove_invisible=False to the A.KeypointParams declaration in the AlbumentationsAugmenter ensures that keypoints marked as invisible are not removed during the augmentation process. This change is commendable for preserving the integrity of keypoint data, which is crucial for tasks that rely on keypoints.

@eberrigan eberrigan changed the title Use TensorFlow 2.7.4 Find correct version of TensorFlow Apr 1, 2024
Copy link

codecov bot commented Apr 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.31%. Comparing base (bc69dd0) to head (1960cf8).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1726   +/-   ##
========================================
  Coverage    73.30%   73.31%           
========================================
  Files          134      134           
  Lines        24087    24087           
========================================
+ Hits         17658    17659    +1     
+ Misses        6429     6428    -1     

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

@eberrigan eberrigan requested a review from talmo April 3, 2024 16:08
Copy link

@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: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 165eae0 and 8972dd7.
Files selected for processing (4)
  • .conda/meta.yaml (3 hunks)
  • environment.yml (1 hunks)
  • environment_no_cuda.yml (1 hunks)
  • requirements.txt (1 hunks)
Additional comments not posted (5)
requirements.txt (1)

12-12: Clarify the commented-out h5py version constraint.

Consider updating the comment to explain the resolution for Linux environments and confirm that this change does not inadvertently affect Windows users.

environment_no_cuda.yml (1)

38-39: Update TensorFlow to version 2.7.0 for compatibility.

Ensure compatibility with other dependencies.

environment.yml (1)

37-38: Update TensorFlow to version 2.7.0 for GPU support.

Verify compatibility with CUDA and GPU-related dependencies.

.conda/meta.yaml (2)

35-36: Update h5py to version 3.7.0.

Ensure compatibility with other dependencies.

Also applies to: 66-67


88-89: Update TensorFlow to version 2.7.0.

Verify compatibility with TensorFlow's ecosystem.

Copy link

@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: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 8972dd7 and 5cbcf1f.
Files selected for processing (2)
  • .conda/meta.yaml (4 hunks)
  • sleap/version.py (1 hunks)
Files skipped from review due to trivial changes (1)
  • sleap/version.py
Files skipped from review as they are similar to previous changes (1)
  • .conda/meta.yaml

Copy link

@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: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 5cbcf1f and 5285ad4.
Files selected for processing (4)
  • .conda_mac/meta.yaml (3 hunks)
  • .github/workflows/build.yml (4 hunks)
  • .github/workflows/ci.yml (1 hunks)
  • environment_mac.yml (2 hunks)
Additional comments not posted (8)
environment_mac.yml (3)

12-12: Added importlib-metadata with a version constraint. Ensure this version is compatible with other dependencies.


18-18: Updated networkx version constraint to <3.3. Consider adding a comment explaining the reason for this specific version constraint for future reference.


38-38: Commented out tensorflow-hub. Verify if it's not required for TensorFlow 2.7.0 or if an alternative is needed.

.conda_mac/meta.yaml (3)

19-19: Adjusted the build number to 0, indicating a new series of builds. This is a standard practice and is approved.


57-59: Added new dependencies qudida, albumentations, and ndx-pose. Ensure these are compatible with TensorFlow 2.7.0 and other dependencies.


87-87: Commented out tensorflow-hub. Document the reason for this decision to aid future maintenance and clarity.

.github/workflows/ci.yml (1)

68-68: Updated the macOS version in the matrix configuration to macos-14. Ensure compatibility with all dependencies and the application.

.github/workflows/build.yml (1)

16-16: Updated the macOS version in the matrix configuration to macos-14. Recommend thorough testing to ensure seamless build processes on the new OS version.

eberrigan and others added 3 commits April 7, 2024 18:31
Copy link

@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: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 5285ad4 and 2972027.
Files selected for processing (1)
  • .conda/meta.yaml (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .conda/meta.yaml

Copy link

@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: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 2972027 and a5de8a6.
Files selected for processing (2)
  • .conda_mac/meta.yaml (5 hunks)
  • requirements.txt (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • .conda_mac/meta.yaml
  • requirements.txt

Copy link

@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: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between a5de8a6 and a7349a5.
Files selected for processing (3)
  • .conda/meta.yaml (4 hunks)
  • environment.yml (2 hunks)
  • environment_no_cuda.yml (2 hunks)
Files skipped from review as they are similar to previous changes (3)
  • .conda/meta.yaml
  • environment.yml
  • environment_no_cuda.yml

Copy link

@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: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between a7349a5 and ff266e0.
Files selected for processing (2)
  • .github/workflows/build.yml (4 hunks)
  • .github/workflows/build_manual.yml (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/build.yml
Additional comments not posted (5)
.github/workflows/build_manual.yml (5)

21-21: Updating the macOS version to "macos-14" in the matrix is a good move for ensuring compatibility with the specified TensorFlow version.


27-27: Using a macOS-specific condarc file is a prudent choice for handling macOS-specific build configurations.


87-87: The conditional build step for macOS, using the .conda_mac directory, is appropriate for handling platform-specific requirements.


112-112: The conditional login step for macOS aligns with the platform-specific configurations introduced earlier in the workflow.


135-138: The conditional upload step for macOS, targeting osx-arm64, ensures that macOS-specific packages are correctly handled.

Copy link

@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: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between ff266e0 and f0f8462.
Files selected for processing (7)
  • .conda/condarc.yaml (1 hunks)
  • .conda/meta.yaml (4 hunks)
  • .github/workflows/build.yml (4 hunks)
  • .github/workflows/build_manual.yml (5 hunks)
  • .github/workflows/ci.yml (1 hunks)
  • environment.yml (2 hunks)
  • requirements.txt (1 hunks)
Files skipped from review as they are similar to previous changes (6)
  • .conda/meta.yaml
  • .github/workflows/build.yml
  • .github/workflows/build_manual.yml
  • .github/workflows/ci.yml
  • environment.yml
  • requirements.txt
Additional comments not posted (1)
.conda/condarc.yaml (1)

4-4: The addition of a commented-out sleap channel link is noted. Ensure this aligns with the project's dependency management strategy and consider documenting the conditions under which it should be enabled.

@talmo talmo changed the title Find correct version of TensorFlow Update to new TensorFlow conda package Apr 8, 2024
@talmo talmo merged commit 7ed1229 into develop Apr 8, 2024
11 checks passed
@talmo talmo deleted the elizabeth/change-TensorFlow-version-in-conda-package branch April 8, 2024 03:20
@eberrigan eberrigan mentioned this pull request May 17, 2024
11 tasks
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