Zenodo
- scarches.zenodo.download_model(download_link: str, save_path: str = './', make_dir: bool = False)[source]
Downloads the zip file of the model in the
link
and saves it insave_path
and extracts.
- scarches.zenodo.upload_model(model: TRVAE | SCVI | SCANVI | TOTALVI | str, deposition_id: str, access_token: str, model_name: str | None = None)[source]
Uploads trained
model
to Zenodo.- Parameters:
model (
TRVAE
,SCVI
,SCANVI
,TOTALVI
, str) – An instance of one of classes defined inscarches.models
module or a path to a saved model.deposition_id (str) – ID of a deposition in your Zenodo account.
access_token (str) – Your Zenodo access token.
model_name (str) – An optional name of the model to upload
- Returns:
download_link – Generated direct download link for the uploaded model in the deposition. Please Note that the link is usable after your published your deposition.
- Return type:
Deposition helpers
- scarches.zenodo.deposition.create_deposition(access_token: str, upload_type: str, title: str, description: str, **kwargs)[source]
Creates a deposition in your Zenodo account.
- scarches.zenodo.deposition.delete_deposition(deposition_id: str, access_token: str)[source]
Deletes the existing deposition with
deposition_id
in your Zenodo account.
- scarches.zenodo.deposition.get_all_deposition_ids(access_token: str)[source]
Gets list of all of deposition IDs existed in your Zenodo account.
- scarches.zenodo.deposition.publish_deposition(deposition_id: str, access_token: str)[source]
Publishes the existing deposition with
deposition_id
in your Zenodo account.- Parameters:
- Returns:
download_link – Generated direct download link for the uploaded model in the deposition. Please Note that the link is usable after your published your deposition.
- Return type:
File Helpers
- scarches.zenodo.file.download_file(link: str, save_path: str | None = None, make_dir: bool = False)[source]
Downloads the file in the
link
and saves it insave_path
.- Parameters:
- Returns:
file_path (str) – Full path with name and extension of downloaded file.
http_response (
HTTPMessage
) –HttpMessage
object containing status code and information about the http request.
- scarches.zenodo.file.upload_file(file_path: str, deposition_id: str, access_token: str)[source]
Downloads the file in the
link
and saves it insave_path
.- Parameters:
- Returns:
file_path (str) – Full path with name and extension of downloaded file.
http_response (
HTTPMessage
) –HttpMessage
object containing status code and information about the http request.