New UbiOps features April 2023

UbiOps release news – version 2.23.0

On the 20th of April 2023 we have released new functionality and made improvements to our UbiOps SaaS product. An overview of the changes is given below.

Python client library version for this release: 3.15.0

CLI version for this release: 2.15.0

✔️Support for Training (Beta)

We added new functionality to help you with training machine learning models on UbiOps. We added a workflow where you can now easily create new experiments and training runs, utilizing our on-demand CPU and GPU resources. We also added bigger instance types to accommodate these most likely memory intensive training runs. See the documentation on training for all the details and some examples.

Please note that this functionality is still in beta so some functionality might still be a bit limited. If you have any feedback, we would be grateful if you could share it with us!

✔️Local testing utility functions

We added some helpful utility functions to the UbiOps Python Client Library and CLI that allow you to test your deployments locally before pushing them to UbiOps. This way you can already debug your deployment code without needing to wait for your deployment to be build. In addition, we also added some minor functions that can be useful if you’re creating deployments with the Client Library or CLI. Below you can find a code snippet with some examples of the newly added functions.

from ubiops import utils

# Below is an example for running a deployment locally with the run_local function
# Simply prepare your request data in a dictionary, and pass it to the function
# along with the path to your deployment package
request_data = {"input": 123}
result = utils.run_local("deployment_package", request_data)

print("Result:")
print(result)

# You can also validate your requirements.txt file or a ubiops.yaml to make sure
# it's formatted correctly
requirements_file_name = "requirements.txt"
return_value = utils.validate_requirements_file(file_path=requirements_file_name)
print("Return value of requirements validation:", return_value)

file_path = "ubiops.yaml"
return_value = utils.validate_yaml_file(file_path=file_path)
print("Return value of yaml validation", return_value)

We also added a wait_for_deployment_version function, that waits for a deployment version to become available. This can come in handy when you’re creating a deployment version through code and you want to send a request to it once it’s ready. With this function you will no longer need to poll the status of the deployment version yourself.

import ubiops

configuration = ubiops.Configuration()

# Configure API token authorization
configuration.api_key['Authorization'] = "Token <YOUR_API_TOKEN>"

api_client = ubiops.ApiClient(configuration)
core_api = ubiops.CoreApi(api_client)

project_name = "project"
deployment_name = "deployment"
version = 'version'

# Create a deployment, version and revision
version_template = ubiops.DeploymentVersionCreate(version=version)
core_api.deployment_versions_create(project_name, deployment_name, data=version_template)
response = core_api.revisions_file_upload(project_name, deployment_name, version, file='deployment.zip')
print("Upload response is:", response)

# Wait for the deployment version to be available
ubiops.utils.wait_for_deployment_version(api_client, project_name, deployment_name, version, revision_id=response.revision)
print("Deployment version is available")

✔️CPU and GPU utilization info

We got the feedback that it would be nice to get more insights into CPU and GPU utilization of deployments. Therefore we now added CPU and GPU utilization information to the logs of every request.

✔️Support for additional data types

We have added support for dictionary and array of files in input and output definition to offer more flexibility in using UbiOps.

✔️Changes to code environments

With this release we made some changes to how environments work in UbiOps. For now these changes are mostly under the hood and for experiment creation. You can still create deployments in the same way as you’re used to, with a deployment package containing dependency information and code.

✔️Old client library incompatibility warning

The deployment version create/get/list/update functions of Client Library version < 3.6.0 and CLI version < 2.6.1 will no longer work after this release. If you are using these functions with these old client library and CLI versions for UbiOps Saas, please upgrade to a newer version.

Do you need more information? Head over to our documentation, or schedule a call with us. 

Latest news

Turn your AI & ML models into powerful services with UbiOps