-
Notifications
You must be signed in to change notification settings - Fork 101
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
SLEAP 1.3.3 #1505
SLEAP 1.3.3 #1505
Conversation
* Do not try to remove item if already deleted * Lint
* Set LD_LIBRARY_PATH on mamba activate * Rename libcudart_activate.sh to sleap_activate.sh in docs * Remove comments from environment.yml
* Add version restrictions to tensorflow for pypi * Get GUI working on Linux * Add comments * Get GUI working on Windows * Get inference working on windows * Restrict urllib3 range (non-blocking error in installation) * Get training/inference working on linux minimal environment
* Add version restrictions to tensorflow for pypi * Bump to 1.3.3 * Advise 1.3.3 pip install * Get GUI working on Linux * Get GUI working on Windows * Get inference working on windows * Restrict urllib3 range (non-blocking error in installation) * Get training/inference working on linux minimal environment * Put quotes around sleap install
WalkthroughThis pull request primarily focuses on updating the SLEAP package from version 1.3.2 to 1.3.3 across various files, introducing mamba as a package manager, and improving error handling in the GUI. It also includes changes to handle TensorFlow 2.7+ detection issues and updates to dependencies. Changes
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 2
Files ignored due to filter (1)
- environment.yml
Files selected for processing (17)
- .conda/README.md (2 hunks)
- .conda/build.sh (1 hunks)
- .conda/sleap_activate.sh (1 hunks)
- .conda/sleap_deactivate.sh (1 hunks)
- .github/ISSUE_TEMPLATE/bug_report.md (1 hunks)
- docs/conf.py (1 hunks)
- docs/installation.md (2 hunks)
- docs/notebooks/Data_structures.ipynb (1 hunks)
- docs/notebooks/Interactive_and_realtime_inference.ipynb (1 hunks)
- docs/notebooks/Interactive_and_resumable_training.ipynb (1 hunks)
- docs/notebooks/Model_evaluation.ipynb (1 hunks)
- docs/notebooks/Post_inference_tracking.ipynb (1 hunks)
- docs/notebooks/Training_and_inference_on_an_example_dataset.ipynb (1 hunks)
- docs/notebooks/Training_and_inference_using_Google_Drive.ipynb (1 hunks)
- pypi_requirements.txt (1 hunks)
- sleap/gui/overlays/base.py (2 hunks)
- sleap/version.py (1 hunks)
Files skipped from review due to trivial changes (12)
- .conda/README.md
- .conda/build.sh
- .conda/sleap_activate.sh
- .conda/sleap_deactivate.sh
- .github/ISSUE_TEMPLATE/bug_report.md
- docs/conf.py
- docs/installation.md
- docs/notebooks/Post_inference_tracking.ipynb
- docs/notebooks/Training_and_inference_on_an_example_dataset.ipynb
- docs/notebooks/Training_and_inference_using_Google_Drive.ipynb
- pypi_requirements.txt
- sleap/version.py
Additional comments (Suppressed): 5
docs/notebooks/Interactive_and_realtime_inference.ipynb (1)
- 63-63: The pip install command has been updated to ensure that at least version 1.3.3 of SLEAP is installed from PyPI. This change aligns with the PR's goal of updating the software package version.
docs/notebooks/Data_structures.ipynb (1)
- 59-59: The pip installation command has been updated to install the latest version of SLEAP (at least version 1.3.3) from PyPI. Ensure that this version is available on PyPI and that it includes all the necessary dependencies for the software to function correctly.
docs/notebooks/Interactive_and_resumable_training.ipynb (1)
- 64-65: The pip install command has been updated to ensure that at least version 1.3.3 of SLEAP is installed from PyPI. This change aligns with the PR's goal of updating the software package's version number.
docs/notebooks/Model_evaluation.ipynb (1)
- 43-43: The pip install command has been updated to ensure that the latest version of SLEAP (at least version 1.3.3) is installed from PyPI. This change aligns with the PR's goal of updating the software package's version.
sleap/gui/overlays/base.py (1)
- 76-77: This line ensures that the list of items is cleared after they have been removed from the scene. This is a good practice as it prevents attempts to interact with items that no longer exist in the scene.
if self.items is None: | ||
return | ||
for item in self.items: | ||
self.player.scene.removeItem(item) | ||
try: | ||
self.player.scene.removeItem(item) | ||
|
||
except RuntimeError as e: # Internal C++ object (PySide2.QtWidgets.QGraphicsPathItem) already deleted. | ||
logger.debug(e) | ||
pass | ||
|
||
# Stop tracking the items after they been removed from the scene | ||
self.items = [] | ||
|
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.
The new code introduces exception handling when removing items from the scene. This is a good practice as it prevents the program from crashing due to a RuntimeError. However, it's important to ensure that this doesn't mask other potential issues. The error message suggests that the issue arises when trying to remove an item that has already been deleted. If this happens frequently, it might indicate a problem with the logic of the program. Consider investigating why these errors are occurring and whether they can be prevented.
try: | ||
self.player.scene.removeItem(item) | ||
|
||
except RuntimeError as e: # Internal C++ object (PySide2.QtWidgets.QGraphicsPathItem) already deleted. | ||
logger.debug(e) | ||
pass |
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.
The pass
statement after logging the exception is redundant and can be removed. Python will automatically continue execution at the next statement after the except
block.
- pass
Description
Hotfix for 1.3.2 which had inadequate restrictions on the
tensorflow
dependencies for thesleap[pypi]
extra. Also fixes an overlay issue and sets an environment variable upon activating the environment in conda packages for Linux.Types of changes
Does this address any currently open issues?
tensorflow==2.13
version incompatible insleap[pypi]==1.3.2
#1495Outside contributors checklist
Thank you for contributing to SLEAP!
❤️
Summary by CodeRabbit
mamba
package manager for faster environment creation in Conda.sleap/gui/overlays/base.py
to prevent runtime errors when removing items from the scene.pypi_requirements.txt
for better compatibility and stability.