Upgrade ADS requirements to be compatible with ivadomed
See original GitHub issueIn order to run axondeepseg and ivadomed in the same environment, we would need to upgrade the following requirements:
pillow==6.2.0
to at least ==7.0.0
scikit-learn==0.19.2
to at least ==0.20.3
tqdm== 4.24.0
to at least ==4.30
numpy==1.16.4
to at least ==1.16.6
ADS tests won’t pass with pillow==7.0.0
.
Details:
test/test_integrity_test.py:17:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
AxonDeepSeg/integrity_test.py:40: in integrity_test
prediction = axon_segmentation([path_testing], ["image.png"], path_model, config_network, prediction_proba_activate=True, verbosity_level=4)
AxonDeepSeg/apply_model.py:258: in axon_segmentation
gpu_per=gpu_per, verbosity_level=verbosity_level)
AxonDeepSeg/apply_model.py:51: in apply_convnet
path_acquisitions, acquisitions_resolutions, resampled_resolutions, verbose_mode=verbosity_level)
AxonDeepSeg/apply_model.py:326: in load_acquisitions
original_acquisitions.append(ads.imread(path_img))
AxonDeepSeg/ads_utils.py:261: in imread
raw_img = imageio.imread(filename)
../miniconda/envs/ads_ivado_a/lib/python3.7/site-packages/imageio/core/functions.py:206: in imread
reader = read(uri, format, 'i', **kwargs)
../miniconda/envs/ads_ivado_a/lib/python3.7/site-packages/imageio/core/functions.py:123: in get_reader
format = formats.search_read_format(request)
../miniconda/envs/ads_ivado_a/lib/python3.7/site-packages/imageio/core/format.py:673: in search_read_format
if format.can_read(request):
../miniconda/envs/ads_ivado_a/lib/python3.7/site-packages/imageio/core/format.py:188: in can_read
return self._can_read(request)
../miniconda/envs/ads_ivado_a/lib/python3.7/site-packages/imageio/plugins/pillow.py:97: in _can_read
Image = self._init_pillow()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Format PNG-PIL - Portable network graphics>
def _init_pillow(self):
with self._lock:
if not self._pillow_imported:
self._pillow_imported = True # more like tried to import
import PIL
if not hasattr(PIL, 'PILLOW_VERSION'): # pragma: no cover
> raise ImportError('Imageio Pillow requires '
'Pillow, not PIL!')
E ImportError: Imageio Pillow requires Pillow, not PIL!
../miniconda/envs/ads_ivado_a/lib/python3.7/site-packages/imageio/plugins/pillow.py:81: ImportError
But all tests passed with the latest version of pillow==7.2.0
and the versions mentioned above for the three other libraries.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Upgrade ADS requirements to be compatible with ivadomed
In order to run axondeepseg and ivadomed in the same environment, we would need to upgrade the following requirements:.
Read more >Use cases - ivadomed documentation
AxonDeepSeg (ADS) is an open-source analysis software package for segmentating and computing morphometry on microscopy data of nerve fibers [Zaimi et al. 2018]....
Read more >Introduction — AxonDeepSeg 4.1.0 documentation
First, verify if you already have an AxonDeepSeg-compatible version of Miniconda or Anaconda properly installed and is in your systems path. In a...
Read more >Discovery ads format requirements - Advertising Policies Help
This article outlines the requirements your Discovery ad assets (headline, description, or image) must meet in order for your Discovery campaigns to serve....
Read more >Generic acquisition protocol for quantitative MRI of the spinal ...
Quantitative spinal cord (SC) magnetic resonance imaging (MRI) presents many challenges, including a lack of standardized imaging protocols.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Short answer
I very much agree with loosening
install_requires
withinsetup.py
for ADS. But, I’m not sure I agree with the suggestion to stop maintaining requirements entirely for ADS. I think it’s worthwhile to still try to specifiy the minimal requirements, just like IVADOMED does.If both ADS and IVADOMED have compatible minimal requirements (which I think is likely – the range of acceptable versions can be quite large, see IVADOMED), then in theory they should be able to be installed together without needing to specify an order.
Longer answer
Both projects are currently parsing
requirements.txt
directly forinstall_requires
insidesetup.py
.https://github.com/neuropoly/axondeepseg/blob/b0c06509a6dd612837830c36a0e04f0f3aff22ae/setup.py#L17-L20
https://github.com/neuropoly/axondeepseg/blob/b0c06509a6dd612837830c36a0e04f0f3aff22ae/setup.py#L50
But,
requirements.txt
andsetup.py
are meant to have very different purposes. Here’s a very comprehensive StackOverflow answer that explains why, and here’s its summary:I’m guessing that ADS used
pip freeze > requirements.txt
at some point. But, by bringing these strict requirements over tosetup.py
, I believe conflicts were practically inevitable (hence #327).So, my longer-term suggestion would be to use @mariehbourget’s findings for minimum version requirements directly in
setup.py
, and stop usingrequirements.txt
for the pip install.thank you so much for the very descriptive answer @joshuacwnewton ! 🙏