Closed appukuttan-shailesh closed 4 years ago
instance_to_zip = model_info['instances'][0]['source']
needs to be updated to something like:
instance_to_zip = next((inst["source"] for inst in model_info['instances'] if inst["version"] == "2.0"), None)
Hi Shailesh, I was having a look and I don't find the ModelCatalog class where I can pass directly the token. I was planing to use the refresh token to get the access one as discussed on Monday meeting. Do you know if I can do this?
Ah ok I thought I was obliged to use the package but I was able to retrieve using the Rest API.
Hi guys, I've been doing the changes and I would like to have confirmation regarding the new models that will be available on the BSP Use Cases. Please have a look at the results json and check if all the models that you want are there and contain the correct information:
@antonelepfl : Yes, you can use either the Python client, or the REST APIs directly. If using the former (for package version >= 0.5.23), you can pass the token via:
from hbp_validation_framework import ModelCatalog
mc = ModelCatalog(token="<token>")
Note: the token can be either from Collab v1 or v2. For v2, you should use the access_token
, and not the refresh_token
.
For both v1 and v2 you need the access token.
Yeah I'm going to use the Rest API as I mentioned and I was able to get the models that I posted on the JSON files above
We need to wait for @clupascu to push the new use cases to PROD before changing the models. For @lbologna The models works correctly. @SteMasoli Do you need to make some change on your use cases or this new queries will work for the current use cases?
@antonelepfl it seems that Py3 versions of my usecases were pushed to PROD, so now the change of the models is necessary for me. Can you please change them? The usecases in PROD do not work without this change.
Ok. @clupascu Can you confirm that this is the correct list? https://github.com/antonelepfl/usecases/commit/34074d05ef2deb4e16ce34e07fe96631531a8bb9
yes. It is the correct list.
So they should be in PROD.
PR to change plan in progress https://github.com/antonelepfl/usecases/pull/326
@antonelepfl : We might need to update the script here: https://github.com/antonelepfl/usecases/blob/dev/src/assets/config_files/create_singlecellmodeling_structure.py for two reasons: 1) retrieving data (via GET) from the KG backend requires authentication solution:
The token gets saved in
mc.auth
Note: no authentication info required if run inside a Collab Jupyter notebook
2) the query for returning Hippocampus models currently retrieves models not appropriate for the usecases. solution: Change the query from:
'hippocampus_models.json': '?brain_region=hippocampus&organization=HBP-SP6&model_scope=single%20cell&species=Rattus%20norvegicus'
to'hippocampus_models.json': '?brain_region=hippocampus&organization=HBP-SP6&model_scope=single%20cell&species=Rattus%20norvegicus&collab_id=12027'
Note: this is also in accordance with out earlier discussion here.