Skip to content

Commit

Permalink
Update dependency for pf dependences and local import for dependences…
Browse files Browse the repository at this point in the history
… related to pf-azure (#3527)

# 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.
  • Loading branch information
singankit authored Jul 10, 2024
1 parent 6792ed4 commit b982cf0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions src/promptflow-evals/promptflow/evals/evaluate/_eval_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,20 @@
from typing import Any, Dict, Optional, Type
from urllib.parse import urlparse

from azure.storage.blob import BlobServiceClient
from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry

from promptflow.evals._version import VERSION
from promptflow._sdk.entities import Run

from azure.ai.ml.entities._credentials import AccountKeyConfiguration
from azure.ai.ml.entities._datastore.datastore import Datastore

LOGGER = logging.getLogger(__name__)

try:
from azure.storage.blob import BlobServiceClient
from azure.ai.ml.entities._credentials import AccountKeyConfiguration
except ImportError:
LOGGER.debug("promptflow.azure is not installed.")


@dataclasses.dataclass
class RunInfo:
Expand Down Expand Up @@ -382,7 +384,7 @@ def log_artifact(self, artifact_folder: str, artifact_name: str = EVALUATION_ART
if response.status_code != 200:
self._log_warning('register artifact', response)

def _get_datastore_credential(self, datastore: Datastore):
def _get_datastore_credential(self, datastore: 'Datastore'):
# Reference the logic in azure.ai.ml._artifact._artifact_utilities
# https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ml/azure-ai-ml/azure/ai/ml/_artifacts/_artifact_utilities.py#L103
credential = datastore.credentials
Expand Down
6 changes: 3 additions & 3 deletions src/promptflow-evals/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ packages = [
# dependencies
[tool.poetry.dependencies]
python = "<4.0,>=3.8"
promptflow-devkit = "<2.0.0"
promptflow-core = "<2.0.0"
promptflow-devkit = "<2.0.0,>=1.13.0"
promptflow-core = "<2.0.0,>=1.13.0"
aiohttp_retry = ">=2.8.3"
websocket-client = ">=1.2.0"
jsonpath_ng = ">=1.5.0"
urllib3 = ">1.26.17"
numpy = ">=1.22"
promptflow-azure = { version = "<2.0.0", optional = true} # Needed for remote tracking
promptflow-azure = { version = "<2.0.0,>=1.13.0", optional = true} # Needed for remote tracking

[tool.poetry.extras]
azure = [
Expand Down

0 comments on commit b982cf0

Please sign in to comment.