You can use the frogml.get_model_info()
function to retrieve information about a specific model version without downloading the full model files.
import frogml # Download model version frogml.files.get_model_info( repository="<REPOSITORY_KEY>", # The name of the JFrog repository you want to download the model from namespace="<NAMESPACE_NAME>", # Optional. The name of the namespace or organization: use this parameter to group models by project or group. model_name="<MODEL_NAME>", # The name of the model you want to download. version="<MODEL_VERSION>", # The version of the model you want to download. )
Note
Make sure to replace the placeholders in bold with your own JFrog repository key, namespace name, model name, and version.
Parameters
Parameter | Description | Example |
---|---|---|
<REPOSITORY_KEY> | The name of the JFrog repository you want to download the model from. |
|
<NAMESPACE_NAME> | (Optional) The name of the namespace or organization: use this parameter to group models by project or group. |
|
<MODEL_NAME> | The name of the model you want to download. |
|
<MODEL_VERSION> | The version of the model you want to download. |
|
Example
import frogml # Download model version frogml.files.get_model_info( repository="frog-ml-local", namespace="frog-ml-beta", #optional model_name="my-cool-model", version="1.0.0", )
Return Values
Key | Description | Example |
---|---|---|
model_format | Details about the stored model such as framework, framework_version, runtime environment and serialization format. | {'framework': 'files', 'framework_version': ", 'runtime': 'python', 'runtime_version': '3.9.6', 'serialization_format': 'pkl'} |
model_artifacts | List of objects with details about the model artifact files. | [{“artifact_path”: “<artifactory_path>”, “checksum”: “<file_checksum>”, “download_path”:”<download_url>”}] |
dependency_artifacts | List of objects with details about the attached dependencies and requirement files. | [{“artifact_path”: “<artifactory_path>”, “checksum”: “<file_checksum>”, “download_path”:”<download_url>”}] |
code_artifacts | List of objects with details about the attached code files | [{“artifact_path”: “<artifactory_path>”, “checksum”: “<file_checksum>”, “download_path”:”<download_url>”}] |
created_date | Creation date in ISO 8601 format. | e.g. 2024-11-12T13:25:53.20 |