Closed r0f1 closed 3 years ago
That looks likely. You could check under /lab/data/.cytokit/cache
to see if an empty h5 file was downloaded. I don't know why that happens sometimes but it does, e.g. https://github.com/hammerlab/cytokit/issues/21.
If you delete the file or all of cache
and run it again, that usually does it.
Unfortunately, it is still not working. I copied the following code in the Jupyter cell above:
def _save_response_content(response, destination):
chunk_size = 32768
with open(destination, "wb") as f:
for chunk in response.iter_content(chunk_size):
if chunk: # filter out keep-alive new chunks
f.write(chunk)
def _get_confirm_token(response):
for key, value in response.cookies.items():
if key.startswith('download_warning'):
return value
return None
import requests
path = "./test.h5"
url = "https://docs.google.com/uc?export=download"
session = requests.Session()
response = session.get(url, params={'id': "1I9j4oABbcV8EnvO_ufACXP9e4KyfHMtE"}, stream=True)
token = _get_confirm_token(response)
if token:
params = {'id': "1I9j4oABbcV8EnvO_ufACXP9e4KyfHMtE", 'confirm': token}
response = session.get(url, params=params, stream=True)
_save_response_content(response, path)
And then calculated the checksum and the filesize:
!md5sum ./*.h5
!ls -halt ./*.h5
b6cd7e93bc7a96c2dc33f819aa3ac651 ./test.h5
-rw-r--r-- 1 root root 141 Apr 20 13:52 ./test.h5
These match exactly with the file located at /lab/data/.cytokit/cache/cytometry/model/unet_v2_weights.h5
.
However, I have the suspicion that both .h5 files are corrupted or empty. 141 bytes for all the weights of the unet seems a little too small. Could it be that the original file in Google Drive is no longer available?
Could it be that the original file in Google Drive is no longer available?
Hmm looks like that's the case. Sadly I think the only way to get them back would be to submit an issue to CellProfiler-plugins. That code to get the weights is roughly from https://github.com/CellProfiler/CellProfiler-plugins/blob/0a63e2dc71dc6a99b6112c3be70f8c2dc9301d2a/CellProfiler4_AutoConvert/classifypixelsunet.py#L149-L151. They could probably tell you where it was moved to.
Thanks, I raised an issue over there. They are working on it. Therefore I am closing this issue :)
Nice, I subscribed to https://github.com/CellProfiler/CellProfiler-plugins/issues/121 and will try to update it here depending on the solution.
I started the docker image, and I am trying to execute the example notebook
marker_profiling_example.ipynb
. I get an error in the 8th cell. My guess is that the h5 file is not correctly downloaded in the back.Error message:
Any ideas to solve that?