Migrate v1 to v2
Minimum supported versions
Please run the following command to check the minimum supported versions and the latest published versions:
polyaxon version --checkMigrating the CLI/Client
Please make sure to uninstall the previous version of the CLI/Client before installing the new version.
pip uninstall -y polyaxon polyaxon-sdkThen proceed with the upgrade to Polyaxon v2:
pip install -U polyaxonIn Polyaxon v2 most imports are exposed on client, if you have an issue with an import, for example:
from polyaxon.module.submodule import Class or functionPlease update your imports to:
from polyaxon.client import Class or functionIn addition to client schema/model classes can be imported from polyaxon.schemas, for example:
from polyaxon.schemas import SomeSchemaClass
# Or
from polyaxon.client import SomeSchemaClassAll K8s related schemas are exposed under k8s
from polyaxon.k8s import V1ContainerMigrating the platform/agent
Before migrating to Polyaxon v2, please make sure to remove previous deployments and clean up all resources, this will result in a temporary downtime.
kubectl delete deployments -n [NAMESPACE] -l 'app.kubernetes.io/instance=polyaxon-1.20.0,app.kubernetes.io/part-of=polyaxon-core,app.kubernetes.io/managed-by=Helm'Then proceed with the upgrade to Polyaxon v2:
Polyaxon CE
This upgrade comes with an automatic migration that might take some time to execute.
If you have configured the api section in your deployment config file, please note that in the v2 release gateway and api were merged into a single pod gateway.
Please check the Polyaxon platform upgrade section
Polyaxon Agent
If you have configured the streams section in your deployment config file, please note that in the v2 release gateway and streams were merged into a single pod gateway.
Please check the Polyaxon Agent upgrade section
Migration from v1.x to v1.y
Polyaxon CE
You can migrate from any Polyaxon v1.x to any v1.y for any y >= x, there are no breaking changes, and all migrations (if there are any between the versions) are automatic.
Polyaxon Agent
You can migrate from any Polyaxon v1.x to any v1.y for any y and x.
We recommend however to use at least the minimum supported version to benefit from security fixes, and the latest version to benefit from all new enhancements.