ome / omero-guide-ilastik

BSD 2-Clause "Simplified" License
4 stars 5 forks source link

Zarr #11

Closed jburel closed 4 years ago

jburel commented 4 years ago

Add notebooks and scripts to use zarr:

jburel commented 4 years ago
pwalczysko commented 4 years ago

Using repo2docker, and the idr notebook. See below - took quite a while.

%time input_data = load_from_s3(image_id)

CPU times: user 5.58 s, sys: 3.1 s, total: 8.68 s
Wall time: 31.2 s
jburel commented 4 years ago

This is faster than loading directly using getPlanes (~x3 faster) you are running the docker image locally

pwalczysko commented 4 years ago

repo2docker, idr notebook, the step

Load each image as an 5D-numpy array and analyze

Note, this error repeated on Mybinder later https://github.com/ome/omero-guide-ilastik/pull/11#issuecomment-619971488

Screen Shot 2020-04-27 at 12 55 02

Got a message from Jupyter - I would not say that the message is accurrate (did not say OK, just closed the window, the process seem to be getting on nicely)

pwalczysko commented 4 years ago

Weel, now, the workflow is stuck, I am getting

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-1-2993c68bb682> in <module>
      1 # Load the model linked to the dataset
----> 2 home = expanduser("~")
      3 model_file = home+"/notebooks/pipelines/pixel-class-133.ilp"
      4 # Re-order the array tczyz -> tzyxc
      5 input_data = input_data.swapaxes(1, 2).swapaxes(2, 3).swapaxes(3, 4)

NameError: name 'expanduser' is not defined

Possibly the kernel really was restarted, and the procedure is missing some definitions done in the previous cells ?

jburel commented 4 years ago

You need to start again from the first cell. Strange that the kernel dies. After which cell?

pwalczysko commented 4 years ago

@jburel After

Load each image as an 5D-numpy array and analyze. - interestingly, the second time around, this worked fine. But, after I have done it the second time, probably something expired again, after I wanted to close the connection, see below

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-10-8dd0cd799055> in <module>
----> 1 conn.close()

NameError: name 'conn' is not defined
pwalczysko commented 4 years ago

repo2docker worked principally fine for both notebooks. But, as the waiting times can be substantial, and also smooth run is not guaranteed, maybe there could be some provision for keeping the session alive ? I think I have expired twice, in each notebook once. Once I have crashed, but cannot repeat, see above (in the idr notebook).

jburel commented 4 years ago

@joshmoore removed the zip zarr section and added info in env file

pwalczysko commented 4 years ago

Mybinder

Load each image as an 5D-numpy array and analyze. step of the non-idr notebook.

I suspect that the kernel is hanging again, the cell has star for a long time now, no new output is incoming.

Oh, sorry, it made it in the end.

pwalczysko commented 4 years ago

mybinder

Load the results saved as zip and read the data for further analysis.

Again, a long wait. I suspect this will result again in me loosing the connection to the OMERO.server.

jburel commented 4 years ago

@pwalczysko I have added enableKeepAlive this should hopefully avoid the problem

pwalczysko commented 4 years ago

Mybinder

View the first channel so we can compare with the 3D view of the results of the pixel classification.

And again, see below - just after the data from the idr notebook loaded and I started to turn the 3D view of the original data around, the message popped up

Screen Shot 2020-04-27 at 14 01 23

As expected, after I got rid of the window, next cell is erroring.

NameError: name 'expanduser' is not defined

Again, this was fine after the second run of the same notebook.

pwalczysko commented 4 years ago

Alas, note that the stoppage can also vary - more than 4 times longer this time (from mybinder)

%time input_data = load_from_s3(image_id)

CPU times: user 4.31 s, sys: 651 ms, total: 4.96 s
Wall time: 2min 30s
pwalczysko commented 4 years ago

Mybinder worked principally as well. The problems encountedred were matching the repo2docker epxperience exactly - one unexpected kernel restart. I did not completely time out on mybinder, but only just.

jburel commented 4 years ago

Thanks for the feedback and testing, I have made the changes, merging and moving forward with next round