Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change pf-tools to only depend on pf-core #2841

Closed
wants to merge 18 commits into from

Conversation

chenslucky
Copy link
Contributor

@chenslucky chenslucky commented Apr 17, 2024

Description

This PR contains:

  • Task 3066832: Change pf root namespace to existing substitutes in pf-core
  • Task 3066836: Remove pf-azure/pf-devkit dependency for AOAI-GPTV tool and new LLM tool
  • Task 3066837: Remove pf-devkit dependency (get_workspace_triad_from_local) by using common error message for vision model used in llm

Test image: promptflow.azurecr.io/promptflow-runtime:pr-1344775-v4

Exp link: https://ml.azure.com/prompts/flow/cfa1c054-13cb-4cfc-b3a6-359bf0493da9/d44ab050-7de4-4e8e-9adc-196cfceb706d/details?wsid=/subscriptions/96aede12-2f73-41cb-b983-6d11a904839b/resourceGroups/chesi-eastus/providers/Microsoft.MachineLearningServices/workspaces/chesi-promptflow&flight=pfnewllm,pfflowleveltool&tid=72f988bf-86f1-41af-91ab-2d7cd011db47
include tools:

  • old/new llm
  • old/new llm-vision
  • embedding
  • content safety

get instance tests: old llm-vision uses dynamic list and uses "get_instance.get" to get connection obj, then selects the correct deployment name.
image

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.
  • Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: 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.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@chenslucky chenslucky requested a review from a team as a code owner April 17, 2024 06:08
@github-actions github-actions bot added the promptflow-tools promptflow tools code label Apr 17, 2024
@chenslucky chenslucky changed the title remove pf depending Depending on pf-core only for pf-tools Apr 23, 2024
@chenslucky chenslucky changed the title Depending on pf-core only for pf-tools Change pf-tools to only depend on pf-core Apr 23, 2024
# Avoid circular dependencies: Use import 'from promptflow._internal' instead of 'from promptflow'
# since the code here is in promptflow namespace as well
from promptflow._internal import enable_cache, ToolProvider, tool, register_apis
from promptflow._core.cache_manager import enable_cache
Copy link
Contributor

@chjinche chjinche May 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please avoid using import path startswith _, replace them with public methods.

try:
# Do not support dynamic list if azure packages are not installed.
from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient
from promptflow.azure.operations._arm_connection_operations import \
ArmConnectionOperations, OpenURLFailedUserError
from promptflow.core._errors import OpenURLFailedUserError
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please confirm if there are public import ways

Copy link

Hi, thank you for your interest in helping to improve the prompt flow experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment.

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue/pull request label May 22, 2024
Copy link

Hi, thank you for your contribution. Since there has not been recent engagement, we are going to close this out. Feel free to reopen if you'd like to continue working on these changes. Please be sure to remove the no-recent-activity label; otherwise, this is likely to be closed again with the next cleanup pass.

@github-actions github-actions bot closed this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-recent-activity There has been no recent activity on this issue/pull request promptflow-tools promptflow tools code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants