Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #25 #27

Merged
merged 1 commit into from
Jan 23, 2021
Merged

Fix issue #25 #27

merged 1 commit into from
Jan 23, 2021

Conversation

jburel
Copy link
Member

@jburel jburel commented Jan 21, 2021

See #25

This PR allows to create a conda environment using conda env create -n ilastik --file binder/environment.yml as described in https://omero-guides.readthedocs.io/projects/ilastik/en/latest/setup.html
This will also work using repo2docker.
Test on mac using conda env create -n ilastik --file binder/environment.yml
Test on mybinder or by running locally repo2docker

cc @tlambert03

@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch issue_25

@jburel
Copy link
Member Author

jburel commented Jan 22, 2021

you need to run the script from the scripts folder
i.e.

cd scripts
python pixel_classification.py

We could make it more robust but this is outside the scope of this PR

@pwalczysko
Copy link
Member

Ignore previous comment (deleted) - the script must be run from within the scripts directory, then it works.

@pwalczysko
Copy link
Member

Following error report when running from my Mac (Option 1). But the error was not consequential, the script is successfully saving the probabilities as image to OMERO now). Similar error (also without detrimental effect) I can see on MyBinder.

ERROR 2021-01-22 16:14:45,286 PluginManager 51402 4401141184 Unable to import plugin: /Users/pwalczysko/miniconda3/envs/ilastik-test/ilastik-meta/ilastik/ilastik/plugins_default/tracking_ctc_export
Traceback (most recent call last):
  File "/Users/pwalczysko/miniconda3/envs/ilastik-test/lib/python3.7/site-packages/yapsy/PluginManager.py", line 518, in loadPlugins
    candidate_module = PluginManager._importModule(plugin_module_name, candidate_filepath)
  File "/Users/pwalczysko/miniconda3/envs/ilastik-test/lib/python3.7/site-packages/yapsy/PluginManager.py", line 584, in _importModule
    candidate_module = imp.load_module(plugin_module_name,plugin_file,candidate_filepath+".py",("py","r",imp.PY_SOURCE))
  File "/Users/pwalczysko/miniconda3/envs/ilastik-test/lib/python3.7/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/Users/pwalczysko/miniconda3/envs/ilastik-test/lib/python3.7/imp.py", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/pwalczysko/miniconda3/envs/ilastik-test/ilastik-meta/ilastik/ilastik/plugins_default/tracking_ctc_export.py", line 4, in <module>
    from skimage.external import tifffile
ModuleNotFoundError: No module named 'skimage.external'
ERROR:yapsy:Unable to import plugin: /Users/pwalczysko/miniconda3/envs/ilastik-test/ilastik-meta/ilastik/ilastik/plugins_default/tracking_ctc_export
Traceback (most recent call last):
  File "/Users/pwalczysko/miniconda3/envs/ilastik-test/lib/python3.7/site-packages/yapsy/PluginManager.py", line 518, in loadPlugins
    candidate_module = PluginManager._importModule(plugin_module_name, candidate_filepath)
  File "/Users/pwalczysko/miniconda3/envs/ilastik-test/lib/python3.7/site-packages/yapsy/PluginManager.py", line 584, in _importModule
    candidate_module = imp.load_module(plugin_module_name,plugin_file,candidate_filepath+".py",("py","r",imp.PY_SOURCE))
  File "/Users/pwalczysko/miniconda3/envs/ilastik-test/lib/python3.7/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/Users/pwalczysko/miniconda3/envs/ilastik-test/lib/python3.7/imp.py", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/pwalczysko/miniconda3/envs/ilastik-test/ilastik-meta/ilastik/ilastik/plugins_default/tracking_ctc_export.py", line 4, in <module>
    from skimage.external import tifffile
ModuleNotFoundError: No module named 'skimage.external'

@pwalczysko
Copy link
Member

pwalczysko commented Jan 22, 2021

Both locally and on MyBinder the script and notebook respectively worked as expected.
The only thing which is surprising is that from MyBinder, the probability maps coming from ilastik have wrong Rnd settings in OMERO. The images appear black, but the values are there, and the settings can be fixed using the Min/Max button in iviewer.

@jburel
Copy link
Member Author

jburel commented Jan 22, 2021

The error is coming from the version of skimage that ilastik comes with. this has been fixed in newer version of ilastik.

@pwalczysko
Copy link
Member

Even after I stopped the MyBinder, the rnd issue with images coming from the local Mac persists, see
https://workshop.openmicroscopy.org/webclient/?show=image-57506
(sorry, I was claiming that the problematic image is coming from MyBinder, but of course I had no idea - now I am sure the last one comes from the local build)

@jburel
Copy link
Member Author

jburel commented Jan 22, 2021

It seems to be a problem with the rnd settings in omero
This is how it looks after moving the channel's sliders
Screenshot 2021-01-22 at 16 54 17

@pwalczysko
Copy link
Member

Second time round, from MyBinder only, the rnd were just fine. I am not too worried about the rnd issue.

@jburel jburel merged commit 0c1853b into ome:master Jan 23, 2021
@jburel jburel deleted the issue_25 branch August 11, 2021 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants