def edit(self, mr: ModelPackaging) -> ModelPackaging: """ Edit Model Packaging :param mr: Model Packaging :return Message from API server """ return ModelPackaging.from_dict( self.query(MODEL_PACKING_URL, action='PUT', payload=mr.to_dict()))
async def create(self, mr: ModelPackaging) -> ModelPackaging: """ Create Model Packaging :param mr: Model Packaging :return Message from API server """ return ModelPackaging.from_dict(await self.query(MODEL_PACKING_URL, action='POST', payload=mr.to_dict()))
def get_all(self) -> List[ModelPackaging]: """ Get all Model Packagings from API server :return: all Model Packagings """ return [ ModelPackaging.from_dict(mr) for mr in self.query(MODEL_PACKING_URL) ]
def get(self, name: str) -> ModelPackaging: """ Get Model Packaging from API server :param name: Model Packaging name :type name: str :return: Model Packaging """ return ModelPackaging.from_dict( self.query(f'{MODEL_PACKING_URL}/{name}'))
hyper_parameters={"alpha": "1.0"}, data=[ DataBindingDir(conn_name='wine', local_path='mlflow/sklearn/wine/wine-quality.csv'), ], resources=ResourceRequirements(requests=ResourceList(cpu="2024m", memory="2024Mi"), limits=ResourceList(cpu="2024m", memory="2024Mi")), vcs_name="odahu-flow-examples"), ) packaging_id = "airlfow-wine" packaging = ModelPackaging( id=packaging_id, spec=ModelPackagingSpec( targets=[Target(name="docker-push", connection_name="docker-ci")], integration_name="docker-rest"), ) deployment_id = "airlfow-wine" deployment = ModelDeployment( id=deployment_id, spec=ModelDeploymentSpec(min_replicas=1, ), ) model_example_request = { "columns": [ "alcohol", "chlorides", "citric acid", "density", "fixed acidity", "free sulfur dioxide", "pH", "residual sugar", "sulphates", "total sulfur dioxide", "volatile acidity" ],
ToolchainIntegrationClient(), ToolchainIntegration( id=ENTITY_ID, spec=ToolchainIntegrationSpec( default_image="mock-image", entrypoint="default-entrypoint", ), ), toolchain_integration.toolchain_integration, 'ToolchainIntegration', ) PACKAGING = EntityTestData( ModelPackagingClient(), ModelPackaging(id=ENTITY_ID, spec=ModelPackagingSpec(artifact_name='test-artifact-name', integration_name='test'), status=ModelPackagingStatus(state=SUCCEEDED_STATE, )), packaging.packaging, 'ModelPackaging', ) PACKAGING_INTEGRATION = EntityTestData( PackagingIntegrationClient(), PackagingIntegration( id=ENTITY_ID, spec=PackagingIntegrationSpec(default_image="odahu:image", entrypoint="some_entrypoint"), ), packaging_integration.packaging_integration, 'PackagingIntegration', )