sdk-python
sdk-python copied to clipboard
Enhancement idea: default to latest model version when running jobs
Checklist
Please review first that the issue is fully related with this SDK by checking the relevant checkboxes ([x]
).
- [x] I have a Modzy API Key active and have the entitlements to perform the desired action.
- [x] I review that have access to Modzy API host.
- [ ] I think that is a error specific to the SDK.
- [x] I review the documentation and existing issues in order to not duplicate existing ones.
- [x] I am willing to follow-up on comments in a timely manner.
Info
- Modzy SDK version: 0.6.0
- Python version: 3.9.7
- Operating System: Windows
Description
When submitting a job to any model, one of the parameters is the model version. There are ways to extract the latest version programmatically, but it would be great if the SDK defaulted to the latest version in the case a version is not supplied.
Steps to reproduce
You can get the latest model version this way in the SDK:
for model in models:
model_info = client.models.get(models[model]['id'])
if models[model].get('version', None) == None: #let set a version explicitly above
models[model]['version'] = model_info.latestActiveVersion
models[model]['name'] = model_info.name
Expected results: Default latest version extracted by SDK automatically if user does not pass version through
Actual results: Requires manual work on user currently