From 5b080c7b5ded81782f89efbd0bb8e775b687cd57 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 28 Jun 2024 13:41:45 -0700 Subject: [PATCH 001/113] try python 3.12.x fpr mac conda build --- .conda_mac/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index ccfc399c0..c527fa219 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -23,7 +23,7 @@ source: requirements: host: - - conda-forge::python >=3.9.0, <3.10.0 + - conda-forge::python >=3.12.0,<3.13.0 - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::setuptools - conda-forge::packaging @@ -59,7 +59,7 @@ requirements: - conda-forge::ndx-pose run: - - conda-forge::python >=3.9.0, <3.10.0 + - conda-forge::python >=3.12.0,<3.13.0 - conda-forge::attrs >=21.2.0 - conda-forge::cattrs ==1.1.1 - conda-forge::h5py From 40c2802d7bcb0550539f9b1451618e6eb7a56da6 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 28 Jun 2024 14:54:07 -0700 Subject: [PATCH 002/113] try python 3.11.x for mac conda build --- .conda_mac/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index c527fa219..f7852c90f 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -23,7 +23,7 @@ source: requirements: host: - - conda-forge::python >=3.12.0,<3.13.0 + - conda-forge::python >=3.11.0,<3.12.0 - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::setuptools - conda-forge::packaging @@ -59,7 +59,7 @@ requirements: - conda-forge::ndx-pose run: - - conda-forge::python >=3.12.0,<3.13.0 + - conda-forge::python >=3.11.0,<3.12.0 - conda-forge::attrs >=21.2.0 - conda-forge::cattrs ==1.1.1 - conda-forge::h5py From 62bf16ddd6a19f9b946b018b221e6b96d3d9b130 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 28 Jun 2024 14:58:37 -0700 Subject: [PATCH 003/113] trying 3.10.x for mac conda build --- .conda_mac/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index f7852c90f..ca2e3741d 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -23,7 +23,7 @@ source: requirements: host: - - conda-forge::python >=3.11.0,<3.12.0 + - conda-forge::python >=3.10.0,<3.11.0 - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::setuptools - conda-forge::packaging @@ -59,7 +59,7 @@ requirements: - conda-forge::ndx-pose run: - - conda-forge::python >=3.11.0,<3.12.0 + - conda-forge::python >=3.10.0,<3.11.0 - conda-forge::attrs >=21.2.0 - conda-forge::cattrs ==1.1.1 - conda-forge::h5py From b4e5cf73ac2b469afa4553b505caa3dbe6c4b366 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 28 Jun 2024 17:10:23 -0700 Subject: [PATCH 004/113] try python 3.11.x with scipy >=1.11.1 --- .conda_mac/meta.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index ca2e3741d..ea83272d8 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -23,7 +23,8 @@ source: requirements: host: - - conda-forge::python >=3.10.0,<3.11.0 + # - conda-forge::python >=3.10.0,<3.11.0 + - conda-forge::python >=3.11.0,<3.12.0 - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::setuptools - conda-forge::packaging @@ -49,7 +50,8 @@ requirements: - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - - conda-forge::scipy >=1.4.1,<=1.9.0 + # - conda-forge::scipy >=1.4.1,<=1.9.0 + - conda-forge::scipy >=1.11.1 - conda-forge::scikit-image - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-video @@ -59,7 +61,8 @@ requirements: - conda-forge::ndx-pose run: - - conda-forge::python >=3.10.0,<3.11.0 + # - conda-forge::python >=3.10.0,<3.11.0 + - conda-forge::python >=3.11.0,<3.12.0 - conda-forge::attrs >=21.2.0 - conda-forge::cattrs ==1.1.1 - conda-forge::h5py @@ -79,7 +82,8 @@ requirements: - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - - conda-forge::scipy >=1.4.1,<=1.9.0 + # - conda-forge::scipy >=1.4.1,<=1.9.0 + - conda-forge::scipy >=1.11.1 - conda-forge::scikit-image - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-video From 0442139dc605b8836f42a685d0ad4fc9b4070a70 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Mon, 1 Jul 2024 11:08:23 -0700 Subject: [PATCH 005/113] update windows dependencies python 3.9, pyside 6, scipy and numpy --- .conda/meta.yaml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index 55a08c091..df45f089b 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -20,8 +20,10 @@ build: requirements: host: - - conda-forge::python ==3.7.12 # Run into _MAX_WINDOWS_WORKERS not found if < - - numpy >=1.19.5,<1.23.0 # Linux likes anaconda, windows likes conda-forge + # - conda-forge::python ==3.7.12 # Run into _MAX_WINDOWS_WORKERS not found if < + - conda-forge::python >=3.9.0,<3.10.0 + # - numpy >=1.19.5,<1.23.0 # Linux likes anaconda, windows likes conda-forge + - numpy >=1.21.6 # SciPy 1.11 requires numpy >=1.21.6 - conda-forge::cudatoolkit ==11.3.1 - conda-forge::cudnn=8.2.1 - nvidia::cuda-nvcc=11.3 @@ -41,13 +43,15 @@ requirements: - conda-forge::pillow >=8.3.2 - conda-forge::psutil - conda-forge::pykalman - - conda-forge::pyside2 >=5.12,<5.14 + # - conda-forge::pyside2 >=5.12,<5.14 # To ensure works correctly with QtPy. + - conda-forge::pyside6 >5.15 # >5.15 is compatible with Python 3.9 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - - conda-forge::scipy >=1.4.1,<=1.9.0 + # - conda-forge::scipy >=1.4.1,<=1.9.0 + - conda-forge::scipy >=1.11 # Python 3.9 requires scipy >=1.11 - conda-forge::scikit-image - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-video @@ -57,7 +61,10 @@ requirements: - conda-forge::ndx-pose - conda-forge::importlib-metadata ==4.11.4 run: - - conda-forge::python ==3.7.12 # Run into _MAX_WINDOWS_WORKERS not found if < + # - conda-forge::python ==3.7.12 # Run into _MAX_WINDOWS_WORKERS not found if < + - conda-forge::python >=3.9.0,<3.10.0 + # - numpy >=1.19.5,<1.23.0 # Linux likes anaconda, windows likes conda-forge + - numpy >=1.21.6 # SciPy 1.11 requires numpy >=1.21.6 - conda-forge::attrs ==21.4.0 - conda-forge::cattrs ==1.1.1 - conda-forge::cudatoolkit ==11.3.1 @@ -67,19 +74,20 @@ requirements: - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - conda-forge::networkx - - numpy >=1.19.5,<1.23.0 # Linux likes anaconda, windows likes conda-forge - conda-forge::opencv <4.9.0 - conda-forge::pandas - conda-forge::pillow >=8.3.2 - conda-forge::psutil - conda-forge::pykalman - - conda-forge::pyside2 >=5.12,<5.14 # To ensure works correctly with QtPy. + # - conda-forge::pyside2 >=5.12,<5.14 # To ensure works correctly with QtPy. + - conda-forge::pyside6 >5.15 # >5.15 is compatible with Python 3.9 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - - conda-forge::scipy >=1.4.1,<=1.9.0 + # - conda-forge::scipy >=1.4.1,<=1.9.0 + - conda-forge::scipy >=1.11 # Python 3.9 requires scipy >=1.11 - conda-forge::scikit-image - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-video From 2b01b7543a57de170a62260005dd209866430385 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Tue, 2 Jul 2024 10:08:50 -0700 Subject: [PATCH 006/113] try python 3.10, and at least pyside6 6.2, --- .conda/meta.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index df45f089b..bb1460018 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -21,7 +21,8 @@ build: requirements: host: # - conda-forge::python ==3.7.12 # Run into _MAX_WINDOWS_WORKERS not found if < - - conda-forge::python >=3.9.0,<3.10.0 + # - conda-forge::python >=3.9.0,<3.10.0 + - conda-forge::python >=3.10.0,<3.11.0 # - numpy >=1.19.5,<1.23.0 # Linux likes anaconda, windows likes conda-forge - numpy >=1.21.6 # SciPy 1.11 requires numpy >=1.21.6 - conda-forge::cudatoolkit ==11.3.1 @@ -44,14 +45,15 @@ requirements: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12,<5.14 # To ensure works correctly with QtPy. - - conda-forge::pyside6 >5.15 # >5.15 is compatible with Python 3.9 + # - conda-forge::pyside6 >5.15 # >5.15 is compatible with Python 3.9 + - conda-forge::pyside6 >=6.2.0 # >=6.2.0 is compatible with Python 3.10 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - - conda-forge::scipy >=1.11 # Python 3.9 requires scipy >=1.11 + - conda-forge::scipy >=1.11 # Python 3.9, 3.10 requires scipy >=1.11 - conda-forge::scikit-image - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-video @@ -62,7 +64,8 @@ requirements: - conda-forge::importlib-metadata ==4.11.4 run: # - conda-forge::python ==3.7.12 # Run into _MAX_WINDOWS_WORKERS not found if < - - conda-forge::python >=3.9.0,<3.10.0 + # - conda-forge::python >=3.9.0,<3.10.0 + - conda-forge::python >=3.10.0,<3.11.0 # - numpy >=1.19.5,<1.23.0 # Linux likes anaconda, windows likes conda-forge - numpy >=1.21.6 # SciPy 1.11 requires numpy >=1.21.6 - conda-forge::attrs ==21.4.0 @@ -80,14 +83,15 @@ requirements: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12,<5.14 # To ensure works correctly with QtPy. - - conda-forge::pyside6 >5.15 # >5.15 is compatible with Python 3.9 + # - conda-forge::pyside6 >5.15 # >5.15 is compatible with Python 3.9 + - conda-forge::pyside6 >=6.2.0 # >=6.2.0 is compatible with Python 3.10 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - - conda-forge::scipy >=1.11 # Python 3.9 requires scipy >=1.11 + - conda-forge::scipy >=1.11 # Python 3.9, 3.10 requires scipy >=1.11 - conda-forge::scikit-image - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-video From 61476a500a0f350a24c877283f83d348dd549892 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Mon, 8 Jul 2024 15:37:00 -0700 Subject: [PATCH 007/113] try python >=3.11.0,<3.13.0 for mac with pyside 6 --- .conda_mac/meta.yaml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index ea83272d8..ad30e324c 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -24,8 +24,10 @@ source: requirements: host: # - conda-forge::python >=3.10.0,<3.11.0 - - conda-forge::python >=3.11.0,<3.12.0 - - anaconda::numpy >=1.19.5,<1.23.0 + # - conda-forge::python >=3.11.0,<3.12.0 + - conda-forge::python >=3.11.0,<3.13.0 + # - anaconda::numpy >=1.19.5,<1.23.0 + - conda-forge::numpy >=1.21.6 - conda-forge::setuptools - conda-forge::packaging - conda-forge::pip @@ -44,16 +46,18 @@ requirements: - conda-forge::pillow - conda-forge::psutil - conda-forge::pykalman - - conda-forge::pyside2 >=5.12 + # - conda-forge::pyside2 >=5.12 + - conda-forge::pyside6 >=6.4.0 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - - conda-forge::scipy >=1.11.1 + - conda-forge::scipy >=1.11.0 - conda-forge::scikit-image - - conda-forge::scikit-learn ==1.0 + # - conda-forge::scikit-learn ==1.0 + - conda-forge::scikit-learn >=1.0.0 - conda-forge::scikit-video - conda-forge::seaborn - conda-forge::qudida @@ -62,7 +66,8 @@ requirements: run: # - conda-forge::python >=3.10.0,<3.11.0 - - conda-forge::python >=3.11.0,<3.12.0 + # - conda-forge::python >=3.11.0,<3.12.0 + - conda-forge::python >=3.11.0,<3.13.0 - conda-forge::attrs >=21.2.0 - conda-forge::cattrs ==1.1.1 - conda-forge::h5py @@ -70,22 +75,25 @@ requirements: - conda-forge::jsonpickle ==1.2 - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos - conda-forge::networkx <3.3 - - anaconda::numpy >=1.19.5,<1.23.0 + # - anaconda::numpy >=1.19.5,<1.23.0 + - conda-forge::numpy >=1.21.6 - conda-forge::opencv - conda-forge::pandas - conda-forge::pillow - conda-forge::psutil - conda-forge::pykalman - - conda-forge::pyside2 >=5.12 + # - conda-forge::pyside2 >=5.12 + - conda-forge::pyside6 >=6.4.0 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - - conda-forge::scipy >=1.11.1 + - conda-forge::scipy >=1.11.1 - conda-forge::scikit-image - - conda-forge::scikit-learn ==1.0 + # - conda-forge::scikit-learn ==1.0 + - conda-forge::scikit-learn >=1.0.0 - conda-forge::scikit-video - conda-forge::seaborn # - conda-forge::tensorflow-hub # pulls in tensorflow cpu from conda-forge From 1aa027f2457834ba22db7fd07049b08c3c930222 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 10 Jul 2024 17:16:01 -0700 Subject: [PATCH 008/113] python 3.10 for mac conda package --- .conda_mac/meta.yaml | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index ad30e324c..ac2ddb33a 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -23,11 +23,9 @@ source: requirements: host: - # - conda-forge::python >=3.10.0,<3.11.0 - # - conda-forge::python >=3.11.0,<3.12.0 - - conda-forge::python >=3.11.0,<3.13.0 + - conda-forge::python >=3.10.0,<3.11.0 # - anaconda::numpy >=1.19.5,<1.23.0 - - conda-forge::numpy >=1.21.6 + - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::setuptools - conda-forge::packaging - conda-forge::pip @@ -46,18 +44,17 @@ requirements: - conda-forge::pillow - conda-forge::psutil - conda-forge::pykalman - # - conda-forge::pyside2 >=5.12 - - conda-forge::pyside6 >=6.4.0 + - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - - conda-forge::scipy >=1.11.0 + - conda-forge::scipy >=1.7.0 # Python 3.10 needs scipy >= 1.7 - conda-forge::scikit-image # - conda-forge::scikit-learn ==1.0 - - conda-forge::scikit-learn >=1.0.0 + - conda-forge::scikit-learn >=1.0.0 # Python 3.10 needs scikit-learn >= 1.0 - conda-forge::scikit-video - conda-forge::seaborn - conda-forge::qudida @@ -65,9 +62,7 @@ requirements: - conda-forge::ndx-pose run: - # - conda-forge::python >=3.10.0,<3.11.0 - # - conda-forge::python >=3.11.0,<3.12.0 - - conda-forge::python >=3.11.0,<3.13.0 + - conda-forge::python >=3.10.0,<3.11.0 - conda-forge::attrs >=21.2.0 - conda-forge::cattrs ==1.1.1 - conda-forge::h5py @@ -76,13 +71,13 @@ requirements: - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos - conda-forge::networkx <3.3 # - anaconda::numpy >=1.19.5,<1.23.0 - - conda-forge::numpy >=1.21.6 + - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::opencv - conda-forge::pandas - conda-forge::pillow - conda-forge::psutil - conda-forge::pykalman - # - conda-forge::pyside2 >=5.12 + - conda-forge::pyside2 >=5.12 - conda-forge::pyside6 >=6.4.0 - conda-forge::python-rapidjson - conda-forge::pyyaml @@ -90,10 +85,10 @@ requirements: - conda-forge::qtpy >=2.0.1 - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - - conda-forge::scipy >=1.11.1 + - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - conda-forge::scikit-image # - conda-forge::scikit-learn ==1.0 - - conda-forge::scikit-learn >=1.0.0 + - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 - conda-forge::scikit-video - conda-forge::seaborn # - conda-forge::tensorflow-hub # pulls in tensorflow cpu from conda-forge From 1d8a480218f5a88e726956c60ef0be9f0e0639f0 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 10 Jul 2024 17:17:52 -0700 Subject: [PATCH 009/113] python 3.10 for mac dev environment --- environment_mac.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/environment_mac.yml b/environment_mac.yml index 42d6e028c..6daffef84 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -16,7 +16,8 @@ dependencies: - conda-forge::jsonpickle ==1.2 - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos - conda-forge::networkx <3.3 - - anaconda::numpy >=1.19.5,<1.23.0 + # - anaconda::numpy >=1.19.5,<1.23.0 + - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::opencv - conda-forge::pandas - conda-forge::pip @@ -24,15 +25,18 @@ dependencies: - conda-forge::psutil - conda-forge::pykalman - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::python ~=3.9 + # - conda-forge::python ~=3.9 + - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - - conda-forge::scipy >=1.4.1,<=1.9.0 + # - conda-forge::scipy >=1.4.1,<=1.9.0 + - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - conda-forge::scikit-image - - conda-forge::scikit-learn ==1.0 + # - conda-forge::scikit-learn ==1.0 + - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 - conda-forge::scikit-video - conda-forge::seaborn # - conda-forge::tensorflow-hub # pulls in tensorflow cpu from conda-forge From 79bd483a6f3347ae75f6e7d02c99c4920c46e52d Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 10 Jul 2024 17:18:17 -0700 Subject: [PATCH 010/113] python 3.10 pyside 6 for windows dev environment --- environment.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/environment.yml b/environment.yml index 9c5758c13..58535cfc4 100644 --- a/environment.yml +++ b/environment.yml @@ -15,7 +15,8 @@ dependencies: - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - conda-forge::networkx - - anaconda::numpy >=1.19.5,<1.23.0 + # - anaconda::numpy >=1.19.5,<1.23.0 + - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::opencv <4.9.0 - conda-forge::h5py <=3.7.0 - conda-forge::pandas @@ -23,16 +24,20 @@ dependencies: - conda-forge::pillow #>=8.3.1,<=8.4.0 - conda-forge::psutil - conda-forge::pykalman - - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == + # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. + - conda-forge::pyside6 >=6.2.0 # Python 3.10 needs pyside6 >=6.2.0 + # - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == + - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - - conda-forge::scipy >=1.4.1,<=1.9.0 + # - conda-forge::scipy >=1.4.1,<=1.9.0 + - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - conda-forge::scikit-image - - conda-forge::scikit-learn ==1.0 + # - conda-forge::scikit-learn ==1.0 + - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 - conda-forge::scikit-video - conda-forge::seaborn - sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated From aa43912b36ef89680c2155e702a37cf2d1fd11bb Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 10 Jul 2024 17:18:30 -0700 Subject: [PATCH 011/113] pip install tensorflow first --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5db435ec8..a54617fdf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,12 @@ # This file contains the minimal requirements to be installed via pip when using conda. # No conda packages for these +tensorflow-macos==2.9.2; sys_platform == 'darwin' and platform_machine == 'arm64' # 2.9.2 can only work up to Python 3.10 +tensorflow-metal==0.5.0; sys_platform == 'darwin' and platform_machine == 'arm64' +tensorflow-hub==0.12.0; sys_platform == 'darwin' and platform_machine == 'arm64' imgstore<0.3.0 # 0.3.3 results in https://github.com/O365/python-o365/issues/591 which is from https://github.com/regebro/tzlocal/issues/112 when tzlocal is v3.0 nixio>=1.5.3 # Constrain put on by @jgrewe from G-Node qimage2ndarray # ==1.9.0 segmentation-models -tensorflow-macos==2.9.2; sys_platform == 'darwin' and platform_machine == 'arm64' -tensorflow-metal==0.5.0; sys_platform == 'darwin' and platform_machine == 'arm64' -tensorflow-hub==0.12.0; sys_platform == 'darwin' and platform_machine == 'arm64' pynwb>=2.3.3 # 2.0.0 required by ndx-pose, 2.3.3 fixes importlib-metadata incompatibility From b69731c24ef6f7f75fe0d82dda3e8dcf77cc872d Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 10 Jul 2024 17:31:26 -0700 Subject: [PATCH 012/113] python 3.10 pyside 6 windows/linux conda package --- .conda/meta.yaml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index bb1460018..e861fd87f 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -21,10 +21,9 @@ build: requirements: host: # - conda-forge::python ==3.7.12 # Run into _MAX_WINDOWS_WORKERS not found if < - # - conda-forge::python >=3.9.0,<3.10.0 - conda-forge::python >=3.10.0,<3.11.0 # - numpy >=1.19.5,<1.23.0 # Linux likes anaconda, windows likes conda-forge - - numpy >=1.21.6 # SciPy 1.11 requires numpy >=1.21.6 + - numpy >=1.16.5 # SciPy 1.7 requires numpy >=1.16.5 - conda-forge::cudatoolkit ==11.3.1 - conda-forge::cudnn=8.2.1 - nvidia::cuda-nvcc=11.3 @@ -45,7 +44,6 @@ requirements: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12,<5.14 # To ensure works correctly with QtPy. - # - conda-forge::pyside6 >5.15 # >5.15 is compatible with Python 3.9 - conda-forge::pyside6 >=6.2.0 # >=6.2.0 is compatible with Python 3.10 - conda-forge::python-rapidjson - conda-forge::pyyaml @@ -53,9 +51,10 @@ requirements: - conda-forge::qtpy >=2.0.1 - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - - conda-forge::scipy >=1.11 # Python 3.9, 3.10 requires scipy >=1.11 + - conda-forge::scipy >=1.7.0 # Python 3.10 requires scipy >=1.7 - conda-forge::scikit-image - - conda-forge::scikit-learn ==1.0 + # - conda-forge::scikit-learn ==1.0 + - conda-forge::scikit-learn >=1.0.0 # Python 3.10 requires scikit-learn >=1.0 - conda-forge::scikit-video - conda-forge::seaborn - conda-forge::qudida @@ -64,10 +63,9 @@ requirements: - conda-forge::importlib-metadata ==4.11.4 run: # - conda-forge::python ==3.7.12 # Run into _MAX_WINDOWS_WORKERS not found if < - # - conda-forge::python >=3.9.0,<3.10.0 - conda-forge::python >=3.10.0,<3.11.0 # - numpy >=1.19.5,<1.23.0 # Linux likes anaconda, windows likes conda-forge - - numpy >=1.21.6 # SciPy 1.11 requires numpy >=1.21.6 + - numpy >=1.16.5 # SciPy 1.7 requires numpy >=1.16.5 - conda-forge::attrs ==21.4.0 - conda-forge::cattrs ==1.1.1 - conda-forge::cudatoolkit ==11.3.1 @@ -83,7 +81,6 @@ requirements: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12,<5.14 # To ensure works correctly with QtPy. - # - conda-forge::pyside6 >5.15 # >5.15 is compatible with Python 3.9 - conda-forge::pyside6 >=6.2.0 # >=6.2.0 is compatible with Python 3.10 - conda-forge::python-rapidjson - conda-forge::pyyaml @@ -91,13 +88,14 @@ requirements: - conda-forge::qtpy >=2.0.1 - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - - conda-forge::scipy >=1.11 # Python 3.9, 3.10 requires scipy >=1.11 + - conda-forge::scipy >=1.7.0 # Python 3.10 requires scipy >=1.7 - conda-forge::scikit-image - - conda-forge::scikit-learn ==1.0 + # - conda-forge::scikit-learn ==1.0 + - conda-forge::scikit-learn >=1.0.0 # Python 3.10 requires scikit-learn >=1.0 - conda-forge::scikit-video - conda-forge::seaborn - sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated - - conda-forge::tensorflow-hub <0.14.0 # Causes pynwb conflicts on linux GH-1446 + - conda-forge::tensorflow-hub <0.14.0 # Causes pynwb conflicts on linux GH-1446, why is this not in the run section? - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose From 6319b39fe2a5468f60ea2e662b534bfc99ad80a7 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 11 Jul 2024 10:58:13 -0700 Subject: [PATCH 013/113] use pyside6 in conda build for mac and python 3.10 --- .conda_mac/meta.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index ac2ddb33a..d661837b7 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -44,7 +44,8 @@ requirements: - conda-forge::pillow - conda-forge::psutil - conda-forge::pykalman - - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. + # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. + - conda-forge::pyside6 >=6.2.0 # Python 3.10 is compatible with PySide6 >=6.2.0 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq @@ -77,8 +78,8 @@ requirements: - conda-forge::pillow - conda-forge::psutil - conda-forge::pykalman - - conda-forge::pyside2 >=5.12 - - conda-forge::pyside6 >=6.4.0 + # - conda-forge::pyside2 >=5.12 + - conda-forge::pyside6 >=6.2.0 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq From 7431a98bc2b410e3c774c8e32a826a523d8a681f Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 11 Jul 2024 10:58:37 -0700 Subject: [PATCH 014/113] use pyside6 in mac environment file and python 3.10 --- environment_mac.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/environment_mac.yml b/environment_mac.yml index 6daffef84..e256e6e92 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -24,7 +24,8 @@ dependencies: - conda-forge::pillow - conda-forge::psutil - conda-forge::pykalman - - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. + # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. + - conda-forge::pyside6 >=6.2.0 # Python 3.10 is compatible with PySide6 >=6.2.0 # - conda-forge::python ~=3.9 - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson From 37d3ad260317f73b966bd8cbb04db66568720b40 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 11 Jul 2024 11:01:52 -0700 Subject: [PATCH 015/113] test pyside 6 and python 3.10 conda packages using build_manual --- .github/workflows/build_manual.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index 7cba65d67..9d426321d 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -11,7 +11,8 @@ on: - '.github/workflows/build_manual.yml' branches: # - develop - - fakebranch + # - fakebranch + - elizabeth/update-python-and-dependencies jobs: build: @@ -25,11 +26,11 @@ jobs: include: # Use this condarc as default - condarc: .conda/condarc.yaml - - pyver: "3.7" + - pyver: "3.10" # Use special condarc if macos - os: "macos-14" condarc: .conda_mac/condarc.yaml - pyver: "3.9" + pyver: "3.10" steps: # Setup - name: Checkout From 623c2209f72bacf8aad53c42a1d72e65b35356d7 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 11 Jul 2024 13:14:23 -0700 Subject: [PATCH 016/113] checking to see if qtpy is still necessary with pyside 6 --- environment.yml | 2 +- environment_mac.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 58535cfc4..9de177552 100644 --- a/environment.yml +++ b/environment.yml @@ -31,7 +31,7 @@ dependencies: - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - - conda-forge::qtpy >=2.0.1 + # - conda-forge::qtpy >=2.0.1 - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 diff --git a/environment_mac.yml b/environment_mac.yml index e256e6e92..54eca5903 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -31,7 +31,7 @@ dependencies: - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - - conda-forge::qtpy >=2.0.1 + # - conda-forge::qtpy >=2.0.1 - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 From bdddd80486db1de1888665e4b7c2908ba924f8f1 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 11 Jul 2024 15:33:15 -0700 Subject: [PATCH 017/113] qtpy not pulled in mac dev environment --- environment_mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_mac.yml b/environment_mac.yml index 54eca5903..e256e6e92 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -31,7 +31,7 @@ dependencies: - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - # - conda-forge::qtpy >=2.0.1 + - conda-forge::qtpy >=2.0.1 - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 From 33dc70a6fd4fbc0e340aa4da556a9092eeedb8dc Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 12 Jul 2024 09:51:36 -0700 Subject: [PATCH 018/113] remove scikit-video dependency since it is not maintained --- environment.yml | 2 +- environment_mac.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 9de177552..35cb4c25a 100644 --- a/environment.yml +++ b/environment.yml @@ -38,7 +38,7 @@ dependencies: - conda-forge::scikit-image # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 - - conda-forge::scikit-video + # - conda-forge::scikit-video - conda-forge::seaborn - sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated - conda-forge::tensorflow-hub # Pinned in meta.yml, but no problems here... yet diff --git a/environment_mac.yml b/environment_mac.yml index e256e6e92..9e362dacf 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -38,7 +38,7 @@ dependencies: - conda-forge::scikit-image # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 - - conda-forge::scikit-video + # - conda-forge::scikit-video - conda-forge::seaborn # - conda-forge::tensorflow-hub # pulls in tensorflow cpu from conda-forge - conda-forge::qudida From 1d8fb66476caa8893fb52aadf40c9cdd6b6d72f5 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 12 Jul 2024 09:51:55 -0700 Subject: [PATCH 019/113] comment out `VideoWriterSkvideo` for now --- sleap/io/videowriter.py | 84 ++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/sleap/io/videowriter.py b/sleap/io/videowriter.py index 510fad739..537c0b8d8 100644 --- a/sleap/io/videowriter.py +++ b/sleap/io/videowriter.py @@ -68,45 +68,45 @@ def close(self): self._writer.release() -class VideoWriterSkvideo(VideoWriter): - """Writes video using scikit-video as wrapper for ffmpeg. - - Attributes: - filename: Path to mp4 file to save to. - height: Height of movie frames. - width: Width of movie frames. - fps: Playback framerate to save at. - crf: Compression rate factor to control lossiness of video. Values go from - 2 to 32, with numbers in the 18 to 30 range being most common. Lower values - mean less compressed/higher quality. - preset: Name of the libx264 preset to use (default: "superfast"). - """ - - def __init__( - self, filename, height, width, fps, crf: int = 21, preset: str = "superfast" - ): - import skvideo.io - - fps = str(fps) - self._writer = skvideo.io.FFmpegWriter( - filename, - inputdict={ - "-r": fps, - }, - outputdict={ - "-c:v": "libx264", - "-preset": preset, - "-vf": "scale=trunc(iw/2)*2:trunc(ih/2)*2", # Need even dims for libx264 - "-framerate": fps, - "-crf": str(crf), - "-pix_fmt": "yuv420p", - }, - ) - - def add_frame(self, img, bgr: bool = False): - if bgr: - img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) - self._writer.writeFrame(img) - - def close(self): - self._writer.close() +# class VideoWriterSkvideo(VideoWriter): +# """Writes video using scikit-video as wrapper for ffmpeg. + +# Attributes: +# filename: Path to mp4 file to save to. +# height: Height of movie frames. +# width: Width of movie frames. +# fps: Playback framerate to save at. +# crf: Compression rate factor to control lossiness of video. Values go from +# 2 to 32, with numbers in the 18 to 30 range being most common. Lower values +# mean less compressed/higher quality. +# preset: Name of the libx264 preset to use (default: "superfast"). +# """ + +# def __init__( +# self, filename, height, width, fps, crf: int = 21, preset: str = "superfast" +# ): +# import skvideo.io + +# fps = str(fps) +# self._writer = skvideo.io.FFmpegWriter( +# filename, +# inputdict={ +# "-r": fps, +# }, +# outputdict={ +# "-c:v": "libx264", +# "-preset": preset, +# "-vf": "scale=trunc(iw/2)*2:trunc(ih/2)*2", # Need even dims for libx264 +# "-framerate": fps, +# "-crf": str(crf), +# "-pix_fmt": "yuv420p", +# }, +# ) + +# def add_frame(self, img, bgr: bool = False): +# if bgr: +# img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) +# self._writer.writeFrame(img) + +# def close(self): +# self._writer.close() From 81b353e7e015abfa666a023059af0985ddb1a95d Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 12 Jul 2024 09:59:23 -0700 Subject: [PATCH 020/113] add `imageio` to dev envs --- environment.yml | 1 + environment_mac.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/environment.yml b/environment.yml index 35cb4c25a..6a37b2e8a 100644 --- a/environment.yml +++ b/environment.yml @@ -19,6 +19,7 @@ dependencies: - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::opencv <4.9.0 - conda-forge::h5py <=3.7.0 + - conda-forge::imageio - conda-forge::pandas - conda-forge::pip - conda-forge::pillow #>=8.3.1,<=8.4.0 diff --git a/environment_mac.yml b/environment_mac.yml index 9e362dacf..bf876f1cc 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -12,6 +12,7 @@ dependencies: - conda-forge::importlib-metadata <7.1.0 - conda-forge::cattrs ==1.1.1 - conda-forge::h5py + - conda-forge::imageio - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos From 3c7818190509e1417b56762687f00a349d5ce1f2 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 11:02:51 -0700 Subject: [PATCH 021/113] constrain numpy <2.0 and add new tensorflow package to windows/linux conda build and remove scikitvideo --- .conda/meta.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index e861fd87f..1caebb684 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -23,7 +23,7 @@ requirements: # - conda-forge::python ==3.7.12 # Run into _MAX_WINDOWS_WORKERS not found if < - conda-forge::python >=3.10.0,<3.11.0 # - numpy >=1.19.5,<1.23.0 # Linux likes anaconda, windows likes conda-forge - - numpy >=1.16.5 # SciPy 1.7 requires numpy >=1.16.5 + - numpy >=1.16.5,<2.0 # SciPy 1.7 requires numpy >=1.16.5 - conda-forge::cudatoolkit ==11.3.1 - conda-forge::cudnn=8.2.1 - nvidia::cuda-nvcc=11.3 @@ -55,8 +55,10 @@ requirements: - conda-forge::scikit-image # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 requires scikit-learn >=1.0 - - conda-forge::scikit-video + # - conda-forge::scikit-video - conda-forge::seaborn + # - sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated + - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose @@ -65,7 +67,7 @@ requirements: # - conda-forge::python ==3.7.12 # Run into _MAX_WINDOWS_WORKERS not found if < - conda-forge::python >=3.10.0,<3.11.0 # - numpy >=1.19.5,<1.23.0 # Linux likes anaconda, windows likes conda-forge - - numpy >=1.16.5 # SciPy 1.7 requires numpy >=1.16.5 + - numpy >=1.16.5,<2.0 # SciPy 1.7 requires numpy >=1.16.5 - conda-forge::attrs ==21.4.0 - conda-forge::cattrs ==1.1.1 - conda-forge::cudatoolkit ==11.3.1 @@ -92,10 +94,11 @@ requirements: - conda-forge::scikit-image # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 requires scikit-learn >=1.0 - - conda-forge::scikit-video + # - conda-forge::scikit-video - conda-forge::seaborn - - sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated - - conda-forge::tensorflow-hub <0.14.0 # Causes pynwb conflicts on linux GH-1446, why is this not in the run section? + # - sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated + - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated + - conda-forge::tensorflow-hub <0.14.0 # Causes pynwb conflicts on linux GH-1446 - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose From 85cac3d8b46dc072f6d789c7b3b2fc75914ebe00 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 11:03:32 -0700 Subject: [PATCH 022/113] remove scikit-video, add new tensforflow package to environment_no_cuda --- environment_no_cuda.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index fc13f839a..f097c3da0 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -33,10 +33,11 @@ dependencies: - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scikit-image - conda-forge::scikit-learn ==1.0 - - conda-forge::scikit-video + # - conda-forge::scikit-video - conda-forge::seaborn # - sleap::tensorflow >=2.6.3,<2.11 # No windows GPU support for >2.10 - - sleap/label/dev::tensorflow ==2.7.0 + # - sleap/label/dev::tensorflow ==2.7.0 + - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated - conda-forge::tensorflow-hub - conda-forge::qudida - conda-forge::albumentations From c94c27b06b810f658581b71da12e39557cc6dbef Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 11:04:36 -0700 Subject: [PATCH 023/113] remove scikit-video from pypi requirements --- pypi_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pypi_requirements.txt b/pypi_requirements.txt index 62c0c0ddc..5cce9ce2b 100644 --- a/pypi_requirements.txt +++ b/pypi_requirements.txt @@ -29,7 +29,7 @@ imgaug==0.4.0 scipy>=1.4.1,<=1.9.0 scikit-image scikit-learn ==1.0.* -scikit-video +# scikit-video seaborn tensorflow>=2.6.3,<2.9; platform_machine != 'arm64' # tensorflow ==2.7.4; platform_machine != 'arm64' From 2360b5471570849a239d155e2fc7b0328f39dfc6 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 11:58:20 -0700 Subject: [PATCH 024/113] import imageio in videowriter module --- sleap/io/videowriter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sleap/io/videowriter.py b/sleap/io/videowriter.py index 537c0b8d8..78c93fe98 100644 --- a/sleap/io/videowriter.py +++ b/sleap/io/videowriter.py @@ -12,6 +12,7 @@ from abc import ABC, abstractmethod import cv2 import numpy as np +import imageio.v2 as iio class VideoWriter(ABC): From 8db9102a678ca429e05034acaac1c5fdc0ec9d41 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 15:22:49 -0700 Subject: [PATCH 025/113] add imageio, constrain pyside6 in windows conda build --- .conda/meta.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index 1caebb684..1e3437e4b 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -35,6 +35,7 @@ requirements: - conda-forge::attrs ==21.4.0 - conda-forge::cattrs ==1.1.1 - conda-forge::h5py ==3.7.0 + - conda-forge::imageio - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - conda-forge::networkx @@ -44,7 +45,7 @@ requirements: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12,<5.14 # To ensure works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0 # >=6.2.0 is compatible with Python 3.10 + - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq @@ -74,6 +75,7 @@ requirements: - conda-forge::cudnn=8.2.1 - nvidia::cuda-nvcc=11.3 - conda-forge::h5py ==3.7.0 + - conda-forge::imageio - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - conda-forge::networkx @@ -83,7 +85,7 @@ requirements: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12,<5.14 # To ensure works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0 # >=6.2.0 is compatible with Python 3.10 + - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq From 7aa164032e16da6c51bb11c7e9be14659b89830f Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 15:23:10 -0700 Subject: [PATCH 026/113] add imageio, constrain pyside6 in mac conda build --- .conda_mac/meta.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index d661837b7..5a2f7cf1e 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -35,6 +35,7 @@ requirements: - conda-forge::attrs >=21.2.0 - conda-forge::cattrs ==1.1.1 - conda-forge::h5py + - conda-forge::imageio - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos @@ -45,7 +46,7 @@ requirements: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0 # Python 3.10 is compatible with PySide6 >=6.2.0 + - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq @@ -67,6 +68,7 @@ requirements: - conda-forge::attrs >=21.2.0 - conda-forge::cattrs ==1.1.1 - conda-forge::h5py + - conda-forge::imageio - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos @@ -79,7 +81,7 @@ requirements: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 - - conda-forge::pyside6 >=6.2.0 + - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq From 46009c5dfda45e71f385f28939b5c72c0de68665 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 15:24:07 -0700 Subject: [PATCH 027/113] add imageio-ffmpeg, constrain pyside6 and use new tensorflow package in windows dev env --- environment.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 6a37b2e8a..289de9d01 100644 --- a/environment.yml +++ b/environment.yml @@ -20,13 +20,14 @@ dependencies: - conda-forge::opencv <4.9.0 - conda-forge::h5py <=3.7.0 - conda-forge::imageio + - conda-forge::imageio-ffmpeg - conda-forge::pandas - conda-forge::pip - conda-forge::pillow #>=8.3.1,<=8.4.0 - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0 # Python 3.10 needs pyside6 >=6.2.0 + - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll # - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson @@ -41,7 +42,8 @@ dependencies: - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 # - conda-forge::scikit-video - conda-forge::seaborn - - sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated + # - sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated + - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated - conda-forge::tensorflow-hub # Pinned in meta.yml, but no problems here... yet - conda-forge::qudida - conda-forge::albumentations From 20e329ace61cf937c2f51e6b875b8e62df072c1f Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 15:24:25 -0700 Subject: [PATCH 028/113] remove imgaug and add imageio to pypi requirements --- pypi_requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pypi_requirements.txt b/pypi_requirements.txt index 5cce9ce2b..97f553112 100644 --- a/pypi_requirements.txt +++ b/pypi_requirements.txt @@ -25,7 +25,8 @@ pyyaml pyzmq qtpy>=2.0.1 rich==10.16.1 -imgaug==0.4.0 +# imgaug==0.4.0 +imageio scipy>=1.4.1,<=1.9.0 scikit-image scikit-learn ==1.0.* From b9b141b6a4cc3b98c18d6d2dc11e8a22bde1b292 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 15:25:08 -0700 Subject: [PATCH 029/113] change `can_use_skvideo` to `can_use_ffmpeg` --- sleap/gui/dialogs/export_clip.py | 8 ++-- sleap/io/videowriter.py | 71 ++++++++++++++++++++++++++++---- 2 files changed, 67 insertions(+), 12 deletions(-) diff --git a/sleap/gui/dialogs/export_clip.py b/sleap/gui/dialogs/export_clip.py index 312f9a807..f84766d18 100644 --- a/sleap/gui/dialogs/export_clip.py +++ b/sleap/gui/dialogs/export_clip.py @@ -11,16 +11,16 @@ def __init__(self): super().__init__(form_name="labeled_clip_form") - can_use_skvideo = VideoWriter.can_use_skvideo() + can_use_ffmpeg = VideoWriter.can_use_ffmpeg() - if can_use_skvideo: + if can_use_ffmpeg: message = ( "MP4 file will be encoded using " - "system ffmpeg via scikit-video (preferred option)." + "system ffmpeg via imageio (preferred option)." ) else: message = ( - "Unable to use ffpmeg via scikit-video. " + "Unable to use ffpmeg via imageio. " "AVI file will be encoding using OpenCV." ) diff --git a/sleap/io/videowriter.py b/sleap/io/videowriter.py index 78c93fe98..83034cdbe 100644 --- a/sleap/io/videowriter.py +++ b/sleap/io/videowriter.py @@ -33,22 +33,26 @@ def close(self): @staticmethod def safe_builder(filename, height, width, fps): """Builds VideoWriter based on available dependencies.""" - if VideoWriter.can_use_skvideo(): - return VideoWriterSkvideo(filename, height, width, fps) + if VideoWriter.can_use_ffmpeg(): + return VideoWriterImageio(filename, height, width, fps) else: return VideoWriterOpenCV(filename, height, width, fps) @staticmethod - def can_use_skvideo(): - # See if we can import skvideo + def can_use_ffmpeg(): + """Check if ffmpeg is available for writing videos.""" try: - import skvideo + import imageio_ffmpeg as ffmpeg except ImportError: return False - # See if skvideo can find FFMPEG - if skvideo.getFFmpegVersion() != "0.0.0": - return True + try: + # Try to get the version of the ffmpeg plugin + ffmpeg_version = ffmpeg.get_ffmpeg_version() + if ffmpeg_version: + return True + except Exception: + return False return False @@ -111,3 +115,54 @@ def close(self): # def close(self): # self._writer.close() + +class VideoWriterImageio(VideoWriter): + """Writes video using imageio as a wrapper for ffmpeg. + + Attributes: + filename: Path to mp4 file to save to. + height: Height of movie frames. + width: Width of movie frames. + fps: Playback framerate to save at. + crf: Compression rate factor to control lossiness of video. Values go from + 2 to 32, with numbers in the 18 to 30 range being most common. Lower values + mean less compressed/higher quality. + preset: Name of the libx264 preset to use (default: "superfast"). + """ + + def __init__( + self, filename, height, width, fps, crf: int = 21, preset: str = "superfast" + ): + self.filename = filename + self.height = height + self.width = width + self.fps = fps + self.crf = crf + self.preset = preset + + import imageio_ffmpeg as ffmpeg + + # Imageio's ffmpeg writer parameters + # https://imageio.readthedocs.io/en/stable/examples.html#writing-videos-with-ffmpeg-and-vaapi + # iio.help(name='FFMPEG') to test + self.writer = iio.get_writer( + filename, + fps=fps, + codec='libx264', + format='FFMPEG', + pixelformat='yuv420p', + output_params=[ + '-preset', preset, + '-crf', str(crf), + '-vf', 'scale=trunc(iw/2)*2:trunc(ih/2)*2', # Ensure even dimensions + '-r', str(fps), + ] + ) + + def add_frame(self, img, bgr: bool = False): + if bgr: + img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) + self.writer.append_data(img) + + def close(self): + self.writer.close() From fd12f90472c2c93deea8f6fc1acaa2f0ad3ea75f Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 16:13:01 -0700 Subject: [PATCH 030/113] add imageio-ffmpeg to windows conda build --- .conda/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index 1e3437e4b..f69b4c3c7 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -36,6 +36,7 @@ requirements: - conda-forge::cattrs ==1.1.1 - conda-forge::h5py ==3.7.0 - conda-forge::imageio + - conda-forge::imageio-ffmpeg - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - conda-forge::networkx @@ -76,6 +77,7 @@ requirements: - nvidia::cuda-nvcc=11.3 - conda-forge::h5py ==3.7.0 - conda-forge::imageio + - conda-forge::imageio-ffmpeg - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - conda-forge::networkx From a55547100db1acabb356a1aeabeffbd826b91340 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 16:13:37 -0700 Subject: [PATCH 031/113] add imageio-ffmpeg to mac conda build --- .conda_mac/meta.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index 5a2f7cf1e..4b3e193a7 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -36,6 +36,7 @@ requirements: - conda-forge::cattrs ==1.1.1 - conda-forge::h5py - conda-forge::imageio + - conda-forge::imageio-ffmpeg - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos @@ -57,7 +58,7 @@ requirements: - conda-forge::scikit-image # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 needs scikit-learn >= 1.0 - - conda-forge::scikit-video + # - conda-forge::scikit-video - conda-forge::seaborn - conda-forge::qudida - conda-forge::albumentations @@ -69,6 +70,7 @@ requirements: - conda-forge::cattrs ==1.1.1 - conda-forge::h5py - conda-forge::imageio + - conda-forge::imageio-ffmpeg - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos @@ -92,7 +94,7 @@ requirements: - conda-forge::scikit-image # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 - - conda-forge::scikit-video + # - conda-forge::scikit-video - conda-forge::seaborn # - conda-forge::tensorflow-hub # pulls in tensorflow cpu from conda-forge - conda-forge::qudida From 54daa10daf9b55ea70a296647a54df38f16d8ab9 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 16:13:51 -0700 Subject: [PATCH 032/113] add imageio and imageio-ffmpeg to pypi requirements --- pypi_requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pypi_requirements.txt b/pypi_requirements.txt index 97f553112..6e482feea 100644 --- a/pypi_requirements.txt +++ b/pypi_requirements.txt @@ -7,6 +7,8 @@ attrs>=21.2.0,<=21.4.0 cattrs==1.1.1 # certifi>=2017.4.17,<=2021.10.8 +imageio +imageio-ffmpeg jsmin jsonpickle==1.2 networkx From 7599a060ca65046aa7f59b551e6b4dd9b3c0f932 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 16:30:45 -0700 Subject: [PATCH 033/113] remove trailing space --- environment_mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_mac.yml b/environment_mac.yml index bf876f1cc..e6503d8a1 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -38,7 +38,7 @@ dependencies: - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - conda-forge::scikit-image # - conda-forge::scikit-learn ==1.0 - - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 + - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 # - conda-forge::scikit-video - conda-forge::seaborn # - conda-forge::tensorflow-hub # pulls in tensorflow cpu from conda-forge From 3f97824665b42342d601cc05734994c1abe6d37a Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 16:31:03 -0700 Subject: [PATCH 034/113] remove pyside 6 constraint in windows dev env --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 289de9d01..af43da786 100644 --- a/environment.yml +++ b/environment.yml @@ -27,7 +27,7 @@ dependencies: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll + - conda-forge::pyside6 >=6.2.0 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll # - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson From 433575475f3ab818794b90a9353a012648db3617 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 16:43:41 -0700 Subject: [PATCH 035/113] add sleap-deps channels --- .conda/condarc.yaml | 1 + .conda_mac/condarc.yaml | 1 + environment.yml | 1 + environment_mac.yml | 1 + environment_no_cuda.yml | 1 + 5 files changed, 5 insertions(+) diff --git a/.conda/condarc.yaml b/.conda/condarc.yaml index c5fbc2d96..956cf1ac4 100644 --- a/.conda/condarc.yaml +++ b/.conda/condarc.yaml @@ -1,6 +1,7 @@ channels: - conda-forge - nvidia + - sleap-deps - https://conda.anaconda.org/sleap/label/dev - sleap - anaconda diff --git a/.conda_mac/condarc.yaml b/.conda_mac/condarc.yaml index c1be41bf1..ac8deb700 100644 --- a/.conda_mac/condarc.yaml +++ b/.conda_mac/condarc.yaml @@ -2,4 +2,5 @@ channels: - conda-forge + - sleap-deps - anaconda \ No newline at end of file diff --git a/environment.yml b/environment.yml index af43da786..1fc0e941e 100644 --- a/environment.yml +++ b/environment.yml @@ -5,6 +5,7 @@ name: sleap channels: - conda-forge - nvidia + - sleap-deps - sleap - anaconda diff --git a/environment_mac.yml b/environment_mac.yml index e6503d8a1..b45a95ae5 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -4,6 +4,7 @@ name: sleap channels: - conda-forge + - sleap-deps - anaconda dependencies: diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index f097c3da0..bef1779d4 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -6,6 +6,7 @@ name: sleap_ci channels: - conda-forge + - sleap-deps - sleap - anaconda From 72c24836a5694778f59688647625ffdc1af1d61f Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 16:44:00 -0700 Subject: [PATCH 036/113] add new tensorflow package to mac conda build --- .conda_mac/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index 4b3e193a7..9454f3595 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -60,6 +60,7 @@ requirements: - conda-forge::scikit-learn >=1.0.0 # Python 3.10 needs scikit-learn >= 1.0 # - conda-forge::scikit-video - conda-forge::seaborn + - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose @@ -97,6 +98,7 @@ requirements: # - conda-forge::scikit-video - conda-forge::seaborn # - conda-forge::tensorflow-hub # pulls in tensorflow cpu from conda-forge + - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose From cae05dadc737c32c91df4dfc8ba3c50c5a2d5ce8 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 16:44:33 -0700 Subject: [PATCH 037/113] add new tensorflow package to mac environment, imageio-ffmpeg and pyside6 constraint --- environment_mac.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/environment_mac.yml b/environment_mac.yml index b45a95ae5..6854772e8 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -14,9 +14,10 @@ dependencies: - conda-forge::cattrs ==1.1.1 - conda-forge::h5py - conda-forge::imageio + - conda-forge::imageio-ffmpeg - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos + # - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos - conda-forge::networkx <3.3 # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 @@ -27,7 +28,7 @@ dependencies: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0 # Python 3.10 is compatible with PySide6 >=6.2.0 + - conda-forge::pyside6 >=6.2.0,<6.4.1 # Python 3.10 is compatible with PySide6 >=6.2.0 # - conda-forge::python ~=3.9 - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson @@ -43,6 +44,7 @@ dependencies: # - conda-forge::scikit-video - conda-forge::seaborn # - conda-forge::tensorflow-hub # pulls in tensorflow cpu from conda-forge + - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose From e002b2c7a3f0516e450a4582eb4a09c4384680a5 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 16:56:51 -0700 Subject: [PATCH 038/113] update environment_no_cuda to test using ci --- environment_no_cuda.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index bef1779d4..6fddc13b9 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -17,29 +17,36 @@ dependencies: - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - conda-forge::networkx - - anaconda::numpy >=1.19.5,<1.23.0 + # - anaconda::numpy >=1.19.5,<1.23.0 + - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::opencv <4.9.0 + - conda-forge::h5py <=3.7.0 + - conda-forge::imageio + - conda-forge::imageio-ffmpeg - conda-forge::pandas - conda-forge::pip - conda-forge::pillow #>=8.3.1,<=8.4.0 - conda-forge::psutil - conda-forge::pykalman - - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == + # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. + - conda-forge::pyside6 >=6.2.0 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll + # - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == + - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - - conda-forge::scipy >=1.4.1,<=1.9.0 + # - conda-forge::scipy >=1.4.1,<=1.9.0 + - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - conda-forge::scikit-image - - conda-forge::scikit-learn ==1.0 + # - conda-forge::scikit-learn ==1.0 + - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 # - conda-forge::scikit-video - conda-forge::seaborn - # - sleap::tensorflow >=2.6.3,<2.11 # No windows GPU support for >2.10 - # - sleap/label/dev::tensorflow ==2.7.0 + # - sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated - - conda-forge::tensorflow-hub + - conda-forge::tensorflow-hub # Pinned in meta.yml, but no problems here... yet - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose From 9ef6623ee686fc0d22273e7712897ef8c437abae Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 16:57:02 -0700 Subject: [PATCH 039/113] turn qtpy back on in windows env --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 1fc0e941e..39c0d1fc6 100644 --- a/environment.yml +++ b/environment.yml @@ -34,7 +34,7 @@ dependencies: - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - # - conda-forge::qtpy >=2.0.1 + - conda-forge::qtpy >=2.0.1 - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 From 53f2eda677f6a7b1f7c8237ac44de05fc8cf642e Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 17:04:44 -0700 Subject: [PATCH 040/113] constrain pyside6 in environments to test using ci --- environment.yml | 2 +- environment_no_cuda.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 39c0d1fc6..bece7cbfc 100644 --- a/environment.yml +++ b/environment.yml @@ -28,7 +28,7 @@ dependencies: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll + - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll # - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index 6fddc13b9..27c48c49c 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -29,7 +29,7 @@ dependencies: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll + - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll # - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson From 87527598e70b3e99096e40d3849d28c9ce5ea1e8 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 17:23:23 -0700 Subject: [PATCH 041/113] update actions to use python 3.10 --- .github/workflows/build.yml | 4 ++-- .github/workflows/build_ci.yml | 4 ++-- .github/workflows/ci.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74203245c..c248f4140 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,11 +18,11 @@ jobs: include: # Use this condarc as default - condarc: .conda/condarc.yaml - - pyver: "3.7" + - pyver: "3.10" # Use special condarc if macos - os: "macos-14" condarc: .conda_mac/condarc.yaml - pyver: "3.9" + pyver: "3.10" steps: # Setup - name: Checkout diff --git a/.github/workflows/build_ci.yml b/.github/workflows/build_ci.yml index ac18022d6..4e2620a25 100644 --- a/.github/workflows/build_ci.yml +++ b/.github/workflows/build_ci.yml @@ -26,7 +26,7 @@ jobs: # Use this condarc as default - condarc: .conda/condarc.yaml - wheel_name: sleap-wheel-linux - - pyver: "3.7" + - pyver: "3.10" steps: # Setup - name: Checkout @@ -83,7 +83,7 @@ jobs: pip install '$wheel_path'[dev] - test_args: pytest --durations=-1 tests/ - condarc: .conda/condarc.yaml - - pyver: "3.7" + - pyver: "3.10" # Use special condarc if macos - os: "macos-14" condarc: .conda_mac/condarc.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84b028fc3..f82feb50f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,10 +31,10 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Set up Python 3.7 + - name: Set up Python 3.10 uses: actions/setup-python@v5 with: - python-version: 3.7 + python-version: 3.10 - name: Install Dependencies run: | pip install click==8.0.4 From b210e6129387ff8b9a6d90813626f064cbbb26cb Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 17:23:59 -0700 Subject: [PATCH 042/113] environment does build locally without upper pyside constraint --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index bece7cbfc..39c0d1fc6 100644 --- a/environment.yml +++ b/environment.yml @@ -28,7 +28,7 @@ dependencies: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll + - conda-forge::pyside6 >=6.2.0 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll # - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson From 4eb277405276452080f6945277052aa2f162666c Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 17:31:02 -0700 Subject: [PATCH 043/113] remove tensorflow from requirements --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index a54617fdf..d39990819 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ # This file contains the minimal requirements to be installed via pip when using conda. # No conda packages for these -tensorflow-macos==2.9.2; sys_platform == 'darwin' and platform_machine == 'arm64' # 2.9.2 can only work up to Python 3.10 -tensorflow-metal==0.5.0; sys_platform == 'darwin' and platform_machine == 'arm64' -tensorflow-hub==0.12.0; sys_platform == 'darwin' and platform_machine == 'arm64' +# tensorflow-macos==2.9.2; sys_platform == 'darwin' and platform_machine == 'arm64' # 2.9.2 can only work up to Python 3.10 +# tensorflow-metal==0.5.0; sys_platform == 'darwin' and platform_machine == 'arm64' +# tensorflow-hub==0.12.0; sys_platform == 'darwin' and platform_machine == 'arm64' imgstore<0.3.0 # 0.3.3 results in https://github.com/O365/python-o365/issues/591 which is from https://github.com/regebro/tzlocal/issues/112 when tzlocal is v3.0 nixio>=1.5.3 # Constrain put on by @jgrewe from G-Node qimage2ndarray # ==1.9.0 From 903e601874c63e40290453185c38311cdc10b678 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Jul 2024 17:33:30 -0700 Subject: [PATCH 044/113] black --- sleap/io/videowriter.py | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/sleap/io/videowriter.py b/sleap/io/videowriter.py index 83034cdbe..a27ad7b82 100644 --- a/sleap/io/videowriter.py +++ b/sleap/io/videowriter.py @@ -116,6 +116,7 @@ def close(self): # def close(self): # self._writer.close() + class VideoWriterImageio(VideoWriter): """Writes video using imageio as a wrapper for ffmpeg. @@ -141,22 +142,26 @@ def __init__( self.preset = preset import imageio_ffmpeg as ffmpeg - + # Imageio's ffmpeg writer parameters # https://imageio.readthedocs.io/en/stable/examples.html#writing-videos-with-ffmpeg-and-vaapi # iio.help(name='FFMPEG') to test self.writer = iio.get_writer( - filename, - fps=fps, - codec='libx264', - format='FFMPEG', - pixelformat='yuv420p', + filename, + fps=fps, + codec="libx264", + format="FFMPEG", + pixelformat="yuv420p", output_params=[ - '-preset', preset, - '-crf', str(crf), - '-vf', 'scale=trunc(iw/2)*2:trunc(ih/2)*2', # Ensure even dimensions - '-r', str(fps), - ] + "-preset", + preset, + "-crf", + str(crf), + "-vf", + "scale=trunc(iw/2)*2:trunc(ih/2)*2", # Ensure even dimensions + "-r", + str(fps), + ], ) def add_frame(self, img, bgr: bool = False): From 5943d0d006f7c0311a013346fea09ef626a96e81 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 19 Jul 2024 09:19:04 -0700 Subject: [PATCH 045/113] python-version needs quotes --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f82feb50f..7aac6fd33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v5 with: - python-version: 3.10 + python-version: "3.10" - name: Install Dependencies run: | pip install click==8.0.4 From 02ac22d3c954c0ac5a8e3146c05f19d9148b43d3 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 19 Jul 2024 09:59:43 -0700 Subject: [PATCH 046/113] add pyside constraint to windows --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 39c0d1fc6..bece7cbfc 100644 --- a/environment.yml +++ b/environment.yml @@ -28,7 +28,7 @@ dependencies: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll + - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll # - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson From f13c81b14f92c5186caa0471d00acbafeee03e47 Mon Sep 17 00:00:00 2001 From: roomrys <38435167+roomrys@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:49:52 -0700 Subject: [PATCH 047/113] Remove constraints on PySide6 --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index bece7cbfc..772b29469 100644 --- a/environment.yml +++ b/environment.yml @@ -28,7 +28,7 @@ dependencies: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll + - conda-forge::pyside6 # - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson From 3494e139214c795752217bfbde68d3d5d5b4824f Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 15:18:30 -0700 Subject: [PATCH 048/113] pyside 6 >=6.5.0 without QtCharts --- environment_no_cuda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index 27c48c49c..3a44fb040 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -29,7 +29,7 @@ dependencies: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll + - conda-forge::pyside6 >=6.5.0 # >=6.2 is compatible with Python 3.10, conda package exists for >=6.4, 6.4 conda package uses problematic QtCharts https://github.com/roomrys/envexp/pull/3 # - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson From b596a37d9d65799cc77dc88406c88f8c71921382 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 15:25:37 -0700 Subject: [PATCH 049/113] change pyside6 >=6.5.0 for windows conda package --- .conda/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index f69b4c3c7..373bae253 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -46,7 +46,7 @@ requirements: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12,<5.14 # To ensure works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll + - conda-forge::pyside6 >=6.5.0 # >=6.2 is compatible with Python 3.10, conda package exists for >=6.4, 6.4 conda package uses problematic QtCharts https://github.com/roomrys/envexp/pull/3 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq @@ -87,7 +87,7 @@ requirements: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12,<5.14 # To ensure works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll + - conda-forge::pyside6 >=6.5.0 # >=6.2 is compatible with Python 3.10, conda package exists for >=6.4, 6.4 conda package uses problematic QtCharts https://github.com/roomrys/envexp/pull/3 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq From bcb2127de1ba66158538bbe37102f64bfd727fd6 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 15:25:52 -0700 Subject: [PATCH 050/113] change pyside6 >=6.5.0 for windows mac package --- .conda_mac/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index 9454f3595..2e967b642 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -47,7 +47,7 @@ requirements: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll + - conda-forge::pyside6 >=6.5.0 # >=6.2 is compatible with Python 3.10, conda package exists for >=6.4, 6.4 conda package uses problematic QtCharts https://github.com/roomrys/envexp/pull/3 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq @@ -84,7 +84,7 @@ requirements: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 - - conda-forge::pyside6 >=6.2.0,<6.4.1 # >=6.2.0 is compatible with Python 3.10, <6.4.1 since newer versions are missing Qt6Charts.dll + - conda-forge::pyside6 >=6.5.0 # >=6.2 is compatible with Python 3.10, conda package exists for >=6.4, 6.4 conda package uses problematic QtCharts https://github.com/roomrys/envexp/pull/3 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq From de2e0b94715bc01949e298cdbba14d6d08ab10a7 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 15:26:09 -0700 Subject: [PATCH 051/113] change pyside6 >=6.5.0 for windows dev environment --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 772b29469..e7e0ad947 100644 --- a/environment.yml +++ b/environment.yml @@ -28,7 +28,7 @@ dependencies: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::pyside6 + - conda-forge::pyside6 >=6.5.0 # >=6.2 is compatible with Python 3.10, conda package exists for >=6.4, 6.4 conda package uses problematic QtCharts https://github.com/roomrys/envexp/pull/3 # - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson From dfe9cd735f78ddd18fde3c8ca34c8955cc8c2157 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 15:28:59 -0700 Subject: [PATCH 052/113] change pyside6 >=6.5.0 for mac dev environment --- environment_mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_mac.yml b/environment_mac.yml index 6854772e8..a03206118 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -28,7 +28,7 @@ dependencies: - conda-forge::psutil - conda-forge::pykalman # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::pyside6 >=6.2.0,<6.4.1 # Python 3.10 is compatible with PySide6 >=6.2.0 + - conda-forge::pyside6 >=6.5.0 # >=6.2 is compatible with Python 3.10, conda package exists for >=6.4, 6.4 conda package uses problematic QtCharts https://github.com/roomrys/envexp/pull/3 # - conda-forge::python ~=3.9 - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson From c92ec249e590e5679b753eab1bbed69581cc4a6f Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 15:37:19 -0700 Subject: [PATCH 053/113] remove QtCharts imports in `monitor` and `training_monitor` --- sleap/gui/widgets/monitor.py | 3 ++- sleap/gui/widgets/training_monitor.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sleap/gui/widgets/monitor.py b/sleap/gui/widgets/monitor.py index a16456983..5d125da2f 100644 --- a/sleap/gui/widgets/monitor.py +++ b/sleap/gui/widgets/monitor.py @@ -9,7 +9,8 @@ import logging from typing import Optional, Dict from qtpy import QtCore, QtWidgets, QtGui -from qtpy.QtCharts import QtCharts + +# from qtpy.QtCharts import QtCharts import attr diff --git a/sleap/gui/widgets/training_monitor.py b/sleap/gui/widgets/training_monitor.py index ed405a747..cfdd4b9de 100644 --- a/sleap/gui/widgets/training_monitor.py +++ b/sleap/gui/widgets/training_monitor.py @@ -7,7 +7,7 @@ import jsonpickle import logging from typing import Optional -from qtpy import QtCore, QtWidgets, QtGui, QtCharts +from qtpy import QtCore, QtWidgets, QtGui import attr logger = logging.getLogger(__name__) From 882983699e8312061e20b68106faf55aae298dde Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 15:51:31 -0700 Subject: [PATCH 054/113] remove constraint on opencv --- environment_no_cuda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index 3a44fb040..75a3efa15 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -19,7 +19,7 @@ dependencies: - conda-forge::networkx # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - - conda-forge::opencv <4.9.0 + - conda-forge::opencv - conda-forge::h5py <=3.7.0 - conda-forge::imageio - conda-forge::imageio-ffmpeg From 8061a060486267a05268dab0a24d5f19ade884dd Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 15:55:54 -0700 Subject: [PATCH 055/113] remove constraint on opencv --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index e7e0ad947..71ae0a407 100644 --- a/environment.yml +++ b/environment.yml @@ -18,7 +18,7 @@ dependencies: - conda-forge::networkx # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - - conda-forge::opencv <4.9.0 + - conda-forge::opencv - conda-forge::h5py <=3.7.0 - conda-forge::imageio - conda-forge::imageio-ffmpeg From fd41a73984ed52c3890f5b195d17fcbbfc636eb0 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 16:01:40 -0700 Subject: [PATCH 056/113] remove h5py constraint --- environment.yml | 3 ++- environment_no_cuda.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 71ae0a407..951768345 100644 --- a/environment.yml +++ b/environment.yml @@ -19,7 +19,8 @@ dependencies: # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::opencv - - conda-forge::h5py <=3.7.0 + # - conda-forge::h5py <=3.7.0 + - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::pandas diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index 75a3efa15..8df942390 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -20,7 +20,8 @@ dependencies: # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::opencv - - conda-forge::h5py <=3.7.0 + # - conda-forge::h5py <=3.7.0 + - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::pandas From 1423f317bf11b36b8cc728648273af6193d9fb6a Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 16:18:28 -0700 Subject: [PATCH 057/113] scikit-image 0.20.0 not working for macs --- environment_mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_mac.yml b/environment_mac.yml index a03206118..5c1204938 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -38,7 +38,7 @@ dependencies: - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - - conda-forge::scikit-image + - conda-forge::scikit-image >=0.21.0 # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 # - conda-forge::scikit-video From f67d9aa1585960a0aeb006b67ee8cdd58e4e606f Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 16:27:18 -0700 Subject: [PATCH 058/113] try scikit-image <=0.20.0 for mac --- environment_mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_mac.yml b/environment_mac.yml index 5c1204938..f6cdee000 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -38,7 +38,7 @@ dependencies: - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - - conda-forge::scikit-image >=0.21.0 + - conda-forge::scikit-image <=0.20.0 # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 # - conda-forge::scikit-video From c5ecd85adf7d011742bebd5842ed6096f0e904c1 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 16:37:37 -0700 Subject: [PATCH 059/113] tensorflow from sleap-deps channel not being found --- .conda/condarc.yaml | 2 +- .conda_mac/condarc.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.conda/condarc.yaml b/.conda/condarc.yaml index 956cf1ac4..f460747ea 100644 --- a/.conda/condarc.yaml +++ b/.conda/condarc.yaml @@ -1,7 +1,7 @@ channels: + - sleap-deps/label/dev - conda-forge - nvidia - - sleap-deps - https://conda.anaconda.org/sleap/label/dev - sleap - anaconda diff --git a/.conda_mac/condarc.yaml b/.conda_mac/condarc.yaml index ac8deb700..9dc57eb5d 100644 --- a/.conda_mac/condarc.yaml +++ b/.conda_mac/condarc.yaml @@ -1,6 +1,6 @@ # https://github.com/github/roadmap/issues/528 channels: + - sleap-deps/label/dev - conda-forge - - sleap-deps - anaconda \ No newline at end of file From 69a16cf34a8cbcee53e3be3967b99fe3f5365d70 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 16:41:48 -0700 Subject: [PATCH 060/113] try scikit-image <0.20.0 for mac env --- environment_mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_mac.yml b/environment_mac.yml index f6cdee000..655669efa 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -38,7 +38,7 @@ dependencies: - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - - conda-forge::scikit-image <=0.20.0 + - conda-forge::scikit-image <0.20.0 # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 # - conda-forge::scikit-video From 8d6141ff2a7c11f7b3bb6c0c488d984aa0e3b0ab Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 16:43:25 -0700 Subject: [PATCH 061/113] add condarc paths to build manual workflow --- .github/workflows/build_manual.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index 9d426321d..a3452f119 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -7,7 +7,9 @@ on: push: paths: - '.conda/meta.yaml' + - '.conda/condarc.yaml' - '.conda_mac/meta.yaml' + - '.conda_mac/condarc.yaml' - '.github/workflows/build_manual.yml' branches: # - develop From 8b9629f0339c04389a2b8c604e4e201f802564f9 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 31 Jul 2024 16:56:24 -0700 Subject: [PATCH 062/113] add sleap-deps/label/dev to environment file channels just in case --- environment.yml | 1 + environment_mac.yml | 3 ++- environment_no_cuda.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 951768345..d5f306089 100644 --- a/environment.yml +++ b/environment.yml @@ -3,6 +3,7 @@ name: sleap channels: + - sleap-deps/label/dev - conda-forge - nvidia - sleap-deps diff --git a/environment_mac.yml b/environment_mac.yml index 655669efa..25a811202 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -3,6 +3,7 @@ name: sleap channels: + - sleap-deps/label/dev - conda-forge - sleap-deps - anaconda @@ -38,7 +39,7 @@ dependencies: - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - - conda-forge::scikit-image <0.20.0 + - conda-forge::scikit-image # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 # - conda-forge::scikit-video diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index 8df942390..248f6f3da 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -5,6 +5,7 @@ name: sleap_ci channels: + - sleap-deps/label/dev - conda-forge - sleap-deps - sleap From 822ace373ffe092a4b5e081b68b4228eaf5d133d Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 08:49:47 -0700 Subject: [PATCH 063/113] remove tensorflow dependency that is now in mac tensorflow conda package --- .conda_mac/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index 2e967b642..0fcd92b53 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -39,7 +39,7 @@ requirements: - conda-forge::imageio-ffmpeg - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos + # - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos in sleap-deps now - conda-forge::networkx <3.3 - conda-forge::opencv - conda-forge::pandas @@ -74,7 +74,7 @@ requirements: - conda-forge::imageio-ffmpeg - conda-forge::jsmin - conda-forge::jsonpickle ==1.2 - - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos + # - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos in sleap-deps now - conda-forge::networkx <3.3 # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 From 3d3322b64441c01a760615ee140dfffda06bd2a4 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 09:09:53 -0700 Subject: [PATCH 064/113] try removing cattrs and jsonpickle constraints --- environment.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index d5f306089..4a944f6f4 100644 --- a/environment.yml +++ b/environment.yml @@ -13,9 +13,11 @@ channels: dependencies: # Packages SLEAP uses directly - conda-forge::attrs >=21.2.0 #,<=21.4.0 - - conda-forge::cattrs ==1.1.1 + # - conda-forge::cattrs ==1.1.1 + - conda-forge::cattrs - conda-forge::jsmin - - conda-forge::jsonpickle ==1.2 + # - conda-forge::jsonpickle ==1.2 + - conda-forge::jsonpickle - conda-forge::networkx # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 From 017ec1f4557a5c05817b7a4b30d4e9b22273408a Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 09:11:46 -0700 Subject: [PATCH 065/113] try removing importlib-metadata, cattrs, jsonpickle, networkx constraints fomr mac environment --- environment_mac.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/environment_mac.yml b/environment_mac.yml index 25a811202..5bb0d56bc 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -11,15 +11,19 @@ channels: dependencies: # Packages SLEAP uses directly - conda-forge::attrs >=21.2.0 - - conda-forge::importlib-metadata <7.1.0 - - conda-forge::cattrs ==1.1.1 + # - conda-forge::importlib-metadata <7.1.0 + - conda-forge::importlib-metadata + # - conda-forge::cattrs ==1.1.1 + - conda-forge::cattrs - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::jsmin - - conda-forge::jsonpickle ==1.2 + # - conda-forge::jsonpickle ==1.2 + - conda-forge::jsonpickle # - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos - - conda-forge::networkx <3.3 + # - conda-forge::networkx <3.3 + - conda-forge::networkx # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::opencv From 30e8fa57dd846f1e9bedbb55a89a5c531f6abfa5 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 09:17:32 -0700 Subject: [PATCH 066/113] try scitkit-image >=0.21.0 for python compatibility --- environment_mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_mac.yml b/environment_mac.yml index 5bb0d56bc..e0c5e9218 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -43,7 +43,7 @@ dependencies: - conda-forge::rich # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - - conda-forge::scikit-image + - conda-forge::scikit-image >= 0.21.0 # package scikit-image-0.20.0-py38hfaca753_0 requires python_abi 3.8.* *_cp38 # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 # - conda-forge::scikit-video From f4bc279fb8b009c7fe2d3f649a187ea963df1f16 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 09:25:40 -0700 Subject: [PATCH 067/113] remove cattrs and jsonpickle constraints from environment_no_cuda --- environment_no_cuda.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index 248f6f3da..6136e0be7 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -14,9 +14,11 @@ channels: dependencies: # Packages SLEAP uses directly - conda-forge::attrs >=21.2.0 #,<=21.4.0 - - conda-forge::cattrs ==1.1.1 + # - conda-forge::cattrs ==1.1.1 + - conda-forge::cattrs - conda-forge::jsmin - - conda-forge::jsonpickle ==1.2 + # - conda-forge::jsonpickle ==1.2 + - conda-forge::jsonpickle - conda-forge::networkx # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 From e6c46d7942b59509d3c660b5b2d2afffd4e53c4e Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 09:28:57 -0700 Subject: [PATCH 068/113] remove cattrs and json pickle and networkx constraints from mac sleap conda package --- .conda_mac/meta.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index 0fcd92b53..c46c0bacd 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -33,14 +33,17 @@ requirements: # Only the packages above are required to build, but listing them all ensures no # unnecessary pypi packages are installed via the build script (bld.bat, build.sh) - conda-forge::attrs >=21.2.0 - - conda-forge::cattrs ==1.1.1 + # - conda-forge::cattrs ==1.1.1 + - conda-forge::cattrs - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::jsmin - - conda-forge::jsonpickle ==1.2 + # - conda-forge::jsonpickle ==1.2 + - conda-forge::jsonpickle # - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos in sleap-deps now - - conda-forge::networkx <3.3 + # - conda-forge::networkx <3.3 + - conda-forge::networkx - conda-forge::opencv - conda-forge::pandas - conda-forge::pillow @@ -68,14 +71,17 @@ requirements: run: - conda-forge::python >=3.10.0,<3.11.0 - conda-forge::attrs >=21.2.0 - - conda-forge::cattrs ==1.1.1 + # - conda-forge::cattrs ==1.1.1 + - conda-forge::cattrs - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::jsmin - - conda-forge::jsonpickle ==1.2 + # - conda-forge::jsonpickle ==1.2 + - conda-forge::jsonpickle # - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos in sleap-deps now - - conda-forge::networkx <3.3 + # - conda-forge::networkx <3.3 + - conda-forge::networkx # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::opencv From cfad8de353e206d1ba3581304cd385383ce486dc Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 09:34:33 -0700 Subject: [PATCH 069/113] remove attrs, cattrs. h5py, jsonpickle, opencv, importlib-metadata, tensorflow-hub constrains from windows/linux conda package --- .conda/meta.yaml | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index 373bae253..cb090a829 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -32,15 +32,20 @@ requirements: # Only the packages above are required to build, but listing them all ensures no # unnecessary pypi packages are installed via the build script (bld.bat, build.sh) - - conda-forge::attrs ==21.4.0 - - conda-forge::cattrs ==1.1.1 - - conda-forge::h5py ==3.7.0 + # - conda-forge::attrs ==21.4.0 + - conda-forge::attrs + # - conda-forge::cattrs ==1.1.1 + - conda-forge::cattrs + # - conda-forge::h5py ==3.7.0 + - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::jsmin - - conda-forge::jsonpickle ==1.2 + # - conda-forge::jsonpickle ==1.2 + - conda-forge::jsonpickle - conda-forge::networkx - - conda-forge::opencv <4.9.0 + # - conda-forge::opencv <4.9.0 + - conda-forge::opencv - conda-forge::pandas - conda-forge::pillow >=8.3.2 - conda-forge::psutil @@ -64,24 +69,30 @@ requirements: - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose - - conda-forge::importlib-metadata ==4.11.4 + # - conda-forge::importlib-metadata ==4.11.4 + - conda-forge::importlib-metadata run: # - conda-forge::python ==3.7.12 # Run into _MAX_WINDOWS_WORKERS not found if < - conda-forge::python >=3.10.0,<3.11.0 # - numpy >=1.19.5,<1.23.0 # Linux likes anaconda, windows likes conda-forge - numpy >=1.16.5,<2.0 # SciPy 1.7 requires numpy >=1.16.5 - - conda-forge::attrs ==21.4.0 - - conda-forge::cattrs ==1.1.1 + # - conda-forge::attrs ==21.4.0 + - conda-forge::attrs + # - conda-forge::cattrs ==1.1.1 + - conda-forge::cattrs - conda-forge::cudatoolkit ==11.3.1 - conda-forge::cudnn=8.2.1 - nvidia::cuda-nvcc=11.3 - - conda-forge::h5py ==3.7.0 + # - conda-forge::h5py ==3.7.0 + - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::jsmin - - conda-forge::jsonpickle ==1.2 + # - conda-forge::jsonpickle ==1.2 + - conda-forge::jsonpickle - conda-forge::networkx - - conda-forge::opencv <4.9.0 + # - conda-forge::opencv <4.9.0 + - conda-forge::opencv - conda-forge::pandas - conda-forge::pillow >=8.3.2 - conda-forge::psutil @@ -102,11 +113,13 @@ requirements: - conda-forge::seaborn # - sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated - - conda-forge::tensorflow-hub <0.14.0 # Causes pynwb conflicts on linux GH-1446 + # - conda-forge::tensorflow-hub <0.14.0 # Causes pynwb conflicts on linux GH-1446 + - conda-forge::tensorflow-hub - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose - - conda-forge::importlib-metadata ==4.11.4 + # - conda-forge::importlib-metadata ==4.11.4 + - conda-forge::importlib-metadata # This no longer works so we have moved it to the build workflow # https://github.com/talmolab/sleap/pull/1744 From ad556ce286231e3d3fe7857876d0a2995f68c64d Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 10:27:19 -0700 Subject: [PATCH 070/113] add matplotlib qt backend --- sleap/gui/widgets/training_monitor.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sleap/gui/widgets/training_monitor.py b/sleap/gui/widgets/training_monitor.py index cfdd4b9de..80c231f39 100644 --- a/sleap/gui/widgets/training_monitor.py +++ b/sleap/gui/widgets/training_monitor.py @@ -9,6 +9,10 @@ from typing import Optional from qtpy import QtCore, QtWidgets, QtGui import attr +import matplotlib.pyplot as plt + +plt.use("QtAgg") +from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as FigureCanvas logger = logging.getLogger(__name__) @@ -78,7 +82,9 @@ def reset( what: String identifier indicating which job type the current run corresponds to. """ - self.chart = QtCharts.QChart() + self.fig, self.ax = plt.subplots() + self.canvas = FigureCanvas(self.fig) + self.setCentralWidget(self.canvas) self.series = dict() From 514972c71f53cf5d2d96bf3b5d746a377fc55e3c Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 10:54:45 -0700 Subject: [PATCH 071/113] try linux build fix for libegl error --- .conda/meta.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index cb090a829..1eeb5232b 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -125,4 +125,9 @@ requirements: # https://github.com/talmolab/sleap/pull/1744 # test: # imports: -# - sleap \ No newline at end of file +# - sleap +test: + requires: + - pip + # https://github.com/conda-forge/opencv-feedstock/issues/401#issuecomment-2028099423 + - libopencv *=headless* # [linux] \ No newline at end of file From 0ca5a73dff54c1fbbf6b2350fe6cc2287d94786e Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 11:04:59 -0700 Subject: [PATCH 072/113] do we require pip? --- .conda/meta.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index 1eeb5232b..bca068879 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -128,6 +128,4 @@ requirements: # - sleap test: requires: - - pip - # https://github.com/conda-forge/opencv-feedstock/issues/401#issuecomment-2028099423 - - libopencv *=headless* # [linux] \ No newline at end of file + - libopencv *=headless* # [linux] https://github.com/conda-forge/opencv-feedstock/issues/401#issuecomment-2028099423 \ No newline at end of file From 40f9b3495fe51bd67471b68a8a29c646d36126a0 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 11:06:48 -0700 Subject: [PATCH 073/113] try libopencv fix for linux in environment for CI --- environment_no_cuda.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index 6136e0be7..32a6c4353 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -54,6 +54,7 @@ dependencies: - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose + - libopencv *headless* # [linux] - pip: - "--editable=.[conda_dev]" \ No newline at end of file From 3545ac8d629ecb16ae7d67d4779033364dba39f7 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 11:12:55 -0700 Subject: [PATCH 074/113] include pip check --- .conda/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index bca068879..a3dcfeb53 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -128,4 +128,5 @@ requirements: # - sleap test: requires: + - pip - libopencv *=headless* # [linux] https://github.com/conda-forge/opencv-feedstock/issues/401#issuecomment-2028099423 \ No newline at end of file From a2b12730d3daa06b0547760e401ab5bb5583eab2 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 11:35:50 -0700 Subject: [PATCH 075/113] try headless libopencv from conda-forge channel in CI env --- environment_no_cuda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index 32a6c4353..bb1c5abf2 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -54,7 +54,7 @@ dependencies: - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose - - libopencv *headless* # [linux] + - conda-forge::libopencv *=headless* - pip: - "--editable=.[conda_dev]" \ No newline at end of file From a9742065e528f88b740b5ee3d26ee2c09e03d39a Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 11:41:42 -0700 Subject: [PATCH 076/113] try removing opencv --- environment.yml | 1 + environment_no_cuda.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 4a944f6f4..3c6230e10 100644 --- a/environment.yml +++ b/environment.yml @@ -53,6 +53,7 @@ dependencies: - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose + - conda-forge::libopencv *=headless* # https://github.com/nebari-dev/nebari-docs/issues/443 # Packages required by tensorflow to find/use GPUs - conda-forge::cudatoolkit ==11.3.1 diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index bb1c5abf2..5a1b085e0 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -22,7 +22,7 @@ dependencies: - conda-forge::networkx # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - - conda-forge::opencv + # - conda-forge::opencv # - conda-forge::h5py <=3.7.0 - conda-forge::h5py - conda-forge::imageio @@ -54,7 +54,7 @@ dependencies: - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose - - conda-forge::libopencv *=headless* + - conda-forge::libopencv *=headless* # https://github.com/nebari-dev/nebari-docs/issues/443 - pip: - "--editable=.[conda_dev]" \ No newline at end of file From 544b9ecadd314670a8d5d2a831373a44b9fffde3 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 11:51:02 -0700 Subject: [PATCH 077/113] try any channel libopencv *=headless* --- environment.yml | 1 - environment_no_cuda.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 3c6230e10..4a944f6f4 100644 --- a/environment.yml +++ b/environment.yml @@ -53,7 +53,6 @@ dependencies: - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose - - conda-forge::libopencv *=headless* # https://github.com/nebari-dev/nebari-docs/issues/443 # Packages required by tensorflow to find/use GPUs - conda-forge::cudatoolkit ==11.3.1 diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index 5a1b085e0..6dd361ab9 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -54,7 +54,7 @@ dependencies: - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose - - conda-forge::libopencv *=headless* # https://github.com/nebari-dev/nebari-docs/issues/443 + - libopencv *=headless* # https://github.com/nebari-dev/nebari-docs/issues/443 - pip: - "--editable=.[conda_dev]" \ No newline at end of file From 9ec64e8b7cd3379c2c03a9c0917125fe80927c4f Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 11:56:57 -0700 Subject: [PATCH 078/113] libopencv *=headless* break windows env --- environment_no_cuda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index 6dd361ab9..d1c72f5b4 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -54,7 +54,7 @@ dependencies: - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose - - libopencv *=headless* # https://github.com/nebari-dev/nebari-docs/issues/443 + # - libopencv *=headless* # [linux] https://github.com/nebari-dev/nebari-docs/issues/443 - pip: - "--editable=.[conda_dev]" \ No newline at end of file From 48d12deecc8f98c9f222ce0897cf31ae0cce73cb Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 15:18:38 -0700 Subject: [PATCH 079/113] replace qt5agg backend for matplotplib with updated qtagg --- sleap/gui/widgets/mpl.py | 4 ++-- sleap/nn/training.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sleap/gui/widgets/mpl.py b/sleap/gui/widgets/mpl.py index a9b7fc838..9816c9032 100644 --- a/sleap/gui/widgets/mpl.py +++ b/sleap/gui/widgets/mpl.py @@ -6,11 +6,11 @@ from qtpy import QtWidgets from matplotlib.figure import Figure -from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as Canvas +from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as Canvas import matplotlib # Ensure using PyQt5 backend -matplotlib.use("QT5Agg") +matplotlib.use("QtAgg") class MplCanvas(Canvas): diff --git a/sleap/nn/training.py b/sleap/nn/training.py index 6a64e43b6..97fe7573c 100644 --- a/sleap/nn/training.py +++ b/sleap/nn/training.py @@ -508,7 +508,7 @@ def setup_visualization( callbacks = [] try: - matplotlib.use("Qt5Agg") + matplotlib.use("QtAgg") except ImportError: print( "Unable to use Qt backend for matplotlib. " From 355e252677e143931bf0d3be404dd1faf5af91f9 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 15:20:23 -0700 Subject: [PATCH 080/113] add matplotlib functions to mplcanvas class --- sleap/gui/widgets/mpl.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sleap/gui/widgets/mpl.py b/sleap/gui/widgets/mpl.py index 9816c9032..2c11488dc 100644 --- a/sleap/gui/widgets/mpl.py +++ b/sleap/gui/widgets/mpl.py @@ -26,3 +26,23 @@ def __init__(self, width=5, height=4, dpi=100): self, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding ) Canvas.updateGeometry(self) + self.series = {} + + def add_scatter(self, key, x, y, label, color, size): + if key in self.series: + self.series[key].remove() + scatter = self.axes.scatter(x, y, label=label, color=color, s=size) + self.series[key] = scatter + self.draw() + + def add_line(self, key, x, y, label, color, width): + if key in self.series: + self.series[key].remove() + (line,) = self.axes.plot(x, y, label=label, color=color, linewidth=width) + self.series[key] = line + self.draw() + + def clear(self): + self.axes.cla() + self.series.clear() + self.draw() From 51b13bae1b32b2a2866052839a26bce6b557d25a Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 15:20:53 -0700 Subject: [PATCH 081/113] start replacing qtcharts with mpl --- sleap/gui/widgets/training_monitor.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sleap/gui/widgets/training_monitor.py b/sleap/gui/widgets/training_monitor.py index 80c231f39..92eb342e8 100644 --- a/sleap/gui/widgets/training_monitor.py +++ b/sleap/gui/widgets/training_monitor.py @@ -9,10 +9,7 @@ from typing import Optional from qtpy import QtCore, QtWidgets, QtGui import attr -import matplotlib.pyplot as plt - -plt.use("QtAgg") -from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as FigureCanvas +from sleap.gui.widgets.mpl import MplCanvas logger = logging.getLogger(__name__) @@ -82,16 +79,22 @@ def reset( what: String identifier indicating which job type the current run corresponds to. """ - self.fig, self.ax = plt.subplots() - self.canvas = FigureCanvas(self.fig) + self.canvas = MplCanvas(width=5, height=4, dpi=100) self.setCentralWidget(self.canvas) - self.series = dict() - COLOR_TRAIN = (18, 158, 220) COLOR_VAL = (248, 167, 52) COLOR_BEST_VAL = (151, 204, 89) + # Add scatter series for batch training loss + self.canvas.add_scatter( + key="batch", + x=x_batch, + y=y_batch, + label="Batch Training Loss", + color=COLOR_TRAIN + "80", # Color with alpha + size=64, + ) self.series["batch"] = QtCharts.QScatterSeries() self.series["batch"].setName("Batch Training Loss") self.series["batch"].setColor(QtGui.QColor(*COLOR_TRAIN, 48)) From 9af76197d743dfe2f479008264dd5a78acc8a92a Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 1 Aug 2024 17:49:38 -0700 Subject: [PATCH 082/113] add linux libraries to runner environment when os is linux --- .github/workflows/build_ci.yml | 1 + .github/workflows/build_manual.yml | 42 +++++++++++++++++++++++++++--- .github/workflows/ci.yml | 7 +++++ 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_ci.yml b/.github/workflows/build_ci.yml index 4e2620a25..6f54d838b 100644 --- a/.github/workflows/build_ci.yml +++ b/.github/workflows/build_ci.yml @@ -93,6 +93,7 @@ jobs: # Otherwise core dumped in github actions test_args: | sudo apt install xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 + sudo apt-get install libglapi-mesa libegl-mesa0 libegl1 libopengl0 libgl1-mesa-glx sudo Xvfb :1 -screen 0 1024x768x24 > "$GITHUB_ENV" - # Test built conda package (Ubuntu and Windows) - - name: Test built conda package (Ubuntu and Windows) - if: matrix.os != 'macos-14' + # Test built conda package (Ubuntu) + - name: Test built conda package (Ubuntu) + if: matrix.os == 'ubuntu-22.04' + shell: bash -l {0} + run: | + echo "Current build path: $BUILD_PATH" + conda deactivate + + echo "Python executable before activating environment:" + which python + echo "Python version before activating environment:" + python --version + echo "Conda info before activating environment:" + conda info + + echo "Creating and testing conda environment with sleap package..." + sudo apt-get update + sudo apt-get install libglapi-mesa libegl-mesa0 libegl1 libopengl0 libgl1-mesa-glx + conda create -y -n sleap_test -c file://$BUILD_PATH -c sleap/label/dev -c conda-forge -c nvidia -c anaconda sleap + conda activate sleap_test + + echo "Python executable after activating sleap_test environment:" + which python + echo "Python version after activating sleap_test environment:" + python --version + echo "Conda info after activating sleap_test environment:" + conda info + echo "List of installed conda packages in the sleap_test environment:" + conda list + echo "List of installed pip packages in the sleap_test environment:" + pip list + + echo "Testing sleap package installation..." + sleap_version=$(python -c "import sleap; print(sleap.__version__)") + echo "Test completed using sleap version: $sleap_version" + + # Test built conda package (Windows) + - name: Test built conda package (Windows) + if: matrix.os == 'windows-2022' shell: bash -l {0} run: | echo "Current build path: $BUILD_PATH" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7aac6fd33..e6932ab7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,6 +62,13 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 + - name: Add Linux libraries + if: matrix.os == 'ubuntu-22.04' + # https://github.com/conda-forge/opencv-feedstock/issues/401#issue-2196393732 + run: | + sudo apt-get update + sudo apt-get install -y libgl1-mesa-glx + - name: Setup Conda uses: conda-incubator/setup-miniconda@v3.0.3 with: From 314b9f5852827998bd864a0966b127522e77e122 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 2 Aug 2024 08:37:13 -0700 Subject: [PATCH 083/113] init series --- sleap/gui/widgets/training_monitor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sleap/gui/widgets/training_monitor.py b/sleap/gui/widgets/training_monitor.py index 92eb342e8..6eaee8663 100644 --- a/sleap/gui/widgets/training_monitor.py +++ b/sleap/gui/widgets/training_monitor.py @@ -86,11 +86,13 @@ def reset( COLOR_VAL = (248, 167, 52) COLOR_BEST_VAL = (151, 204, 89) + x_batch_init = [] + y_batch_init = [] # Add scatter series for batch training loss self.canvas.add_scatter( key="batch", - x=x_batch, - y=y_batch, + x=x_batch_init, + y=y_batch_init, label="Batch Training Loss", color=COLOR_TRAIN + "80", # Color with alpha size=64, From 0e8861a47d98c296ddc410e101b39d24379cc36d Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 2 Aug 2024 08:37:23 -0700 Subject: [PATCH 084/113] change variable names --- sleap/gui/widgets/mpl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sleap/gui/widgets/mpl.py b/sleap/gui/widgets/mpl.py index 2c11488dc..a1789765f 100644 --- a/sleap/gui/widgets/mpl.py +++ b/sleap/gui/widgets/mpl.py @@ -28,10 +28,10 @@ def __init__(self, width=5, height=4, dpi=100): Canvas.updateGeometry(self) self.series = {} - def add_scatter(self, key, x, y, label, color, size): + def add_scatter(self, key, x, y, label, color, markersize): if key in self.series: self.series[key].remove() - scatter = self.axes.scatter(x, y, label=label, color=color, s=size) + scatter = self.axes.scatter(x, y, label=label, color=color, s=markersize) self.series[key] = scatter self.draw() From 096b84b9d9be87e4aa8c1df18b3bf7a8bd143018 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 2 Aug 2024 16:53:46 -0700 Subject: [PATCH 085/113] remove `VideoWriter` changes --- sleap/io/videowriter.py | 115 ++++++++++------------------------------ 1 file changed, 27 insertions(+), 88 deletions(-) diff --git a/sleap/io/videowriter.py b/sleap/io/videowriter.py index a27ad7b82..510fad739 100644 --- a/sleap/io/videowriter.py +++ b/sleap/io/videowriter.py @@ -12,7 +12,6 @@ from abc import ABC, abstractmethod import cv2 import numpy as np -import imageio.v2 as iio class VideoWriter(ABC): @@ -33,26 +32,22 @@ def close(self): @staticmethod def safe_builder(filename, height, width, fps): """Builds VideoWriter based on available dependencies.""" - if VideoWriter.can_use_ffmpeg(): - return VideoWriterImageio(filename, height, width, fps) + if VideoWriter.can_use_skvideo(): + return VideoWriterSkvideo(filename, height, width, fps) else: return VideoWriterOpenCV(filename, height, width, fps) @staticmethod - def can_use_ffmpeg(): - """Check if ffmpeg is available for writing videos.""" + def can_use_skvideo(): + # See if we can import skvideo try: - import imageio_ffmpeg as ffmpeg + import skvideo except ImportError: return False - try: - # Try to get the version of the ffmpeg plugin - ffmpeg_version = ffmpeg.get_ffmpeg_version() - if ffmpeg_version: - return True - except Exception: - return False + # See if skvideo can find FFMPEG + if skvideo.getFFmpegVersion() != "0.0.0": + return True return False @@ -73,52 +68,8 @@ def close(self): self._writer.release() -# class VideoWriterSkvideo(VideoWriter): -# """Writes video using scikit-video as wrapper for ffmpeg. - -# Attributes: -# filename: Path to mp4 file to save to. -# height: Height of movie frames. -# width: Width of movie frames. -# fps: Playback framerate to save at. -# crf: Compression rate factor to control lossiness of video. Values go from -# 2 to 32, with numbers in the 18 to 30 range being most common. Lower values -# mean less compressed/higher quality. -# preset: Name of the libx264 preset to use (default: "superfast"). -# """ - -# def __init__( -# self, filename, height, width, fps, crf: int = 21, preset: str = "superfast" -# ): -# import skvideo.io - -# fps = str(fps) -# self._writer = skvideo.io.FFmpegWriter( -# filename, -# inputdict={ -# "-r": fps, -# }, -# outputdict={ -# "-c:v": "libx264", -# "-preset": preset, -# "-vf": "scale=trunc(iw/2)*2:trunc(ih/2)*2", # Need even dims for libx264 -# "-framerate": fps, -# "-crf": str(crf), -# "-pix_fmt": "yuv420p", -# }, -# ) - -# def add_frame(self, img, bgr: bool = False): -# if bgr: -# img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) -# self._writer.writeFrame(img) - -# def close(self): -# self._writer.close() - - -class VideoWriterImageio(VideoWriter): - """Writes video using imageio as a wrapper for ffmpeg. +class VideoWriterSkvideo(VideoWriter): + """Writes video using scikit-video as wrapper for ffmpeg. Attributes: filename: Path to mp4 file to save to. @@ -134,40 +85,28 @@ class VideoWriterImageio(VideoWriter): def __init__( self, filename, height, width, fps, crf: int = 21, preset: str = "superfast" ): - self.filename = filename - self.height = height - self.width = width - self.fps = fps - self.crf = crf - self.preset = preset - - import imageio_ffmpeg as ffmpeg - - # Imageio's ffmpeg writer parameters - # https://imageio.readthedocs.io/en/stable/examples.html#writing-videos-with-ffmpeg-and-vaapi - # iio.help(name='FFMPEG') to test - self.writer = iio.get_writer( + import skvideo.io + + fps = str(fps) + self._writer = skvideo.io.FFmpegWriter( filename, - fps=fps, - codec="libx264", - format="FFMPEG", - pixelformat="yuv420p", - output_params=[ - "-preset", - preset, - "-crf", - str(crf), - "-vf", - "scale=trunc(iw/2)*2:trunc(ih/2)*2", # Ensure even dimensions - "-r", - str(fps), - ], + inputdict={ + "-r": fps, + }, + outputdict={ + "-c:v": "libx264", + "-preset": preset, + "-vf": "scale=trunc(iw/2)*2:trunc(ih/2)*2", # Need even dims for libx264 + "-framerate": fps, + "-crf": str(crf), + "-pix_fmt": "yuv420p", + }, ) def add_frame(self, img, bgr: bool = False): if bgr: img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) - self.writer.append_data(img) + self._writer.writeFrame(img) def close(self): - self.writer.close() + self._writer.close() From 5649a30ffd0c9c33d668ee3b69e03ca2a8e4f3d4 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 2 Aug 2024 16:55:02 -0700 Subject: [PATCH 086/113] remove `export_clip` changes --- sleap/gui/dialogs/export_clip.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sleap/gui/dialogs/export_clip.py b/sleap/gui/dialogs/export_clip.py index f84766d18..312f9a807 100644 --- a/sleap/gui/dialogs/export_clip.py +++ b/sleap/gui/dialogs/export_clip.py @@ -11,16 +11,16 @@ def __init__(self): super().__init__(form_name="labeled_clip_form") - can_use_ffmpeg = VideoWriter.can_use_ffmpeg() + can_use_skvideo = VideoWriter.can_use_skvideo() - if can_use_ffmpeg: + if can_use_skvideo: message = ( "MP4 file will be encoded using " - "system ffmpeg via imageio (preferred option)." + "system ffmpeg via scikit-video (preferred option)." ) else: message = ( - "Unable to use ffpmeg via imageio. " + "Unable to use ffpmeg via scikit-video. " "AVI file will be encoding using OpenCV." ) From 63e010623cadc4bc87b2fbf7af5870dbb1dbbacc Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 2 Aug 2024 16:59:42 -0700 Subject: [PATCH 087/113] remove `training_monitor` changes --- sleap/gui/widgets/training_monitor.py | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/sleap/gui/widgets/training_monitor.py b/sleap/gui/widgets/training_monitor.py index 6eaee8663..ed405a747 100644 --- a/sleap/gui/widgets/training_monitor.py +++ b/sleap/gui/widgets/training_monitor.py @@ -7,9 +7,8 @@ import jsonpickle import logging from typing import Optional -from qtpy import QtCore, QtWidgets, QtGui +from qtpy import QtCore, QtWidgets, QtGui, QtCharts import attr -from sleap.gui.widgets.mpl import MplCanvas logger = logging.getLogger(__name__) @@ -79,24 +78,14 @@ def reset( what: String identifier indicating which job type the current run corresponds to. """ - self.canvas = MplCanvas(width=5, height=4, dpi=100) - self.setCentralWidget(self.canvas) + self.chart = QtCharts.QChart() + + self.series = dict() COLOR_TRAIN = (18, 158, 220) COLOR_VAL = (248, 167, 52) COLOR_BEST_VAL = (151, 204, 89) - x_batch_init = [] - y_batch_init = [] - # Add scatter series for batch training loss - self.canvas.add_scatter( - key="batch", - x=x_batch_init, - y=y_batch_init, - label="Batch Training Loss", - color=COLOR_TRAIN + "80", # Color with alpha - size=64, - ) self.series["batch"] = QtCharts.QScatterSeries() self.series["batch"].setName("Batch Training Loss") self.series["batch"].setColor(QtGui.QColor(*COLOR_TRAIN, 48)) From e6a2d5718757911d1533e47313a6ccb3b58a68cd Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 2 Aug 2024 17:00:27 -0700 Subject: [PATCH 088/113] remove monitor changes --- sleap/gui/widgets/monitor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sleap/gui/widgets/monitor.py b/sleap/gui/widgets/monitor.py index 5d125da2f..a16456983 100644 --- a/sleap/gui/widgets/monitor.py +++ b/sleap/gui/widgets/monitor.py @@ -9,8 +9,7 @@ import logging from typing import Optional, Dict from qtpy import QtCore, QtWidgets, QtGui - -# from qtpy.QtCharts import QtCharts +from qtpy.QtCharts import QtCharts import attr From a20af98a811d27ccde89aab638a760e1472d4107 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 2 Aug 2024 17:01:15 -0700 Subject: [PATCH 089/113] remove mpl changes --- sleap/gui/widgets/mpl.py | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/sleap/gui/widgets/mpl.py b/sleap/gui/widgets/mpl.py index a1789765f..a9b7fc838 100644 --- a/sleap/gui/widgets/mpl.py +++ b/sleap/gui/widgets/mpl.py @@ -6,11 +6,11 @@ from qtpy import QtWidgets from matplotlib.figure import Figure -from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as Canvas +from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as Canvas import matplotlib # Ensure using PyQt5 backend -matplotlib.use("QtAgg") +matplotlib.use("QT5Agg") class MplCanvas(Canvas): @@ -26,23 +26,3 @@ def __init__(self, width=5, height=4, dpi=100): self, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding ) Canvas.updateGeometry(self) - self.series = {} - - def add_scatter(self, key, x, y, label, color, markersize): - if key in self.series: - self.series[key].remove() - scatter = self.axes.scatter(x, y, label=label, color=color, s=markersize) - self.series[key] = scatter - self.draw() - - def add_line(self, key, x, y, label, color, width): - if key in self.series: - self.series[key].remove() - (line,) = self.axes.plot(x, y, label=label, color=color, linewidth=width) - self.series[key] = line - self.draw() - - def clear(self): - self.axes.cla() - self.series.clear() - self.draw() From 53880c77cd60d8b04a18d7e2642d7763891c250a Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 2 Aug 2024 17:08:00 -0700 Subject: [PATCH 090/113] remove QtCharts imports --- sleap/gui/widgets/monitor.py | 3 ++- sleap/gui/widgets/training_monitor.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sleap/gui/widgets/monitor.py b/sleap/gui/widgets/monitor.py index a16456983..5d125da2f 100644 --- a/sleap/gui/widgets/monitor.py +++ b/sleap/gui/widgets/monitor.py @@ -9,7 +9,8 @@ import logging from typing import Optional, Dict from qtpy import QtCore, QtWidgets, QtGui -from qtpy.QtCharts import QtCharts + +# from qtpy.QtCharts import QtCharts import attr diff --git a/sleap/gui/widgets/training_monitor.py b/sleap/gui/widgets/training_monitor.py index ed405a747..525c7464a 100644 --- a/sleap/gui/widgets/training_monitor.py +++ b/sleap/gui/widgets/training_monitor.py @@ -7,7 +7,9 @@ import jsonpickle import logging from typing import Optional -from qtpy import QtCore, QtWidgets, QtGui, QtCharts + +# from qtpy import QtCore, QtWidgets, QtGui, QtCharts +from qtpy import QtCore, QtWidgets, QtGui import attr logger = logging.getLogger(__name__) From ffa0982e2c6cb6015f3dc09c9b25e137cfbd9172 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 2 Aug 2024 17:08:12 -0700 Subject: [PATCH 091/113] remove skvideo import --- sleap/io/videowriter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sleap/io/videowriter.py b/sleap/io/videowriter.py index 510fad739..391ce4384 100644 --- a/sleap/io/videowriter.py +++ b/sleap/io/videowriter.py @@ -85,7 +85,7 @@ class VideoWriterSkvideo(VideoWriter): def __init__( self, filename, height, width, fps, crf: int = 21, preset: str = "superfast" ): - import skvideo.io + # import skvideo.io fps = str(fps) self._writer = skvideo.io.FFmpegWriter( From 3587731cc8e05698079297afcc3bf8ac4f8bb215 Mon Sep 17 00:00:00 2001 From: roomrys <38435167+roomrys@users.noreply.github.com> Date: Wed, 14 Aug 2024 12:40:26 -0700 Subject: [PATCH 092/113] Attrs version needs to match cattrs Otherwise: cattrs throws AttributeError: 'Attribute' object has no attribute 'alias' --- environment.yml | 4 ++-- environment_mac.yml | 4 ++-- environment_no_cuda.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/environment.yml b/environment.yml index 4a944f6f4..05150f5ea 100644 --- a/environment.yml +++ b/environment.yml @@ -12,9 +12,9 @@ channels: dependencies: # Packages SLEAP uses directly - - conda-forge::attrs >=21.2.0 #,<=21.4.0 + - conda-forge::attrs >=23.1.0 # Corresponds to version of cattrs # - conda-forge::cattrs ==1.1.1 - - conda-forge::cattrs + - conda-forge::cattrs >=23.2.0 - conda-forge::jsmin # - conda-forge::jsonpickle ==1.2 - conda-forge::jsonpickle diff --git a/environment_mac.yml b/environment_mac.yml index e0c5e9218..1e2a9504a 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -10,11 +10,11 @@ channels: dependencies: # Packages SLEAP uses directly - - conda-forge::attrs >=21.2.0 + - conda-forge::attrs >=23.1.0 # Corresponds to version of cattrs # - conda-forge::importlib-metadata <7.1.0 - conda-forge::importlib-metadata # - conda-forge::cattrs ==1.1.1 - - conda-forge::cattrs + - conda-forge::cattrs >=23.2.0 - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index d1c72f5b4..34d80d143 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -13,9 +13,9 @@ channels: dependencies: # Packages SLEAP uses directly - - conda-forge::attrs >=21.2.0 #,<=21.4.0 + - conda-forge::attrs >=23.1.0 # Corresponds to version of cattrs # - conda-forge::cattrs ==1.1.1 - - conda-forge::cattrs + - conda-forge::cattrs >=23.2.0 - conda-forge::jsmin # - conda-forge::jsonpickle ==1.2 - conda-forge::jsonpickle From 1746c7ae49122027aee82891238b83c78072feb4 Mon Sep 17 00:00:00 2001 From: roomrys Date: Thu, 15 Aug 2024 15:52:56 -0700 Subject: [PATCH 093/113] Pin jsonpickle to preserve backwards compatibility --- environment.yml | 2 +- environment_mac.yml | 2 +- environment_no_cuda.yml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/environment.yml b/environment.yml index 05150f5ea..fe28f89f7 100644 --- a/environment.yml +++ b/environment.yml @@ -17,7 +17,7 @@ dependencies: - conda-forge::cattrs >=23.2.0 - conda-forge::jsmin # - conda-forge::jsonpickle ==1.2 - - conda-forge::jsonpickle + - conda-forge::jsonpickle <=1.5.0 # 1.5.1 breaks compatibility with v1 encoded files - conda-forge::networkx # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 diff --git a/environment_mac.yml b/environment_mac.yml index 1e2a9504a..ad83541e4 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -20,7 +20,7 @@ dependencies: - conda-forge::imageio-ffmpeg - conda-forge::jsmin # - conda-forge::jsonpickle ==1.2 - - conda-forge::jsonpickle + - conda-forge::jsonpickle <=1.5.0 # 1.5.1 breaks compatibility with v1 encoded files # - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos # - conda-forge::networkx <3.3 - conda-forge::networkx diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index 34d80d143..0d7b674a4 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -1,6 +1,6 @@ # Use this environment file if your computer does not have a nvidia GPU and runs Windows -# or Linux. This environment file has exactly the same dependencies listed as -# environment.yaml, minus the packages required by tensorflow to find/use GPUs. +# or Linux. This environment file has exactly the same dependencies listed as +# environment.yaml, minus the packages required by tensorflow to find/use GPUs. name: sleap_ci @@ -18,7 +18,7 @@ dependencies: - conda-forge::cattrs >=23.2.0 - conda-forge::jsmin # - conda-forge::jsonpickle ==1.2 - - conda-forge::jsonpickle + - conda-forge::jsonpickle <=1.5.0 # 1.5.1 breaks compatibility with v1 encoded files - conda-forge::networkx # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 From 0fe5a7dac3ab71135da7b934046167b35979c498 Mon Sep 17 00:00:00 2001 From: roomrys <38435167+roomrys@users.noreply.github.com> Date: Thu, 15 Aug 2024 21:57:56 -0700 Subject: [PATCH 094/113] Update attrs to match cattrs version --- dev_requirements.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dev_requirements.txt b/dev_requirements.txt index f7bb23643..598c526a2 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -10,8 +10,8 @@ sphinx sphinx-book-theme sphinx-copybutton nbformat==5.1.3 -myst-nb==0.13.2 -myst-parser==0.15.2 +myst-nb==1.1.1 # Upgrading pin because attrs needs to be >=23.1.0 +myst-parser==4.0.0 # Upgrading pin because attrs needs to be >=23.1.0 linkify-it-py sphinx-autobuild black==21.6b0 @@ -19,4 +19,7 @@ pre-commit twine==3.3.0 PyGithub jedi==0.17.2 -click==8.0.4 \ No newline at end of file +click==8.0.4 + +# The version of attrs must correspond to cattrs version +attrs>=23.1.0 # cattrs >=23.2.0 requires attrs >=23.1.0 From 27ab36dbb3be26c104485b992669529dd35600a2 Mon Sep 17 00:00:00 2001 From: roomrys Date: Fri, 16 Aug 2024 08:13:55 -0700 Subject: [PATCH 095/113] Try matching pypi dependencies to environment ymls --- dev_requirements.txt | 2 +- pypi_requirements.txt | 44 ++++++++++++++++++------------------------- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/dev_requirements.txt b/dev_requirements.txt index 598c526a2..4e095d534 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -21,5 +21,5 @@ PyGithub jedi==0.17.2 click==8.0.4 -# The version of attrs must correspond to cattrs version +# attrs is pulled in with myst-nb and myst-parser attrs>=23.1.0 # cattrs >=23.2.0 requires attrs >=23.1.0 diff --git a/pypi_requirements.txt b/pypi_requirements.txt index 6e482feea..f8ee6fb94 100644 --- a/pypi_requirements.txt +++ b/pypi_requirements.txt @@ -4,48 +4,40 @@ # pip install sleap[pypi]. # These are also distributed through conda and not pip installed when using conda. -attrs>=21.2.0,<=21.4.0 -cattrs==1.1.1 -# certifi>=2017.4.17,<=2021.10.8 +attrs>=23.1.0 # required by cattrs >=23.2.0 +cattrs>=23.2.0 imageio imageio-ffmpeg jsmin -jsonpickle==1.2 +jsonpickle<=1.5.0 networkx -numpy>=1.19.5,<1.23.0 -opencv-python>=4.2.0,<=4.7.0 +numpy>=1.16.5 +opencv-python pandas -pillow>=8.3.1,<=8.4.0 +pillow psutil -pykalman==0.9.5 -PySide2>=5.13.2,<=5.14.1; platform_machine != 'arm64' -PySide6; sys_platform == 'darwin' and platform_machine == 'arm64' -# Otherwise error: Microsoft Visual C++ 14.0 is required. -python-rapidjson <=1.10; sys_platform == 'win32' -python-rapidjson; sys_platform != 'win32' +pykalman +PySide6 +python-rapidjson pyyaml pyzmq qtpy>=2.0.1 -rich==10.16.1 -# imgaug==0.4.0 +rich imageio -scipy>=1.4.1,<=1.9.0 +scipy>=1.7.0 scikit-image -scikit-learn ==1.0.* -# scikit-video +scikit-learn>=1.0.0 seaborn -tensorflow>=2.6.3,<2.9; platform_machine != 'arm64' -# tensorflow ==2.7.4; platform_machine != 'arm64' -tensorflow-hub<=0.14.0 +tensorflow==2.9.2; platform_machine != 'arm64' +tensorflow-hub albumentations ndx-pose # These dependencies are untested since we do not offer a wheel for apple silicon atm. -tensorflow-macos==2.9.2; sys_platform == 'darwin' and platform_machine == 'arm64' -tensorflow-metal==0.5.0; sys_platform == 'darwin' and platform_machine == 'arm64' +tensorflow-macos >=2.10.0,<2.13.0; sys_platform == 'darwin' and platform_machine == 'arm64' +tensorflow-metal; sys_platform == 'darwin' and platform_machine == 'arm64' # Dependencies of dependencies -# google-auth 2.23.0 has requirement urllib3<2.0 -urllib3<2.0 # Not a 'noticed' runtime-dependency # tensorboard 2.11.2 has requirement protobuf<4,>=3.9.2 # tensorflow 2.11.0 has requirement protobuf<3.20,>=3.9.2 -protobuf<3.20 # Makes GUI work in windows \ No newline at end of file +protobuf; platform_machine != 'arm64' +protobuf>3.20; sys_platform == 'darwin' and platform_machine == 'arm64' \ No newline at end of file From 254767ccc4428603e4c52a2b739d3fd8fd721551 Mon Sep 17 00:00:00 2001 From: roomrys Date: Fri, 16 Aug 2024 20:10:44 -0700 Subject: [PATCH 096/113] Try new tensorflow build for mac --- environment_mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_mac.yml b/environment_mac.yml index 69505667d..edb6a5903 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -49,7 +49,7 @@ dependencies: # - conda-forge::scikit-video - conda-forge::seaborn # - conda-forge::tensorflow-hub # pulls in tensorflow cpu from conda-forge - - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated + - sleap-deps/label/dev::tensorflow ==2.12.0 # TODO: Switch to main label when updated - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose From 616238e0b1e7564881515dff28f6fca721f31908 Mon Sep 17 00:00:00 2001 From: Elizabeth <106755962+eberrigan@users.noreply.github.com> Date: Fri, 23 Aug 2024 17:06:03 -0700 Subject: [PATCH 097/113] Fix ubuntu CI import error by adding OpenGL libraries (#1909) * 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` --- .github/workflows/build.yml | 65 ++++++++++------------ .github/workflows/build_ci.yml | 1 + .github/workflows/build_manual.yml | 87 ++++++++---------------------- .github/workflows/ci.yml | 2 +- 4 files changed, 53 insertions(+), 102 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c248f4140..2cfc8fdc1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,16 +38,16 @@ jobs: activate-environment: sleap_ci conda-solver: "libmamba" - - name: Print environment info + - name: Print build environment info shell: bash -l {0} run: | which python conda info conda list - # Build pip wheel (Ubuntu) - - name: Build pip wheel (Ubuntu) - if: matrix.os == 'ubuntu-22.04' + # Build pip wheel (Not Windows) + - name: Build pip wheel (Not Windows) + if: matrix.os != 'windows-2022' shell: bash -l {0} run: | python setup.py bdist_wheel @@ -85,9 +85,8 @@ jobs: conda build .conda_mac --output-folder build echo "BUILD_PATH=$(pwd)/build" >> "$GITHUB_ENV" - # Test built conda package (Ubuntu and Windows) - - name: Test built conda package (Ubuntu and Windows) - if: matrix.os != 'macos-14' + # Print build and environment info for each OS after deactiviating build environment + - name: Print base environment info shell: bash -l {0} run: | echo "Current build path: $BUILD_PATH" @@ -100,44 +99,38 @@ jobs: echo "Conda info before activating environment:" conda info + # Install necessary OpenGL packages for Ubuntu only https://github.com/conda-forge/opencv-feedstock/issues/401 + - name: Install OpenGL libraries on Ubuntu runner + if: matrix.os == 'ubuntu-22.04' + shell: bash -l {0} + run: | + sudo apt-get update + sudo apt-get install libglapi-mesa libegl-mesa0 libegl1 libopengl0 libgl1-mesa-glx + + # Create conda environment using built conda package (Ubuntu and Windows) + - name: Create conda environment (Ubuntu and Windows) + if: matrix.os != 'macos-14' + shell: bash -l {0} + run: | echo "Creating and testing conda environment with sleap package..." conda create -y -n sleap_test -c file://$BUILD_PATH -c sleap/label/dev -c conda-forge -c nvidia -c anaconda sleap - conda activate sleap_test - - echo "Python executable after activating sleap_test environment:" - which python - echo "Python version after activating sleap_test environment:" - python --version - echo "Conda info after activating sleap_test environment:" - conda info - echo "List of installed conda packages in the sleap_test environment:" - conda list - echo "List of installed pip packages in the sleap_test environment:" - pip list - - echo "Testing sleap package installation..." - sleap_version=$(python -c "import sleap; print(sleap.__version__)") - echo "Test completed using sleap version: $sleap_version" - # Test built conda package (Mac) - - name: Test built conda package (Mac) + # Create conda environment using built conda package (Mac) + # Note channel differences + - name: Create conda environment (Mac) if: matrix.os == 'macos-14' shell: bash -l {0} run: | - echo "Current build path: $BUILD_PATH" - conda deactivate - - echo "Python executable before activating environment:" - which python - echo "Python version before activating environment:" - python --version - echo "Conda info before activating environment:" - conda info - echo "Creating and testing conda environment with sleap package..." conda create -y -n sleap_test -c file://$BUILD_PATH -c conda-forge -c anaconda sleap + + # Test conda environment + - name: Test conda environment + shell: bash -l {0} + run: | + echo "Activating sleap_test" conda activate sleap_test - + echo "Python executable after activating sleap_test environment:" which python echo "Python version after activating sleap_test environment:" diff --git a/.github/workflows/build_ci.yml b/.github/workflows/build_ci.yml index 6f54d838b..0b46d750a 100644 --- a/.github/workflows/build_ci.yml +++ b/.github/workflows/build_ci.yml @@ -91,6 +91,7 @@ jobs: # Ubuntu specific values - os: ubuntu-22.04 # Otherwise core dumped in github actions + # https://github.com/conda-forge/opencv-feedstock/issues/401#issue-2196393732 test_args: | sudo apt install xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 sudo apt-get install libglapi-mesa libegl-mesa0 libegl1 libopengl0 libgl1-mesa-glx diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index ff092afe6..6374b876e 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -14,7 +14,7 @@ on: branches: # - develop # - fakebranch - - elizabeth/update-python-and-dependencies + - elizabeth/fix-ubuntu-CI-ImportError jobs: build: @@ -48,7 +48,7 @@ jobs: activate-environment: sleap_ci conda-solver: "libmamba" - - name: Print environment info + - name: Print build environment info shell: bash -l {0} run: | which python @@ -95,9 +95,8 @@ jobs: conda build .conda_mac --output-folder build echo "BUILD_PATH=$(pwd)/build" >> "$GITHUB_ENV" - # Test built conda package (Ubuntu) - - name: Test built conda package (Ubuntu) - if: matrix.os == 'ubuntu-22.04' + # Print build and environment info for each OS after deactiviating build environment + - name: Print base environment info shell: bash -l {0} run: | echo "Current build path: $BUILD_PATH" @@ -110,80 +109,38 @@ jobs: echo "Conda info before activating environment:" conda info - echo "Creating and testing conda environment with sleap package..." + # Install necessary OpenGL packages for Ubuntu only https://github.com/conda-forge/opencv-feedstock/issues/401 + - name: Install OpenGL libraries on Ubuntu runner + if: matrix.os == 'ubuntu-22.04' + shell: bash -l {0} + run: | sudo apt-get update sudo apt-get install libglapi-mesa libegl-mesa0 libegl1 libopengl0 libgl1-mesa-glx - conda create -y -n sleap_test -c file://$BUILD_PATH -c sleap/label/dev -c conda-forge -c nvidia -c anaconda sleap - conda activate sleap_test - - echo "Python executable after activating sleap_test environment:" - which python - echo "Python version after activating sleap_test environment:" - python --version - echo "Conda info after activating sleap_test environment:" - conda info - echo "List of installed conda packages in the sleap_test environment:" - conda list - echo "List of installed pip packages in the sleap_test environment:" - pip list - - echo "Testing sleap package installation..." - sleap_version=$(python -c "import sleap; print(sleap.__version__)") - echo "Test completed using sleap version: $sleap_version" - # Test built conda package (Windows) - - name: Test built conda package (Windows) - if: matrix.os == 'windows-2022' + # Create conda environment using built conda package (Ubuntu and Windows) + - name: Create conda environment (Ubuntu and Windows) + if: matrix.os != 'macos-14' shell: bash -l {0} run: | - echo "Current build path: $BUILD_PATH" - conda deactivate - - echo "Python executable before activating environment:" - which python - echo "Python version before activating environment:" - python --version - echo "Conda info before activating environment:" - conda info - echo "Creating and testing conda environment with sleap package..." conda create -y -n sleap_test -c file://$BUILD_PATH -c sleap/label/dev -c conda-forge -c nvidia -c anaconda sleap - conda activate sleap_test - - echo "Python executable after activating sleap_test environment:" - which python - echo "Python version after activating sleap_test environment:" - python --version - echo "Conda info after activating sleap_test environment:" - conda info - echo "List of installed conda packages in the sleap_test environment:" - conda list - echo "List of installed pip packages in the sleap_test environment:" - pip list - - echo "Testing sleap package installation..." - sleap_version=$(python -c "import sleap; print(sleap.__version__)") - echo "Test completed using sleap version: $sleap_version" - # Test built conda package (Mac) - - name: Test built conda package (Mac) + # Create conda environment using built conda package (Mac) + # Note channel differences + - name: Create conda environment (Mac) if: matrix.os == 'macos-14' shell: bash -l {0} run: | - echo "Current build path: $BUILD_PATH" - conda deactivate - - echo "Python executable before activating environment:" - which python - echo "Python version before activating environment:" - python --version - echo "Conda info before activating environment:" - conda info - echo "Creating and testing conda environment with sleap package..." conda create -y -n sleap_test -c file://$BUILD_PATH -c conda-forge -c anaconda sleap + + # Test conda environment + - name: Test conda environment + shell: bash -l {0} + run: | + echo "Activating sleap_test" conda activate sleap_test - + echo "Python executable after activating sleap_test environment:" which python echo "Python version after activating sleap_test environment:" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6932ab7e..9d4e307f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: # https://github.com/conda-forge/opencv-feedstock/issues/401#issue-2196393732 run: | sudo apt-get update - sudo apt-get install -y libgl1-mesa-glx + sudo apt-get install libglapi-mesa libegl-mesa0 libegl1 libopengl0 libgl1-mesa-glx - name: Setup Conda uses: conda-incubator/setup-miniconda@v3.0.3 From 12546d92df912ce9cbbf44a804cddd0df8a10839 Mon Sep 17 00:00:00 2001 From: roomrys <38435167+roomrys@users.noreply.github.com> Date: Tue, 27 Aug 2024 13:55:19 -0700 Subject: [PATCH 098/113] Update tensorflow version in mac meta.yml --- .conda_mac/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index c46c0bacd..70d9ac9e5 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -63,7 +63,7 @@ requirements: - conda-forge::scikit-learn >=1.0.0 # Python 3.10 needs scikit-learn >= 1.0 # - conda-forge::scikit-video - conda-forge::seaborn - - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated + - sleap-deps/label/dev::tensorflow ==2.12.0 # TODO: Switch to main label when updated - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose From 41a5597f7ac43e9cf6bd12b45dad6ef0c5ecc84f Mon Sep 17 00:00:00 2001 From: Elizabeth <106755962+eberrigan@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:20:42 -0700 Subject: [PATCH 099/113] Trigger github action workflows for conda builds when changes made to files modifying the conda packages (#1922) * add requirements to build_manual * include all paths that should affect conda build * test workflow * test workflow: this should not trigger build_manual * remove test change because build manual was not triggered as expected * test to see if build_manual is triggered and if the channel works without the full address * cleanup unused channels and test build_manual * remove current branch from CI trigger for merging --- .conda/condarc.yaml | 2 -- .conda_mac/README.md | 2 +- .github/workflows/build_manual.yml | 15 +++++++++------ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.conda/condarc.yaml b/.conda/condarc.yaml index f460747ea..07f50fc99 100644 --- a/.conda/condarc.yaml +++ b/.conda/condarc.yaml @@ -2,6 +2,4 @@ channels: - sleap-deps/label/dev - conda-forge - nvidia - - https://conda.anaconda.org/sleap/label/dev - - sleap - anaconda diff --git a/.conda_mac/README.md b/.conda_mac/README.md index 06f370b4f..ddddb8c0d 100644 --- a/.conda_mac/README.md +++ b/.conda_mac/README.md @@ -1,4 +1,4 @@ -This folder defines the conda package build for Apple silicon Macs. Until there are aarm64 runners, we have to run this manually on Apple M1 silicon. +This folder defines the conda package build for Apple silicon Macs. To build, first go to the base repo directory and install the build environment: diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index 6374b876e..529463253 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -6,15 +6,18 @@ name: Build (manual) on: push: paths: - - '.conda/meta.yaml' - - '.conda/condarc.yaml' - - '.conda_mac/meta.yaml' - - '.conda_mac/condarc.yaml' + - '.conda/**/*' # Include all files and subdirectories in .conda + - '!*.conda/**/README*' # Exclude any README files + - '.conda_mac/**/*' # Include all files and subdirectories in .conda_mac + - '!*.conda_mac/**/README*' # Exclude any README files - '.github/workflows/build_manual.yml' + - 'requirements.txt' + - 'environment_build.yml' + - 'setup.py' + - 'sleap/version.py' branches: # - develop - # - fakebranch - - elizabeth/fix-ubuntu-CI-ImportError + - fakebranch jobs: build: From d38bf2d0639dfb2d285e099ba5e7ae65316ff3e6 Mon Sep 17 00:00:00 2001 From: Elizabeth <106755962+eberrigan@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:26:52 -0700 Subject: [PATCH 100/113] Test wheel on macos python 3.10 using build_ci (#1923) * test built pip wheel on macos python 3.10 using build_ci * now we do test the pypi build for silicon macs * remove branch from build_manual to merge --- .github/workflows/build_ci.yml | 3 +-- pypi_requirements.txt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_ci.yml b/.github/workflows/build_ci.yml index 0b46d750a..31740e3a3 100644 --- a/.github/workflows/build_ci.yml +++ b/.github/workflows/build_ci.yml @@ -70,8 +70,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-22.04", "windows-2022"] - # os: ["ubuntu-22.04", "windows-2022", "macos-14"] # removing macos-14 for now since the setup-python action only support py>=3.10, which is breaking this CI. + os: ["ubuntu-22.04", "windows-2022", "macos-14"] # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude include: # Default values diff --git a/pypi_requirements.txt b/pypi_requirements.txt index f8ee6fb94..9bd29a716 100644 --- a/pypi_requirements.txt +++ b/pypi_requirements.txt @@ -32,7 +32,7 @@ tensorflow==2.9.2; platform_machine != 'arm64' tensorflow-hub albumentations ndx-pose -# These dependencies are untested since we do not offer a wheel for apple silicon atm. +# Silicon Mac specific packages tensorflow-macos >=2.10.0,<2.13.0; sys_platform == 'darwin' and platform_machine == 'arm64' tensorflow-metal; sys_platform == 'darwin' and platform_machine == 'arm64' From cef0208b5b7f5792260dac12d14b79d954222cfa Mon Sep 17 00:00:00 2001 From: Elizabeth <106755962+eberrigan@users.noreply.github.com> Date: Tue, 3 Sep 2024 09:56:44 -0700 Subject: [PATCH 101/113] Install ffmpeg on macos and Ubuntu runners when testing PyPI wheel (#1929) * add comment with intended changes * conda install ffmpeg for macos pypi runner * conda install ffmpeg for ubuntu pypi runner * which ffmpeg should work * simplify test by using brew and apt * pytest needs to be included in macos test_args * cleanup build_ci workflow --- .github/workflows/build_ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_ci.yml b/.github/workflows/build_ci.yml index 31740e3a3..e4b938481 100644 --- a/.github/workflows/build_ci.yml +++ b/.github/workflows/build_ci.yml @@ -83,24 +83,36 @@ jobs: - test_args: pytest --durations=-1 tests/ - condarc: .conda/condarc.yaml - pyver: "3.10" + # MacOS specific values + # Need ffmpeg since linux imageio-ffmpeg does not contain the binary executable of ffmpeg + # https://pypi.org/project/imageio-ffmpeg/0.5.1/#modal-close # Use special condarc if macos - os: "macos-14" condarc: .conda_mac/condarc.yaml pyver: "3.10" + test_args: | + brew install ffmpeg + which ffmpeg + pytest --durations=-1 tests/ # Ubuntu specific values - os: ubuntu-22.04 # Otherwise core dumped in github actions # https://github.com/conda-forge/opencv-feedstock/issues/401#issue-2196393732 + # Need ffmpeg since linux imageio-ffmpeg does not contain the binary executable of ffmpeg + # https://pypi.org/project/imageio-ffmpeg/0.5.1/#modal-close test_args: | - sudo apt install xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 + sudo apt install ffmpeg xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 sudo apt-get install libglapi-mesa libegl-mesa0 libegl1 libopengl0 libgl1-mesa-glx sudo Xvfb :1 -screen 0 1024x768x24 Date: Thu, 5 Sep 2024 10:20:57 -0700 Subject: [PATCH 102/113] Remove commented out code In git we trust --- .conda/meta.yaml | 40 ++++++---------------------------------- .conda_mac/meta.yaml | 31 ++++--------------------------- environment.yml | 18 ++++-------------- environment_mac.yml | 18 +++--------------- environment_no_cuda.yml | 20 ++++---------------- 5 files changed, 21 insertions(+), 106 deletions(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index a3dcfeb53..ccc621e8c 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -20,9 +20,7 @@ build: requirements: host: - # - conda-forge::python ==3.7.12 # Run into _MAX_WINDOWS_WORKERS not found if < - conda-forge::python >=3.10.0,<3.11.0 - # - numpy >=1.19.5,<1.23.0 # Linux likes anaconda, windows likes conda-forge - numpy >=1.16.5,<2.0 # SciPy 1.7 requires numpy >=1.16.5 - conda-forge::cudatoolkit ==11.3.1 - conda-forge::cudnn=8.2.1 @@ -32,101 +30,75 @@ requirements: # Only the packages above are required to build, but listing them all ensures no # unnecessary pypi packages are installed via the build script (bld.bat, build.sh) - # - conda-forge::attrs ==21.4.0 - conda-forge::attrs - # - conda-forge::cattrs ==1.1.1 - conda-forge::cattrs - # - conda-forge::h5py ==3.7.0 - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::jsmin - # - conda-forge::jsonpickle ==1.2 - conda-forge::jsonpickle - conda-forge::networkx - # - conda-forge::opencv <4.9.0 - conda-forge::opencv - conda-forge::pandas - conda-forge::pillow >=8.3.2 - conda-forge::psutil - conda-forge::pykalman - # - conda-forge::pyside2 >=5.12,<5.14 # To ensure works correctly with QtPy. - - conda-forge::pyside6 >=6.5.0 # >=6.2 is compatible with Python 3.10, conda package exists for >=6.4, 6.4 conda package uses problematic QtCharts https://github.com/roomrys/envexp/pull/3 + - conda-forge::pyside6 >=6.5.0 # 6.4 conda package uses problematic QtCharts - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 requires scipy >=1.7 - conda-forge::scikit-image - # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 requires scikit-learn >=1.0 - # - conda-forge::scikit-video - conda-forge::seaborn - # - sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose - # - conda-forge::importlib-metadata ==4.11.4 - conda-forge::importlib-metadata run: - # - conda-forge::python ==3.7.12 # Run into _MAX_WINDOWS_WORKERS not found if < - conda-forge::python >=3.10.0,<3.11.0 - # - numpy >=1.19.5,<1.23.0 # Linux likes anaconda, windows likes conda-forge - numpy >=1.16.5,<2.0 # SciPy 1.7 requires numpy >=1.16.5 - # - conda-forge::attrs ==21.4.0 - conda-forge::attrs - # - conda-forge::cattrs ==1.1.1 - conda-forge::cattrs - conda-forge::cudatoolkit ==11.3.1 - conda-forge::cudnn=8.2.1 - nvidia::cuda-nvcc=11.3 - # - conda-forge::h5py ==3.7.0 - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::jsmin - # - conda-forge::jsonpickle ==1.2 - conda-forge::jsonpickle - conda-forge::networkx - # - conda-forge::opencv <4.9.0 - conda-forge::opencv - conda-forge::pandas - conda-forge::pillow >=8.3.2 - conda-forge::psutil - conda-forge::pykalman - # - conda-forge::pyside2 >=5.12,<5.14 # To ensure works correctly with QtPy. - - conda-forge::pyside6 >=6.5.0 # >=6.2 is compatible with Python 3.10, conda package exists for >=6.4, 6.4 conda package uses problematic QtCharts https://github.com/roomrys/envexp/pull/3 + - conda-forge::pyside6 >=6.5.0 # 6.4 conda package uses problematic QtCharts - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 requires scipy >=1.7 - conda-forge::scikit-image - # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 requires scikit-learn >=1.0 - # - conda-forge::scikit-video - conda-forge::seaborn - # - sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated - # - conda-forge::tensorflow-hub <0.14.0 # Causes pynwb conflicts on linux GH-1446 - conda-forge::tensorflow-hub - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose - # - conda-forge::importlib-metadata ==4.11.4 - conda-forge::importlib-metadata +test: + requires: + - pip + - libopencv *=headless* # [linux] https://github.com/conda-forge/opencv-feedstock/issues/401#issuecomment-2028099423 # This no longer works so we have moved it to the build workflow # https://github.com/talmolab/sleap/pull/1744 -# test: # imports: # - sleap -test: - requires: - - pip - - libopencv *=headless* # [linux] https://github.com/conda-forge/opencv-feedstock/issues/401#issuecomment-2028099423 \ No newline at end of file diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index 70d9ac9e5..849b80d8e 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -24,7 +24,6 @@ source: requirements: host: - conda-forge::python >=3.10.0,<3.11.0 - # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::setuptools - conda-forge::packaging @@ -33,35 +32,27 @@ requirements: # Only the packages above are required to build, but listing them all ensures no # unnecessary pypi packages are installed via the build script (bld.bat, build.sh) - conda-forge::attrs >=21.2.0 - # - conda-forge::cattrs ==1.1.1 - conda-forge::cattrs - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::jsmin - # - conda-forge::jsonpickle ==1.2 - conda-forge::jsonpickle - # - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos in sleap-deps now - # - conda-forge::networkx <3.3 - conda-forge::networkx - conda-forge::opencv - conda-forge::pandas - conda-forge::pillow - conda-forge::psutil - conda-forge::pykalman - # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - - conda-forge::pyside6 >=6.5.0 # >=6.2 is compatible with Python 3.10, conda package exists for >=6.4, 6.4 conda package uses problematic QtCharts https://github.com/roomrys/envexp/pull/3 + - conda-forge::pyside6 >=6.5.0 # 6.4 conda package uses problematic QtCharts - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - # - conda-forge::scipy >=1.4.1,<=1.9.0 - - conda-forge::scipy >=1.7.0 # Python 3.10 needs scipy >= 1.7 + - conda-forge::scipy >=1.7.0 # Python 3.10 needs scipy >= 1.7.0 - conda-forge::scikit-image - # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 needs scikit-learn >= 1.0 - # - conda-forge::scikit-video - conda-forge::seaborn - sleap-deps/label/dev::tensorflow ==2.12.0 # TODO: Switch to main label when updated - conda-forge::qudida @@ -71,44 +62,30 @@ requirements: run: - conda-forge::python >=3.10.0,<3.11.0 - conda-forge::attrs >=21.2.0 - # - conda-forge::cattrs ==1.1.1 - conda-forge::cattrs - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::jsmin - # - conda-forge::jsonpickle ==1.2 - conda-forge::jsonpickle - # - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos in sleap-deps now - # - conda-forge::networkx <3.3 - conda-forge::networkx - # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::opencv - conda-forge::pandas - conda-forge::pillow - conda-forge::psutil - conda-forge::pykalman - # - conda-forge::pyside2 >=5.12 - - conda-forge::pyside6 >=6.5.0 # >=6.2 is compatible with Python 3.10, conda package exists for >=6.4, 6.4 conda package uses problematic QtCharts https://github.com/roomrys/envexp/pull/3 + - conda-forge::pyside6 >=6.5.0 # 6.4 conda package uses problematic QtCharts - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - conda-forge::scikit-image - # - conda-forge::scikit-learn ==1.0 - - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 - # - conda-forge::scikit-video + - conda-forge::scikit-learn >=1.0.0 # Python 3.10 needs scikit-learn >= 1.0 - conda-forge::seaborn - # - conda-forge::tensorflow-hub # pulls in tensorflow cpu from conda-forge - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose - -# test: -# imports: -# - sleap diff --git a/environment.yml b/environment.yml index b0d9f0341..bda8b3bca 100644 --- a/environment.yml +++ b/environment.yml @@ -12,18 +12,14 @@ channels: dependencies: # Packages SLEAP uses directly - - conda-forge::attrs >=23.1.0 # Corresponds to version of cattrs - # - conda-forge::cattrs ==1.1.1 + - conda-forge::attrs >=23.1.0 # Corresponds to version of cattrs - conda-forge::cattrs >=23.2.0 - conda-forge::imageio-ffmpeg # Required for imageio to read/write videos with ffmpeg - conda-forge::jsmin - # - conda-forge::jsonpickle ==1.2 - conda-forge::jsonpickle <=1.5.0 # 1.5.1 breaks compatibility with v1 encoded files - conda-forge::networkx - # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::opencv - # - conda-forge::h5py <=3.7.0 - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg @@ -32,25 +28,19 @@ dependencies: - conda-forge::pillow #>=8.3.1,<=8.4.0 - conda-forge::psutil - conda-forge::pykalman - # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - conda-forge::pyside6 >=6.5.0 # >=6.2 is compatible with Python 3.10, conda package exists for >=6.4, 6.4 conda package uses problematic QtCharts https://github.com/roomrys/envexp/pull/3 - # - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - conda-forge::scikit-image - # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 - # - conda-forge::scikit-video - conda-forge::seaborn - # - sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated - - conda-forge::tensorflow-hub # Pinned in meta.yml, but no problems here... yet + - conda-forge::tensorflow-hub # Pinned in meta.yml, but no problems here... yet - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose @@ -61,5 +51,5 @@ dependencies: - conda-forge::cudnn=8.2.1 - nvidia::cuda-nvcc=11.3 - - pip: - - "--editable=.[conda_dev]" + - pip: + - "--editable=.[conda_dev]" diff --git a/environment_mac.yml b/environment_mac.yml index edb6a5903..b420560bc 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -10,21 +10,15 @@ channels: dependencies: # Packages SLEAP uses directly - - conda-forge::attrs >=23.1.0 # Corresponds to version of cattrs - # - conda-forge::importlib-metadata <7.1.0 + - conda-forge::attrs >=23.1.0 # Corresponds to version of cattrs - conda-forge::importlib-metadata - # - conda-forge::cattrs ==1.1.1 - conda-forge::cattrs >=23.2.0 - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg # Required for imageio to read/write videos with ffmpeg - conda-forge::jsmin - # - conda-forge::jsonpickle ==1.2 - conda-forge::jsonpickle <=1.5.0 # 1.5.1 breaks compatibility with v1 encoded files - # - conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos - # - conda-forge::networkx <3.3 - conda-forge::networkx - # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::opencv - conda-forge::pandas @@ -32,26 +26,20 @@ dependencies: - conda-forge::pillow - conda-forge::psutil - conda-forge::pykalman - # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - conda-forge::pyside6 >=6.5.0 # >=6.2 is compatible with Python 3.10, conda package exists for >=6.4, 6.4 conda package uses problematic QtCharts https://github.com/roomrys/envexp/pull/3 - # - conda-forge::python ~=3.9 - - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 + - conda-forge::python >=3.10.0,<3.11.0 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - conda-forge::scikit-image >= 0.21.0 # package scikit-image-0.20.0-py38hfaca753_0 requires python_abi 3.8.* *_cp38 - # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 - # - conda-forge::scikit-video - conda-forge::seaborn - # - conda-forge::tensorflow-hub # pulls in tensorflow cpu from conda-forge - sleap-deps/label/dev::tensorflow ==2.12.0 # TODO: Switch to main label when updated - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose - pip: - - "--editable=.[conda_dev]" \ No newline at end of file + - "--editable=.[conda_dev]" diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index 964e9e0c1..688ab62b8 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -13,18 +13,13 @@ channels: dependencies: # Packages SLEAP uses directly - - conda-forge::attrs >=23.1.0 # Corresponds to version of cattrs - # - conda-forge::cattrs ==1.1.1 + - conda-forge::attrs >=23.1.0 # Corresponds to version of cattrs - conda-forge::cattrs >=23.2.0 - conda-forge::imageio-ffmpeg # Required for imageio to read/write videos with ffmpeg - conda-forge::jsmin - # - conda-forge::jsonpickle ==1.2 - conda-forge::jsonpickle <=1.5.0 # 1.5.1 breaks compatibility with v1 encoded files - conda-forge::networkx - # - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - # - conda-forge::opencv - # - conda-forge::h5py <=3.7.0 - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg @@ -33,29 +28,22 @@ dependencies: - conda-forge::pillow #>=8.3.1,<=8.4.0 - conda-forge::psutil - conda-forge::pykalman - # - conda-forge::pyside2 >=5.12 # To ensure application works correctly with QtPy. - conda-forge::pyside6 >=6.5.0 # >=6.2 is compatible with Python 3.10, conda package exists for >=6.4, 6.4 conda package uses problematic QtCharts https://github.com/roomrys/envexp/pull/3 - # - conda-forge::python ~=3.7 # Run into _MAX_WINDOWS_WORKERS not found if == - conda-forge::python >=3.10.0,<3.11.0 # Trying python 3.10 - conda-forge::python-rapidjson - conda-forge::pyyaml - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - # - conda-forge::scipy >=1.4.1,<=1.9.0 - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - conda-forge::scikit-image - # - conda-forge::scikit-learn ==1.0 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 - # - conda-forge::scikit-video - conda-forge::seaborn - # - sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated - - conda-forge::tensorflow-hub # Pinned in meta.yml, but no problems here... yet + - conda-forge::tensorflow-hub # Pinned in meta.yml, but no problems here... yet - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose - # - libopencv *=headless* # [linux] https://github.com/nebari-dev/nebari-docs/issues/443 - - pip: - - "--editable=.[conda_dev]" \ No newline at end of file + - pip: + - "--editable=.[conda_dev]" From b096ffa96e96c2334a45fc9fd755b2f69de4cff1 Mon Sep 17 00:00:00 2001 From: roomrys Date: Thu, 5 Sep 2024 10:43:11 -0700 Subject: [PATCH 103/113] Remove duplicate packages --- environment.yml | 3 +-- environment_no_cuda.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/environment.yml b/environment.yml index bda8b3bca..bbe9198cb 100644 --- a/environment.yml +++ b/environment.yml @@ -14,7 +14,6 @@ dependencies: # Packages SLEAP uses directly - conda-forge::attrs >=23.1.0 # Corresponds to version of cattrs - conda-forge::cattrs >=23.2.0 - - conda-forge::imageio-ffmpeg # Required for imageio to read/write videos with ffmpeg - conda-forge::jsmin - conda-forge::jsonpickle <=1.5.0 # 1.5.1 breaks compatibility with v1 encoded files - conda-forge::networkx @@ -22,7 +21,7 @@ dependencies: - conda-forge::opencv - conda-forge::h5py - conda-forge::imageio - - conda-forge::imageio-ffmpeg + - conda-forge::imageio-ffmpeg # Required for imageio to read/write videos with ffmpeg - conda-forge::pandas - conda-forge::pip - conda-forge::pillow #>=8.3.1,<=8.4.0 diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index 688ab62b8..a4ecdb923 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -15,14 +15,13 @@ dependencies: # Packages SLEAP uses directly - conda-forge::attrs >=23.1.0 # Corresponds to version of cattrs - conda-forge::cattrs >=23.2.0 - - conda-forge::imageio-ffmpeg # Required for imageio to read/write videos with ffmpeg - conda-forge::jsmin - conda-forge::jsonpickle <=1.5.0 # 1.5.1 breaks compatibility with v1 encoded files - conda-forge::networkx - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::h5py - conda-forge::imageio - - conda-forge::imageio-ffmpeg + - conda-forge::imageio-ffmpeg # Required for imageio to read/write videos with ffmpeg - conda-forge::pandas - conda-forge::pip - conda-forge::pillow #>=8.3.1,<=8.4.0 From 7c2230b5c8c70224d01bbccee49c7c5278222f4f Mon Sep 17 00:00:00 2001 From: roomrys Date: Thu, 5 Sep 2024 10:55:59 -0700 Subject: [PATCH 104/113] Match meta dependencies to environment yml dependencies --- .conda/meta.yaml | 7 ++++--- .conda_mac/meta.yaml | 16 ++++++++-------- environment_mac.yml | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index ccc621e8c..0721c1b4e 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -30,7 +30,7 @@ requirements: # Only the packages above are required to build, but listing them all ensures no # unnecessary pypi packages are installed via the build script (bld.bat, build.sh) - - conda-forge::attrs + - conda-forge::attrs - conda-forge::cattrs - conda-forge::h5py - conda-forge::imageio @@ -40,7 +40,7 @@ requirements: - conda-forge::networkx - conda-forge::opencv - conda-forge::pandas - - conda-forge::pillow >=8.3.2 + - conda-forge::pillow - conda-forge::psutil - conda-forge::pykalman - conda-forge::pyside6 >=6.5.0 # 6.4 conda package uses problematic QtCharts @@ -54,6 +54,7 @@ requirements: - conda-forge::scikit-learn >=1.0.0 # Python 3.10 requires scikit-learn >=1.0 - conda-forge::seaborn - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated + - conda-forge::tensorflow-hub - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose @@ -74,7 +75,7 @@ requirements: - conda-forge::networkx - conda-forge::opencv - conda-forge::pandas - - conda-forge::pillow >=8.3.2 + - conda-forge::pillow - conda-forge::psutil - conda-forge::pykalman - conda-forge::pyside6 >=6.5.0 # 6.4 conda package uses problematic QtCharts diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index 849b80d8e..5312c99d1 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -31,13 +31,13 @@ requirements: # Only the packages above are required to build, but listing them all ensures no # unnecessary pypi packages are installed via the build script (bld.bat, build.sh) - - conda-forge::attrs >=21.2.0 + - conda-forge::attrs - conda-forge::cattrs - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::jsmin - - conda-forge::jsonpickle + - conda-forge::jsonpickle <=1.5.0 # 1.5.1 breaks compatibility with v1 encoded files - conda-forge::networkx - conda-forge::opencv - conda-forge::pandas @@ -50,8 +50,8 @@ requirements: - conda-forge::pyzmq - conda-forge::qtpy >=2.0.1 - conda-forge::rich - - conda-forge::scipy >=1.7.0 # Python 3.10 needs scipy >= 1.7.0 - - conda-forge::scikit-image + - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 + - conda-forge::scikit-image >=0.21.0 # 0.20.0 requires python_abi 3.8.* *_cp38 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 needs scikit-learn >= 1.0 - conda-forge::seaborn - sleap-deps/label/dev::tensorflow ==2.12.0 # TODO: Switch to main label when updated @@ -61,13 +61,13 @@ requirements: run: - conda-forge::python >=3.10.0,<3.11.0 - - conda-forge::attrs >=21.2.0 + - conda-forge::attrs - conda-forge::cattrs - conda-forge::h5py - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::jsmin - - conda-forge::jsonpickle + - conda-forge::jsonpickle <=1.5.0 # 1.5.1 breaks compatibility with v1 encoded files - conda-forge::networkx - conda-forge::numpy >=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 - conda-forge::opencv @@ -82,10 +82,10 @@ requirements: - conda-forge::qtpy >=2.0.1 - conda-forge::rich - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - - conda-forge::scikit-image + - conda-forge::scikit-image >=0.21.0 # 0.20.0 requires python_abi 3.8.* *_cp38 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 needs scikit-learn >= 1.0 - conda-forge::seaborn - - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated + - sleap-deps/label/dev::tensorflow ==2.12.0 # TODO: Switch to main label when updated - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose diff --git a/environment_mac.yml b/environment_mac.yml index b420560bc..fc77d6785 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -34,7 +34,7 @@ dependencies: - conda-forge::qtpy >=2.0.1 - conda-forge::rich - conda-forge::scipy >=1.7.0 # Python 3.10 is compatible with scipy >=1.7.0 - - conda-forge::scikit-image >= 0.21.0 # package scikit-image-0.20.0-py38hfaca753_0 requires python_abi 3.8.* *_cp38 + - conda-forge::scikit-image >=0.21.0 # 0.20.0 requires python_abi 3.8.* *_cp38 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 - conda-forge::seaborn - sleap-deps/label/dev::tensorflow ==2.12.0 # TODO: Switch to main label when updated From d25c7d55d3a63e1f663312695bb8eb4868fdaf1e Mon Sep 17 00:00:00 2001 From: roomrys Date: Thu, 5 Sep 2024 10:59:58 -0700 Subject: [PATCH 105/113] Remove commented out code In git we trust --- dev_requirements.txt | 1 - requirements.txt | 3 --- 2 files changed, 4 deletions(-) diff --git a/dev_requirements.txt b/dev_requirements.txt index 4e095d534..9d9d6ce91 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -6,7 +6,6 @@ pytest-cov<=3.0.0 pytest-xvfb ipython sphinx -# furo sphinx-book-theme sphinx-copybutton nbformat==5.1.3 diff --git a/requirements.txt b/requirements.txt index d39990819..0fbd1760f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,6 @@ # This file contains the minimal requirements to be installed via pip when using conda. # No conda packages for these -# tensorflow-macos==2.9.2; sys_platform == 'darwin' and platform_machine == 'arm64' # 2.9.2 can only work up to Python 3.10 -# tensorflow-metal==0.5.0; sys_platform == 'darwin' and platform_machine == 'arm64' -# tensorflow-hub==0.12.0; sys_platform == 'darwin' and platform_machine == 'arm64' imgstore<0.3.0 # 0.3.3 results in https://github.com/O365/python-o365/issues/591 which is from https://github.com/regebro/tzlocal/issues/112 when tzlocal is v3.0 nixio>=1.5.3 # Constrain put on by @jgrewe from G-Node qimage2ndarray # ==1.9.0 From 13444f0c94fd67816a6043e93cd33badbe051584 Mon Sep 17 00:00:00 2001 From: roomrys Date: Thu, 5 Sep 2024 11:04:03 -0700 Subject: [PATCH 106/113] Add comment for why certain pins --- pypi_requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pypi_requirements.txt b/pypi_requirements.txt index 9bd29a716..4adced4c4 100644 --- a/pypi_requirements.txt +++ b/pypi_requirements.txt @@ -9,9 +9,9 @@ cattrs>=23.2.0 imageio imageio-ffmpeg jsmin -jsonpickle<=1.5.0 +jsonpickle<=1.5.0 # 1.5.1 breaks compatibility with v1 encoded files networkx -numpy>=1.16.5 +numpy>=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 opencv-python pandas pillow From e2e5b5cbb776fb8d00d065a074d9c6d6cbf10f27 Mon Sep 17 00:00:00 2001 From: roomrys Date: Wed, 11 Sep 2024 09:51:30 -0700 Subject: [PATCH 107/113] Pin numpy<2.0 --- pypi_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pypi_requirements.txt b/pypi_requirements.txt index 4adced4c4..38256ca24 100644 --- a/pypi_requirements.txt +++ b/pypi_requirements.txt @@ -11,7 +11,7 @@ imageio-ffmpeg jsmin jsonpickle<=1.5.0 # 1.5.1 breaks compatibility with v1 encoded files networkx -numpy>=1.16.5 # Scipy 1.7.0 requires numpy >=1.16.5 +numpy>=1.16.5,<2.0 # Scipy 1.7.0 requires numpy >=1.16.5 opencv-python pandas pillow From 7b7740209043807d4bba2812aed403f7ffc41512 Mon Sep 17 00:00:00 2001 From: roomrys Date: Wed, 11 Sep 2024 12:20:47 -0700 Subject: [PATCH 108/113] Pin jsonpickle <=1.5.0 in win/linux meta.yaml --- .conda/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index 0721c1b4e..084493d60 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -36,7 +36,7 @@ requirements: - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::jsmin - - conda-forge::jsonpickle + - conda-forge::jsonpickle <=1.5.0 # 1.5.1 breaks compatibility with v1 encoded files - conda-forge::networkx - conda-forge::opencv - conda-forge::pandas From a3e1bb26959f9421200427679903da801c586d05 Mon Sep 17 00:00:00 2001 From: roomrys Date: Wed, 11 Sep 2024 13:01:07 -0700 Subject: [PATCH 109/113] Also pin jsonpick<=1.5.0 in the run section for win/linux --- .conda/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index 084493d60..7693ce579 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -71,7 +71,7 @@ requirements: - conda-forge::imageio - conda-forge::imageio-ffmpeg - conda-forge::jsmin - - conda-forge::jsonpickle + - conda-forge::jsonpickle <=1.5.0 # 1.5.1 breaks compatibility with v1 encoded files - conda-forge::networkx - conda-forge::opencv - conda-forge::pandas From 902d06231812bfcf9af340e6fae8dfc6d0550ab6 Mon Sep 17 00:00:00 2001 From: roomrys <38435167+roomrys@users.noreply.github.com> Date: Thu, 12 Sep 2024 08:42:42 -0700 Subject: [PATCH 110/113] Use sleap-deps main channel --- .conda/condarc.yaml | 2 +- .conda/meta.yaml | 4 ++-- .conda_mac/condarc.yaml | 4 ++-- .conda_mac/meta.yaml | 4 ++-- environment.yml | 5 ++--- environment_mac.yml | 5 ++--- environment_no_cuda.yml | 5 ++--- 7 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.conda/condarc.yaml b/.conda/condarc.yaml index 07f50fc99..f5673d643 100644 --- a/.conda/condarc.yaml +++ b/.conda/condarc.yaml @@ -1,5 +1,5 @@ channels: - - sleap-deps/label/dev + - sleap-deps - conda-forge - nvidia - anaconda diff --git a/.conda/meta.yaml b/.conda/meta.yaml index 7693ce579..ea14c4171 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -53,7 +53,7 @@ requirements: - conda-forge::scikit-image - conda-forge::scikit-learn >=1.0.0 # Python 3.10 requires scikit-learn >=1.0 - conda-forge::seaborn - - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated + - sleap-deps::tensorflow ==2.9.2 - conda-forge::tensorflow-hub - conda-forge::qudida - conda-forge::albumentations @@ -88,7 +88,7 @@ requirements: - conda-forge::scikit-image - conda-forge::scikit-learn >=1.0.0 # Python 3.10 requires scikit-learn >=1.0 - conda-forge::seaborn - - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated + - sleap-deps::tensorflow ==2.9.2 - conda-forge::tensorflow-hub - conda-forge::qudida - conda-forge::albumentations diff --git a/.conda_mac/condarc.yaml b/.conda_mac/condarc.yaml index 9dc57eb5d..077fcd9d8 100644 --- a/.conda_mac/condarc.yaml +++ b/.conda_mac/condarc.yaml @@ -1,6 +1,6 @@ # https://github.com/github/roadmap/issues/528 channels: - - sleap-deps/label/dev + - sleap-deps - conda-forge - - anaconda \ No newline at end of file + - anaconda diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index 5312c99d1..a69750d75 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -54,7 +54,7 @@ requirements: - conda-forge::scikit-image >=0.21.0 # 0.20.0 requires python_abi 3.8.* *_cp38 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 needs scikit-learn >= 1.0 - conda-forge::seaborn - - sleap-deps/label/dev::tensorflow ==2.12.0 # TODO: Switch to main label when updated + - sleap-deps::tensorflow ==2.12.0 - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose @@ -85,7 +85,7 @@ requirements: - conda-forge::scikit-image >=0.21.0 # 0.20.0 requires python_abi 3.8.* *_cp38 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 needs scikit-learn >= 1.0 - conda-forge::seaborn - - sleap-deps/label/dev::tensorflow ==2.12.0 # TODO: Switch to main label when updated + - sleap-deps::tensorflow ==2.12.0 - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose diff --git a/environment.yml b/environment.yml index bbe9198cb..67bd91c51 100644 --- a/environment.yml +++ b/environment.yml @@ -3,10 +3,9 @@ name: sleap channels: - - sleap-deps/label/dev + - sleap-deps - conda-forge - nvidia - - sleap-deps - sleap - anaconda @@ -38,7 +37,7 @@ dependencies: - conda-forge::scikit-image - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 - conda-forge::seaborn - - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated + - sleap-deps::tensorflow ==2.9.2 - conda-forge::tensorflow-hub # Pinned in meta.yml, but no problems here... yet - conda-forge::qudida - conda-forge::albumentations diff --git a/environment_mac.yml b/environment_mac.yml index fc77d6785..d36351d5d 100644 --- a/environment_mac.yml +++ b/environment_mac.yml @@ -3,9 +3,8 @@ name: sleap channels: - - sleap-deps/label/dev - - conda-forge - sleap-deps + - conda-forge - anaconda dependencies: @@ -37,7 +36,7 @@ dependencies: - conda-forge::scikit-image >=0.21.0 # 0.20.0 requires python_abi 3.8.* *_cp38 - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 - conda-forge::seaborn - - sleap-deps/label/dev::tensorflow ==2.12.0 # TODO: Switch to main label when updated + - sleap-deps::tensorflow ==2.12.0 - conda-forge::qudida - conda-forge::albumentations - conda-forge::ndx-pose diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index a4ecdb923..d5e247609 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -5,9 +5,8 @@ name: sleap_ci channels: - - sleap-deps/label/dev - - conda-forge - sleap-deps + - conda-forge - sleap - anaconda @@ -38,7 +37,7 @@ dependencies: - conda-forge::scikit-image - conda-forge::scikit-learn >=1.0.0 # Python 3.10 is compatible with scikit-learn >=1.0.0 - conda-forge::seaborn - - sleap-deps/label/dev::tensorflow ==2.9.2a0 # TODO: Switch to main label when updated + - sleap-deps::tensorflow ==2.9.2 - conda-forge::tensorflow-hub # Pinned in meta.yml, but no problems here... yet - conda-forge::qudida - conda-forge::albumentations From 3abbd50aa966476dffed466f7cf2bca4f47b47fc Mon Sep 17 00:00:00 2001 From: Liezl Maree <38435167+roomrys@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:25:02 -0700 Subject: [PATCH 111/113] Remove python version from website build yml (#1991) Remove python version constraint (implicitly stated in environment yml) --- .github/workflows/website.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index ede9eef9f..3e4008ea9 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -8,7 +8,7 @@ on: # 'main' triggers updates to 'sleap.ai', all others to 'sleap.ai/develop' - main - develop - - liezl/update-intallation-docs-1.4.1 # again! + - liezl/remove-python-version-from-website-build-yml paths: - "docs/**" - "README.rst" @@ -26,7 +26,6 @@ jobs: # https://github.com/conda-incubator/setup-miniconda uses: conda-incubator/setup-miniconda@v3.0.3 with: - python-version: 3.7 environment-file: environment_no_cuda.yml activate-environment: sleap_ci - name: Print environment info From 9d42bb7e00e1ff6c3df402fd906865fa8f5253bd Mon Sep 17 00:00:00 2001 From: roomrys <38435167+roomrys@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:29:59 -0700 Subject: [PATCH 112/113] Add XLA_FLAGS for windows and linux --- .conda/bld.bat | 11 +++++++++++ .conda/sleap_activate.bat | 4 ++++ .conda/sleap_activate.sh | 7 +++++-- .conda/sleap_deactivate.bat | 2 ++ .conda/sleap_deactivate.sh | 5 +++-- 5 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 .conda/sleap_activate.bat create mode 100644 .conda/sleap_deactivate.bat diff --git a/.conda/bld.bat b/.conda/bld.bat index 22b63e50a..9744f5387 100644 --- a/.conda/bld.bat +++ b/.conda/bld.bat @@ -12,3 +12,14 @@ pip install --no-cache-dir -r .\requirements.txt @REM Install sleap itself. This does not install the requirements, but will list which @REM requirements are missing (see "install_requires") when user attempts to install. python setup.py install --single-version-externally-managed --record=record.txt + +@REM Copied from https://docs.conda.io/projects/conda-build/en/latest/resources/activate-scripts.html +setlocal EnableDelayedExpansion +:: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. +:: This will allow them to be run on environment activation. +for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + :: Copy unix shell activation scripts, needed by Windows Bash users + copy %RECIPE_DIR%\%%F.sh %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.sh +) \ No newline at end of file diff --git a/.conda/sleap_activate.bat b/.conda/sleap_activate.bat new file mode 100644 index 000000000..ed23f657b --- /dev/null +++ b/.conda/sleap_activate.bat @@ -0,0 +1,4 @@ +@REM Remember the old library path for when we deactivate +set SLEAP_OLD_XLA_FLAGS=%XLA_FLAGS% +@REM Help XLA find CUDA +set XLA_FLAGS=--xla_gpu_cuda_data_dir=%CONDA_PREFIX% \ No newline at end of file diff --git a/.conda/sleap_activate.sh b/.conda/sleap_activate.sh index 885879a89..eb838ab3a 100644 --- a/.conda/sleap_activate.sh +++ b/.conda/sleap_activate.sh @@ -1,6 +1,9 @@ #!/bin/sh -# Remember the old library path for when we deactivate +# Remember the old variables for when we deactivate export SLEAP_OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH +export SLEAP_OLD_XLA_FLAGS=$XLA_FLAGS # Help CUDA find GPUs! -export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH \ No newline at end of file +export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH +# Help XLA find CUDA +export XLA_FLAGS=--xla_gpu_cuda_data_dir=$CONDA_PREFIX \ No newline at end of file diff --git a/.conda/sleap_deactivate.bat b/.conda/sleap_deactivate.bat new file mode 100644 index 000000000..50432404a --- /dev/null +++ b/.conda/sleap_deactivate.bat @@ -0,0 +1,2 @@ +@REM Reset to the old variables when deactivating the environment +set XLA_FLAGS=%SLEAP_OLD_XLA_FLAGS% \ No newline at end of file diff --git a/.conda/sleap_deactivate.sh b/.conda/sleap_deactivate.sh index 857c0f49c..6b4b0326b 100644 --- a/.conda/sleap_deactivate.sh +++ b/.conda/sleap_deactivate.sh @@ -1,4 +1,5 @@ #!/bin/sh -# Reset to the old library path for when deactivating the environment -export LD_LIBRARY_PATH=$SLEAP_OLD_LD_LIBRARY_PATH \ No newline at end of file +# Reset to the old variables when deactivating the environment +export LD_LIBRARY_PATH=$SLEAP_OLD_LD_LIBRARY_PATH +export XLA_FLAGS=$SLEAP_OLD_XLA_FLAGS \ No newline at end of file From 09046813be2be1e368d0a0323337b21516f9a367 Mon Sep 17 00:00:00 2001 From: roomrys <38435167+roomrys@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:31:31 -0700 Subject: [PATCH 113/113] Disable annoying albumentations update message --- .conda/sleap_activate.bat | 4 +++- .conda/sleap_activate.sh | 4 +++- .conda/sleap_deactivate.bat | 3 ++- .conda/sleap_deactivate.sh | 3 ++- .conda_mac/build.sh | 10 +++++++++- .conda_mac/sleap_activate.sh | 4 ++++ .conda_mac/sleap_deactivate.sh | 4 ++++ 7 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 .conda_mac/sleap_activate.sh create mode 100644 .conda_mac/sleap_deactivate.sh diff --git a/.conda/sleap_activate.bat b/.conda/sleap_activate.bat index ed23f657b..3c9d50018 100644 --- a/.conda/sleap_activate.bat +++ b/.conda/sleap_activate.bat @@ -1,4 +1,6 @@ @REM Remember the old library path for when we deactivate set SLEAP_OLD_XLA_FLAGS=%XLA_FLAGS% +set SLEAP_OLD_NO_ALBUMENTATIONS_UPDATE=%NO_ALBUMENTATIONS_UPDATE% @REM Help XLA find CUDA -set XLA_FLAGS=--xla_gpu_cuda_data_dir=%CONDA_PREFIX% \ No newline at end of file +set XLA_FLAGS=--xla_gpu_cuda_data_dir=%CONDA_PREFIX% +set NO_ALBUMENTATIONS_UPDATE=1 \ No newline at end of file diff --git a/.conda/sleap_activate.sh b/.conda/sleap_activate.sh index eb838ab3a..dc4f95949 100644 --- a/.conda/sleap_activate.sh +++ b/.conda/sleap_activate.sh @@ -6,4 +6,6 @@ export SLEAP_OLD_XLA_FLAGS=$XLA_FLAGS # Help CUDA find GPUs! export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH # Help XLA find CUDA -export XLA_FLAGS=--xla_gpu_cuda_data_dir=$CONDA_PREFIX \ No newline at end of file +export XLA_FLAGS=--xla_gpu_cuda_data_dir=$CONDA_PREFIX +# Disable annoying albumentations message +export NO_ALBUMENTATIONS_UPDATE=1 \ No newline at end of file diff --git a/.conda/sleap_deactivate.bat b/.conda/sleap_deactivate.bat index 50432404a..e8150846b 100644 --- a/.conda/sleap_deactivate.bat +++ b/.conda/sleap_deactivate.bat @@ -1,2 +1,3 @@ @REM Reset to the old variables when deactivating the environment -set XLA_FLAGS=%SLEAP_OLD_XLA_FLAGS% \ No newline at end of file +set XLA_FLAGS=%SLEAP_OLD_XLA_FLAGS% +set NO_ALBUMENTATIONS_UPDATE=%SLEAP_OLD_NO_ALBUMENTATIONS_UPDATE% \ No newline at end of file diff --git a/.conda/sleap_deactivate.sh b/.conda/sleap_deactivate.sh index 6b4b0326b..f8ed41c2b 100644 --- a/.conda/sleap_deactivate.sh +++ b/.conda/sleap_deactivate.sh @@ -2,4 +2,5 @@ # Reset to the old variables when deactivating the environment export LD_LIBRARY_PATH=$SLEAP_OLD_LD_LIBRARY_PATH -export XLA_FLAGS=$SLEAP_OLD_XLA_FLAGS \ No newline at end of file +export XLA_FLAGS=$SLEAP_OLD_XLA_FLAGS +export NO_ALBUMENTATIONS_UPDATE=$SLEAP_OLD_NO_ALBUMENTATIONS_UPDATE \ No newline at end of file diff --git a/.conda_mac/build.sh b/.conda_mac/build.sh index a68193560..7a7f053f1 100644 --- a/.conda_mac/build.sh +++ b/.conda_mac/build.sh @@ -8,4 +8,12 @@ export PIP_IGNORE_INSTALLED=False pip install --no-cache-dir -r requirements.txt -python setup.py install --single-version-externally-managed --record=record.txt \ No newline at end of file +python setup.py install --single-version-externally-managed --record=record.txt + +# Copy the activate scripts to $PREFIX/etc/conda/activate.d. +# This will allow them to be run on environment activation. +for CHANGE in "activate" "deactivate" +do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${PKG_NAME}_${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" +done \ No newline at end of file diff --git a/.conda_mac/sleap_activate.sh b/.conda_mac/sleap_activate.sh new file mode 100644 index 000000000..6d08a2c44 --- /dev/null +++ b/.conda_mac/sleap_activate.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +# Disable annoying albumentations message +export NO_ALBUMENTATIONS_UPDATE=1 \ No newline at end of file diff --git a/.conda_mac/sleap_deactivate.sh b/.conda_mac/sleap_deactivate.sh new file mode 100644 index 000000000..0721dfb4a --- /dev/null +++ b/.conda_mac/sleap_deactivate.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +# Reset to the old variables when deactivating the environment +export NO_ALBUMENTATIONS_UPDATE=$SLEAP_OLD_NO_ALBUMENTATIONS_UPDATE \ No newline at end of file