From 8a0b1d93f0461ed2b53e6884c176724b7adfb56a Mon Sep 17 00:00:00 2001 From: Han Wang Date: Wed, 27 Mar 2024 16:02:23 +0800 Subject: [PATCH] fix test --- src/promptflow-core/promptflow/_constants.py | 2 +- .../promptflow/azure/operations/_flow_operations.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/promptflow-core/promptflow/_constants.py b/src/promptflow-core/promptflow/_constants.py index ed96bd4b9d0..3b313df7c5f 100644 --- a/src/promptflow-core/promptflow/_constants.py +++ b/src/promptflow-core/promptflow/_constants.py @@ -258,4 +258,4 @@ class ConnectionProviderConfig: CONNECTION_DATA_CLASS_KEY = "DATA_CLASS" -EAGER_FLOW_PUBLIC_NAME = "eager" +FLEX_FLOW_PUBLIC_NAME = "flex" diff --git a/src/promptflow/promptflow/azure/operations/_flow_operations.py b/src/promptflow/promptflow/azure/operations/_flow_operations.py index 92a861900cd..6b34a8a13f3 100644 --- a/src/promptflow/promptflow/azure/operations/_flow_operations.py +++ b/src/promptflow/promptflow/azure/operations/_flow_operations.py @@ -24,7 +24,7 @@ from azure.ai.ml.operations._operation_orchestrator import OperationOrchestrator from azure.core.exceptions import HttpResponseError -from promptflow._constants import EAGER_FLOW_PUBLIC_NAME +from promptflow._constants import FLEX_FLOW_PUBLIC_NAME from promptflow._proxy import ProxyFactory from promptflow._sdk._constants import ( CLIENT_FLOW_TYPE_2_SERVICE_FLOW_TYPE, @@ -209,7 +209,7 @@ def _update_azure_flow(self, flow: Flow, display_name, **kwargs): def _validate_flow_creation_parameters(source, flow_display_name=None, flow_type=None, **kwargs): """Validate the parameters for flow creation operation.""" from promptflow import load_flow as load_local_flow - from promptflow._sdk.entities._eager_flow import EagerFlow + from promptflow._sdk.entities._flow import FlexFlow # validate the source folder logger.info("Validating flow source.") @@ -220,9 +220,9 @@ def _validate_flow_creation_parameters(source, flow_display_name=None, flow_type ) # eager flow is not supported since eager flow don't have cloud authoring experience flow_entity = load_local_flow(source) - if isinstance(flow_entity, EagerFlow): + if isinstance(flow_entity, FlexFlow): raise UserErrorException( - f"Flow source {Path(source).resolve().as_posix()!r}. is {EAGER_FLOW_PUBLIC_NAME} flow. " + f"Flow source {Path(source).resolve().as_posix()!r}. is {FLEX_FLOW_PUBLIC_NAME} flow. " "Creating it to cloud is not supported." )