Skip to content

pythonPackages.deeplabcut: init at 2.1.6#61253

Closed
tbenst wants to merge 8 commits intoNixOS:masterfrom
tbenst:deeplabcut
Closed

pythonPackages.deeplabcut: init at 2.1.6#61253
tbenst wants to merge 8 commits intoNixOS:masterfrom
tbenst:deeplabcut

Conversation

@tbenst
Copy link
Contributor

@tbenst tbenst commented May 10, 2019

Motivation for this change

add deeplabcut, and fix derivation for wxPython40, which is broken and unlisted: #54235. Now working thanks to help from Phoenix team wxWidgets/Phoenix#1162 and @deliciouslytyped

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Resolves: #54235

@tbenst tbenst requested a review from FRidh as a code owner May 10, 2019 21:21
@ofborg ofborg bot added the 6.topic: python Python is a high-level, general-purpose programming language. label May 10, 2019
@deliciouslytyped
Copy link
Contributor

deliciouslytyped commented May 10, 2019

It would probably be more appropriate to separate wxPython 4 changes into a separate PR. (but I'm not sure)

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels May 10, 2019
@tbenst
Copy link
Contributor Author

tbenst commented May 16, 2019

@deliciouslytyped hmm not sure either, I couldn't find relevant guidance in the contribution docs. I put as one pull request as DeepLabCut needs WxPython4 to work, and separating could lead to a broken package if merged before WxPython, but my NixOS / open source experience is limited so happy for advice!

@tbenst
Copy link
Contributor Author

tbenst commented May 27, 2019

Thanks, @risicle, made the suggested change!

@veprbl
Copy link
Member

veprbl commented Jun 1, 2019

@tbenst Could you separate wxPython fix into a separate PR? We generally prefer orthogonal changes to be in separate commits. The changes appear to be significant enough to be reviewed separately, so doing it in two separate PR's should help.

@deliciouslytyped
Copy link
Contributor

@tbenst On that note, since you're worried about breakage on separation you could probably wait for the wxPython4 to get merged and then do the deeplabcut.

@tbenst
Copy link
Contributor Author

tbenst commented Jun 5, 2019

@veprbl @deliciouslytyped sure can do. will have to wait a bit due to looming deadlines

Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

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

Reviewed wxPython part

@tbenst tbenst mentioned this pull request Jul 1, 2019
10 tasks
@FRidh FRidh assigned FRidh and unassigned FRidh Jul 29, 2019
@tbenst tbenst requested a review from jonringer as a code owner October 30, 2019 06:56
@tbenst
Copy link
Contributor Author

tbenst commented Oct 30, 2019

updated now that wxPython4 is merged. Blocked until #71282

Also need to fix the my_X pattern by instead using something like the following from pytorch derivation:

# confirm that cudatoolkits are sync'd across dependencies
assert !(openMPISupport && cudaSupport) || matchesCudatoolkit openmpi;
assert !cudaSupport || matchesCudatoolkit magma;

# confirm that mkl is sync'd across dependencies
assert !mklSupport || mkl != null;
assert !(mklSupport && cudaSupport) || matchesMkl magma;
assert !mklSupport || (numpy.blasImplementation == "mkl" && numpy.blas == mkl);

@tbenst tbenst changed the title pythonPackages.deeplabcut: init at 2.0.5 pythonPackages.deeplabcut: init at 2.1.3 Nov 6, 2019
@tbenst
Copy link
Contributor Author

tbenst commented May 15, 2020

Ok, I fixed the imgaug issues. I think this is finally ready to merge! Verified working if cherry-picked onto 20.03.

Note that numpy is currently broken on master. But fixing that is outside the scope of this PR (I hope...).

Edit: forgot to mention, I figured out the hang. It's caused by an unknown bug in OpenBLAS. Hang does not occur with MKL. It's occurs in a call to np.dot, and cannot be replicated with the inputs alone, and most tests work fine, so I don't want to force users not to use openblas.

Edit2: found a small issue, need to add wrapGapps, will push...

@tbenst tbenst force-pushed the deeplabcut branch 2 times, most recently from 2b35fc4 to 794626b Compare June 17, 2020 06:09
@tbenst
Copy link
Contributor Author

tbenst commented Jun 17, 2020

ok, all the gapps & numpy issues are resolved, but now boto3 is broken on master.

ERROR: Could not find a version that satisfies the requirement botocore<1.17.0,>=1.16.23 (from boto3==1.13.23) (from versions: none)
ERROR: No matching distribution found for botocore<1.17.0,>=1.16.23 (from boto3==1.13.23)

@ofborg ofborg bot requested review from CMCDragonkai and Rakesh4G June 17, 2020 06:17
@ofborg ofborg bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. and removed 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Jun 17, 2020
@jonringer
Copy link
Contributor

ok, all the gapps & numpy issues are resolved, but now boto3 is broken on master.

This is fixed in staging-next, please allow a few days for it to land in master

@veprbl veprbl added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jun 20, 2020
@ryantm ryantm added 2.status: merge conflict This PR has merge conflicts with the target branch and removed 2.status: merge conflict This PR has merge conflicts with the target branch labels Oct 3, 2020
@stale
Copy link

stale bot commented Jun 4, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 4, 2021
Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

Please rebase this and familiarize yourself with the updated python docs.
If this PR gets no reaction in the next months, I am suggesting to close it.


script = writeText "deeplabcut"
''
#!/usr/bin/env python
Copy link
Member

Choose a reason for hiding this comment

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

Please substitute this right away.

Comment on lines +42 to +43
postInstall = ''
${old.postInstall}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
postInstall = ''
${old.postInstall}
postInstall = old.postInstall + ''

postInstall = ''
${old.postInstall}
mkdir -p $out/bin
cp ${script} $out/bin/deeplabcut
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
cp ${script} $out/bin/deeplabcut
ln -s ${script} $out/bin/deeplabcut

meta = with stdenvNoCC.lib; {
description = "Pretrained weights for ResNet";
longDescription = ''
Deep residual networks, or ResNets for short, provided the breakthrough idea of identity mappings in order to enable training of very deep convolutional neural networks on ImageNet. See: Deep Residual Learning for Image Recognition by Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun, Dec 2015.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Deep residual networks, or ResNets for short, provided the breakthrough idea of identity mappings in order to enable training of very deep convolutional neural networks on ImageNet. See: Deep Residual Learning for Image Recognition by Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun, Dec 2015.
Deep residual networks, or ResNets for short, provided the breakthrough idea of identity mappings in order to enable training of very deep convolutional neural networks on ImageNet.
See: Deep Residual Learning for Image Recognition by Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun, Dec 2015.

});
};

python = python37.override {
Copy link
Member

Choose a reason for hiding this comment

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

We no longer support 3.7 and version numbers should not be hardcoded like this

'';

checkPhase = ''
for f in tests/test*.py; do echo ========== $f ==========; python $f; done
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for f in tests/test*.py; do echo ========== $f ==========; python $f; done
for f in tests/test*.py; do echo ========== $f ==========; ${python.interpreter} $f; done

Comment on lines +46 to +48
# checkPhase = ''
# pytest
# '';
Copy link
Member

Choose a reason for hiding this comment

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

We want to run them

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 7, 2022
@Artturin Artturin closed this Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: python Python is a high-level, general-purpose programming language. 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wxPython-4.0 expression is not used