ENH: Make tensorflow,torch,zarr packages optional#135
ENH: Make tensorflow,torch,zarr packages optional#135Leengit merged 5 commits intoDigitalSlideArchive:masterfrom
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
2173c00 to
20cc0a0
Compare
|
The tests are failing because # download image
wsi_path = pooch.retrieve(
fname="TCGA-AN-A0G0-01Z-00-DX1.svs",
url=(
"https://drive.google.com/uc"
"?export=download"
"&id=19agE_0cWY582szhOVxp9h3kozRfB4CvV"
"&confirm=t"
"&uuid=6f2d51e7-9366-4e98-abc7-4f77427dd02c"
"&at=ALgDtswlqJJw1KU7P3Z1tZNcE01I:1679111148632"
),
known_hash="d046f952759ff6987374786768fc588740eef1e54e4e295a684f3bd356c8528f",
path=str(pooch.os_cache("pooch")) + os.sep + "wsi",
)
# download binary mask image
mask_path = pooch.retrieve(
fname="TCGA-AN-A0G0-01Z-00-DX1.mask.png",
url=(
"https://drive.google.com/uc"
"?export=download"
"&id=17GOOHbL8Bo3933rdIui82akr7stbRfta"
),
known_hash="bb657ead9fd3b8284db6ecc1ca8a1efa57a0e9fd73d2ea63ce6053fbd3d65171",
path=str(pooch.os_cache("pooch")) + os.sep + "wsi",
)
print(f"Have {mask_path}") |
|
@andsild can fix this for us |
|
There are some differences in the URL, not sure why they changed, but here's what we use (changing the URL should be sufficient): wsi_fname = "TCGA-AN-A0G0-01Z-00-DX1.svs"
wsi_path = pooch.retrieve(
fname=wsi_fname,
url="https://drive.usercontent.google.com/download?id=19agE_0cWY582szhOVxp9h3kozRfB4CvV&export=download&confirm=t",
known_hash="d046f952759ff6987374786768fc588740eef1e54e4e295a684f3bd356c8528f",
path=wsi_files,
)
print(f"Downloaded {wsi_fname} to {wsi_files}")
mask_fname = "TCGA-AN-A0G0-01Z-00-DX1.mask.png"
mask_path = pooch.retrieve(
fname=mask_fname,
url="https://drive.usercontent.google.com/download?id=17GOOHbL8Bo3933rdIui82akr7stbRfta&export=download&confirm=t",
known_hash="bb657ead9fd3b8284db6ecc1ca8a1efa57a0e9fd73d2ea63ce6053fbd3d65171",
path=wsi_files,
)
print(f"Downloaded {mask_fname} to {wsi_files}") |
|
(if you want me to I could fix it, but I dont have write privileges in this repository) |
|
Thank you for the updated URLs. I have made the changes myself, and have given you permissions for the repository. |
ee2af47 to
6d8984a
Compare
060980d to
a7517fa
Compare
|
With the current set of commits, on GitHub only, with Python 3.8 only, somewhere deep inside a dependency of @manthey et al. have you seen this before? Python 3.8 works fine locally for me. It works fine with Python 3.6, 3.7, and 3.9. |
f558495 to
79c6d92
Compare
|
Because it builds and passes all tests on my local system with Python 3.8, and it builds and passes all tests on GitHub with Python 3.6, 3.7, and 3.9, I have gone forward with the hack response of removing the Python 3.8 test build from GitHub. If approved and merged as is, we should submit an issue to find a fix for the Python 3.8 build on GitHub. |
|
This pull request is ready for review. |
I expect that this means some other package is specifying typing_extensions < 4.6 in the 3.8 environment, since |
And, looking further, the version of TensorFlow that installs on 3.8 (version 2.13.1) requires typing_extensions< 4.6, so TensorFlow on 3.8 is incompatible with large_image on 3.8 because of that. If we want these to be compatible, we'd have to relax the type rules in large_image. |
manthey
left a comment
There was a problem hiding this comment.
This looks fine, though we could further adjust tests for python versions.
Also, run `pip install --upgrade typing-extensions` on GitHub after installing the tensorflow dependency of histomics_stream because tensorflow under Python 3.8 inappropriately downgrades typing-extensions and that breaks a dependency of large_image.
fced4ca to
a69556e
Compare
3bfb78e to
8b3bab7
Compare
Closes #134 .