Open tischi opened 3 years ago
When I tried restarting the server I got this error message:
zpath_input: /workspace/datasets/elephant-demo/imgs.zarr
Traceback (most recent call last):
File "./main.py", line 662, in reset_seg_models
init_seg_models(config)
File "/usr/local/lib/python3.7/site-packages/elephant/common.py", line 670, in init_seg_models
input_shape = zarr.open(config.zpath_input, mode='r').shape[-3:]
File "/usr/local/lib/python3.7/site-packages/zarr/convenience.py", line 102, in open
err_path_not_found(path)
File "/usr/local/lib/python3.7/site-packages/zarr/errors.py", line 29, in err_path_not_found
raise ValueError('nothing found at path %r' % path)
ValueError: nothing found at path ''
[pid: 12268|app: 0|req: 2/2] 127.0.0.1 () {40 vars in 517 bytes} [Tue May 11 18:07:30 2021] POST /reset/seg => generated 48 bytes in 120 msecs (HTTP/1.1 500) 2 headers in 90 bytes (1 switches on core 0)
127.0.0.1 - - [11/May/2021:18:07:30 +0000] "POST /reset/seg HTTP/1.1" 500 48 "-" "unirest-java/3.1.00" "-"
It would be nice if this was handled in a way that does not crash the server (within Elephant-client it says now that training is in progress and one cannot do anything).
I will work on it, thanks! If the model file is not found, the ELEPHANT client will show a dialog something like "Model file xxx.pth not found. Would you like to create it?".
When I tried restarting the server I got this error message:
zpath_input: /workspace/datasets/elephant-demo/imgs.zarr ...
It seems that the dataset is missing after restarting. I have not prepared the docs for it but you can make the data persistent by mounting Google Drive.
If the model file is not found, the ELEPHANT client will show a dialog something like "Model file xxx.pth not found. Would you like to create it?".
In which case would I answer this question with "No"? If the answer should always be "Yes, why not just do it?
It seems that the dataset is missing after restarting. I have not prepared the docs for it but you can make the data persistent by mounting Google Drive.
It is already quite tedious to start the server. I think we should avoid any extra step. Could the code be changed such that the data set is not missing?
In which case would I answer this question with "No"? If the answer should always be "Yes, why not just do it?
Although it does not happen very often, there is a possibility that the user may enter an incorrect file name. However, as you mentioned, a workflow that automatically initializes the file if it does not exist would be sufficient.
It is already quite tedious to start the server. I think we should avoid any extra step. Could the code be changed such that the data set is not missing?
I think that this is a problem on Google Colab, not a problem that can be controlled by ELEPHANT's code. If you interrupt the last cell and run it again, the data set should be retained. However, once the connection has been lost, you might need to explicitly run the following cell again. (As far as I can confirm, this is not necessary unless you explicitly run the [Runtime > Factory reset runtime]).
# Set up dirs
!mkdir -p /workspace/models
!mkdir -p /workspace/datasets/elephant-demo
# Download files
!curl -L https://github.com/elephant-track/elephant-server/releases/download/v0.1.0/elephant-demo_seg.pth \
-o /workspace/models/elephant-demo_seg.pth
!curl -L https://zenodo.org/record/4549193/files/elephant-demo.h5?download=1 \
-o /workspace/datasets/elephant-demo/elephant-demo.h5
!curl -L https://zenodo.org/record/4549193/files/elephant-demo.xml?download=1 \
-o /workspace/datasets/elephant-demo/elephant-demo.xml
# Run script
!python /opt/elephant/script/dataset_generator.py \
--uint16 /workspace/datasets/elephant-demo/elephant-demo.h5 /workspace/datasets/elephant-demo
I'm checking the error again. The following error looks a little weird.
ValueError: nothing found at path ''
It implicates that config.zpath_input
is empty.
Could you reproduce the error? It is helpful if you can paste the whole error text.
OK! If the error occurs again I will post the whole message!
However, as you mentioned, a workflow that automatically initializes the file if it does not exist would be sufficient.
I cannot judge all the details here! Whatever you think makes more sense! The most important thing is that it does not crash :)
I think that this is a problem on Google Colab, not a problem that can be controlled by ELEPHANT's code.
That's really funky that Google looses the data in that way, because I would imagine that it's simply just stored on that machine where the code is running. But maybe they have some more fancy setup...
In fact, if that's the case I'd be curious to learn how to host the data on Google Drive. Could you let me know (or add it to the documentation)?
(see title)
Here is the error:
It would be nice if this was handled in a way that does not crash the server (within Elephant-client it says now that training is in progress and one cannot do anything).