Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
D-W- committed Mar 27, 2024
1 parent ec949fe commit 8a0b1d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/promptflow-core/promptflow/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,4 @@ class ConnectionProviderConfig:

CONNECTION_DATA_CLASS_KEY = "DATA_CLASS"

EAGER_FLOW_PUBLIC_NAME = "eager"
FLEX_FLOW_PUBLIC_NAME = "flex"
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.")
Expand All @@ -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."
)

Expand Down

0 comments on commit 8a0b1d9

Please sign in to comment.