use_model
less than a minute
function wandb.use_model
wandb.use_model(name: 'str') → FilePathStr
Download the files logged in a model artifact ’name'.
Args:
name
: (str) A model artifact name. ’name’ must match the name of an existing logged model artifact. May be prefixed with entity/project/. Valid names can be in the following forms: - model_artifact_name:version - model_artifact_name:alias
Examples:
run.use_model(
name="my_model_artifact:latest",
)
run.use_model(
name="my_project/my_model_artifact:v0",
)
run.use_model(
name="my_entity/my_project/my_model_artifact:<digest>",
)
```
Invalid usage ```python
run.use_model(
name="my_entity/my_project/my_model_artifact",
)
```
**Raises:**
- `AssertionError`: if model artifact 'name' is of a type that does not contain the substring 'model'.
**Returns:**
- `path`: (str) path to downloaded model artifact file(s).
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.