Global -> AWS Handlers
AWS API
- tardis_em.utils.aws.get_benchmark_aws() dict
Retrieve the best benchmarking score for a given NN type
- Returns:
Dictionary with keys[network name] and values[list of scores]
- Return type:
dict
- tardis_em.utils.aws.put_benchmark_aws(data: dict, network: str | None = '', model=None) bool
Upload new or update dictionary stored on S3
- Parameters:
data (dict) – Dictionary with network the best metrics
network (Optional, str) – Benchmarking network name [e.g., fnet_32_microtubules_id].
model (Optional, str) – Optional dictionary to model.
- Returns:
True if save correctly
- Return type:
bool
- tardis_em.utils.aws.get_all_version_aws(network: str, subtype: str, model: str)
- tardis_em.utils.aws.get_model_aws(https: str)
- tardis_em.utils.aws.get_weights_aws(network: str, subtype: str, model: str | None = None, version: int | None = None)
Module to download pre-train weights from S3 AWS bucket.
Model weight stored on S3 bucket with the naming convention network_subtype/model/model_weights.pth References.: - fnet_32/microtubules_3d/V_XX/model_weights.pth - dist_triang/microtubules_3d/V_XX/model_weights.pth
Weights are stored in ~/.tardis_em with the same convention and .txt file with file header information to identified update status for local file if the network connection can be established.
- Parameters:
network (str) – Type of network for which weights are requested.
subtype (str) – Sub-name of the network or sub-parameter for the network.
model (str) – Additional dataset name used for the DIST.
version (int) – Version of the model, be defaults we fetch the newest model
- tardis_em.utils.aws.aws_check_with_temp(model_name: list) bool
Module to check aws up-to data status.
Quick check if the local file exists and is up-to data with aws server.
- Parameters:
model_name (list) – Name of the NN model.
- Returns:
If True, the local file is up to date.
- Return type:
bool
- tardis_em.utils.aws.aws_check_pkg_with_temp() bool
Module to check aws up-to data status for OTA-Update.
Quick check if the local pkg file exists and is up-to data with aws server.
- Returns:
If True, the local file is up to date.
- Return type:
bool
Over-the-Air Update API
- tardis_em.utils.ota_update.ota_update(status=False)
- tardis_em.utils.ota_update.main()