Skip to content

Commit

Permalink
Fix relative promptflow-core import from sdk (#2510)
Browse files Browse the repository at this point in the history
# Description

Please add an informative description that covers that changes made by
the pull request and link all relevant issues.

# All Promptflow Contribution checklist:
- [ ] **The pull request does not introduce [breaking changes].**
- [ ] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [ ] **I have read the [contribution guidelines](../CONTRIBUTING.md).**
- [ ] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#suggested-workflow).**

## General Guidelines and Best Practices
- [ ] Title of the pull request is clear and informative.
- [ ] There are a small number of commits, each of which have an
informative message. This means that previously merged commits do not
appear in the history of the PR. For more information on cleaning up the
commits in your PR, [see this
page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.

Signed-off-by: Brynn Yin <biyi@microsoft.com>
  • Loading branch information
brynn-code authored Mar 27, 2024
1 parent e6ffeb0 commit 53169af
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
7 changes: 4 additions & 3 deletions src/promptflow/promptflow/_sdk/_load_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@

from dotenv import dotenv_values

from .._utils.logger_utils import get_cli_sdk_logger
from .._utils.yaml_utils import load_yaml
from ..exceptions import UserErrorException
from promptflow._utils.logger_utils import get_cli_sdk_logger
from promptflow._utils.yaml_utils import load_yaml
from promptflow.exceptions import UserErrorException

from ._errors import MultipleExperimentTemplateError, NoExperimentTemplateError
from .entities import Run
from .entities._connection import CustomConnection, _Connection
Expand Down
9 changes: 5 additions & 4 deletions src/promptflow/promptflow/_sdk/_pf_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
from pathlib import Path
from typing import Any, Dict, List, Union

from .._constants import USER_AGENT_OVERRIDE_KEY, ConnectionProviderConfig
from .._utils.logger_utils import get_cli_sdk_logger
from .._utils.user_agent_utils import ClientUserAgentUtil, setup_user_agent_to_operation_context
from ..exceptions import ErrorTarget, UserErrorException
from promptflow._constants import USER_AGENT_OVERRIDE_KEY, ConnectionProviderConfig
from promptflow._utils.logger_utils import get_cli_sdk_logger
from promptflow._utils.user_agent_utils import ClientUserAgentUtil, setup_user_agent_to_operation_context
from promptflow.exceptions import ErrorTarget, UserErrorException

from ._configuration import Configuration
from ._constants import MAX_SHOW_DETAILS_RESULTS
from ._load_functions import load_flow
Expand Down
4 changes: 2 additions & 2 deletions src/promptflow/promptflow/contracts/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
from pathlib import Path
from typing import Any, Dict, List, Optional

from promptflow._constants import LANGUAGE_KEY, FlowLanguage, MessageFormatType
from promptflow._utils.utils import _match_reference, _sanitize_python_variable_name, try_import
from promptflow._utils.yaml_utils import load_yaml
from promptflow.contracts._errors import FlowDefinitionError
from promptflow.exceptions import ErrorTarget
from promptflow.tracing._utils import serialize

from .._constants import LANGUAGE_KEY, FlowLanguage, MessageFormatType
from .._sdk._constants import DEFAULT_ENCODING
from .._utils.utils import _match_reference, _sanitize_python_variable_name, try_import
from ._errors import FailedToImportModule
from .tool import ConnectionType, Tool, ToolType, ValueType

Expand Down

0 comments on commit 53169af

Please sign in to comment.