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 python versions and dependencies #1841

Draft
wants to merge 100 commits into
base: develop
Choose a base branch
from

Conversation

eberrigan
Copy link
Contributor

@eberrigan eberrigan commented Jul 1, 2024

Description

  • The conda package for Windows and Linux currently uses Python 3.7.12 which is at its end-of-life. We would like to use the latest Python version possible for our conda build.
  • TensorFlow 2.7.0 is the current working version of TensorFlow in SLEAP for Windows and Linux. TensorFlow 2.7.0 is compatible with Python 3.7 - 3.9. TensorFlow 2.7.0 cannot be pip installed with Python 3.10.
  • We are currently using PySide 2 in both the Windows/Linux and Mac conda packages. We would like to upgrade this to PySide 6.
  • PySide 6 is dependent on SciPy which is dependent on numpy.
  • The Mac conda package uses tensorflow-macos==2.9.2, is not compatible with Python 3.11 and 3.12.
  • We will update the PyPI build dependencies as well.
  • scikit-video is replaced with imageio.v2. Code will be refactored for VideoWriter and tests will be made for new VideoWriter using imageio.v2 in a new PR.
  • QtCharts is problematic. We are removing it and using matplotlib instead. Code will be refactored for LossViewer to use MplCanvas with added functionality for plotting and tests will be made in a future PR. The QT backend for matplotlib will be updated as well.

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?

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

Summary by CodeRabbit

  • Dependency Updates

    • Updated dependencies to support Python 3.10, including numpy, scipy, scikit-learn, and pyside6.
    • Modified TensorFlow dependency to a newer version to reflect ongoing development changes.
    • Added new dependencies for imageio and imageio-ffmpeg.
  • Environment Configuration

    • Updated Conda environment files to ensure compatibility with Python 3.10 and the latest library versions. Added new channels, sleap-deps and sleap-deps/label/dev, for improved package management.
  • New Features

    • Enhanced data visualization in the training monitor by switching from QtCharts to Matplotlib, improving user experience.

Copy link

coderabbitai bot commented Jul 1, 2024

Important

Review skipped

Draft detected.

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 changes enhance the sleap project's compatibility with Python 3.10 across various configuration files. Key updates include modifying package versions, replacing pyside2 with pyside6, and introducing new dependencies like imageio. The addition of the sleap-deps channel improves package management and streamlines the development environment, promoting usability and functionality. Furthermore, the plotting mechanism has transitioned from QtCharts to Matplotlib for improved visualization.

Changes

File/Group Change Summary
.conda/..., .conda_mac/..., environment.yml, environment_mac.yml, environment_no_cuda.yml, .conda/meta.yaml Added sleap-deps channel; updated versions of numpy, pyside6, scipy, and scikit-learn for Python 3.10 compatibility. Included new dependencies like imageio and commented out outdated ones.
.github/workflows/... Modified workflow triggers to include configuration files and updated Python version from 3.7/3.9 to 3.10 for compatibility across environments.
sleap/gui/widgets/training_monitor.py Replaced QtCharts with Matplotlib for plotting, enhancing the visualization component of the application.
sleap/io/videowriter.py Removed unnecessary import for skvideo, simplifying the VideoWriterSkvideo class.

Poem

In the meadow where code takes flight,
Python 3.10 gleams, oh what a sight!
With sleap-deps bringing new cheer,
Dependencies dance, our goals are clear.
Hoppy updates make our dreams come true,
A joyful journey, all thanks to you! 🐇✨


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.
    • @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 as 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.

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

CodeRabbit Configuration 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.

coderabbitai[bot]

This comment was marked as spam.

coderabbitai[bot]

This comment was marked as spam.

coderabbitai[bot]

This comment was marked as spam.

coderabbitai[bot]

This comment was marked as spam.

coderabbitai[bot]

This comment was marked as spam.

Copy link

codecov bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.59%. Comparing base (7ed1229) to head (bdddd80).
Report is 21 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1841      +/-   ##
===========================================
+ Coverage    73.30%   73.59%   +0.29%     
===========================================
  Files          134      135       +1     
  Lines        24087    24227     +140     
===========================================
+ Hits         17658    17831     +173     
+ Misses        6429     6396      -33     

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

coderabbitai[bot]

This comment was marked as spam.

coderabbitai[bot]

This comment was marked as spam.

coderabbitai[bot]

This comment was marked as spam.

coderabbitai[bot]

This comment was marked as spam.

coderabbitai[bot]

This comment was marked as spam.

coderabbitai[bot]

This comment was marked as spam.

Otherwise: cattrs throws AttributeError: 'Attribute' object has no attribute 'alias'
coderabbitai[bot]

This comment was marked as spam.

@roomrys roomrys marked this pull request as draft August 14, 2024 21:24
@roomrys roomrys mentioned this pull request Aug 16, 2024
11 tasks
* add documentation for libraries that need to be added now that `libopencv` is required to be headless

* add necessary libraries for ubuntu CI tests

* test changes on build_manual

* match build on release to build manual so Ubuntu conda package builds with necessary openGL packages

* make stage for printing base environment info

* Make stage for installing OpenGL libraries on Ubuntu

* combine testing ubuntu and windows conda packages in one step

* test mac conda package separately

* if statement for opengl libraries on ubuntu OS only

* Make stage for conda environment creation for testing built conda package

* Change stage name

* Activate environment in the same stage as environment tests

* Copy changes from `build_manual` to `build` after testing

* Turn on upload pip wheel in `build`
@roomrys roomrys mentioned this pull request Aug 24, 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.

None yet

2 participants