Skip to content

Commit

Permalink
[SDK/CLI] Update portal link to remove flight (#388)
Browse files Browse the repository at this point in the history
# Description

Remove flights since now it's not needed after UI new release.

# All Promptflow Contribution checklist:
- [x] **The pull request does not introduce [breaking changes]**
- [ ] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [x] **I have read the [contribution guidelines](../CONTRIBUTING.md).**

## General Guidelines and Best Practices
- [x] 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.

---------

Co-authored-by: Zhengfei Wang <[email protected]>
  • Loading branch information
0mza987 and zhengfeiwang authored Sep 14, 2023
1 parent 8ac2224 commit 0100090
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/promptflow/promptflow/_sdk/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,7 @@ def get_list_view_type(archived_only: bool, include_archived: bool) -> ListViewT
VIS_PORTAL_URL_TMPL = (
"https://ml.azure.com/prompts/flow/bulkrun/runs/outputs"
"?wsid=/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}"
"/providers/Microsoft.MachineLearningServices/workspaces/{workspace_name}"
"&flight=promptfilestorage,PFPackageTools,PFRunList,PromptBatchRunDesignV2,PFSourceRun"
"&runId={names}"
"/providers/Microsoft.MachineLearningServices/workspaces/{workspace_name}&runId={names}"
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,7 @@ def _run_history_endpoint_url(self):

def _get_run_portal_url(self, run_id: str):
"""Get the portal url for the run."""
url = (
f"https://ml.azure.com/prompts/flow/bulkrun/run/{run_id}/details?wsid="
f"{self._common_azure_url_pattern}&flight=promptfilestorage,PFSourceRun=false"
)
url = f"https://ml.azure.com/prompts/flow/bulkrun/run/{run_id}/details?wsid={self._common_azure_url_pattern}"
return url

def _get_input_portal_url_from_input_uri(self, input_uri):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ def test_show_run(self, remote_client):
"start_time": "2023-08-08T07:32:56.637761+00:00",
"end_time": "2023-08-08T07:33:07.853922+00:00",
"duration": "00:00:11.2161606",
"portal_url": "https://ml.azure.com/prompts/flow/bulkrun/run/classification_accuracy_eval_default_20230808_153241_422491/details?wsid=/subscriptions/96aede12-2f73-41cb-b983-6d11a904839b/resourceGroups/promptflow/providers/Microsoft.MachineLearningServices/workspaces/promptflow-eastus&flight=promptfilestorage,PFSourceRun=false", # noqa: E501
"portal_url": "https://ml.azure.com/prompts/flow/bulkrun/run/classification_accuracy_eval_default_20230808_153241_422491/details?wsid=/subscriptions/96aede12-2f73-41cb-b983-6d11a904839b/resourceGroups/promptflow/providers/Microsoft.MachineLearningServices/workspaces/promptflow-eastus", # noqa: E501
"data": "azureml://datastores/workspaceblobstore/paths/LocalUpload/312cca2af474e5f895013392b6b38f45/data.jsonl", # noqa: E501
"data_portal_url": "https://ml.azure.com/data/datastore/workspaceblobstore/edit?wsid=/subscriptions/96aede12-2f73-41cb-b983-6d11a904839b/resourceGroups/promptflow/providers/Microsoft.MachineLearningServices/workspaces/promptflow-eastus&activeFilePath=LocalUpload/312cca2af474e5f895013392b6b38f45/data.jsonl#browseTab", # noqa: E501
"output": "azureml://locations/eastus/workspaces/3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/data/azureml_classification_accuracy_eval_default_20230808_153241_422491_output_data_flow_outputs/versions/1", # noqa: E501
"output_portal_url": "https://ml.azure.com/data/azureml_classification_accuracy_eval_default_20230808_153241_422491_output_data_flow_outputs/1/details?wsid=/subscriptions/96aede12-2f73-41cb-b983-6d11a904839b/resourceGroups/promptflow/providers/Microsoft.MachineLearningServices/workspaces/promptflow-eastus", # noqa: E501
"run": "web_classification_default_20230804_143634_056856",
"input_run_portal_url": "https://ml.azure.com/prompts/flow/bulkrun/run/web_classification_default_20230804_143634_056856/details?wsid=/subscriptions/96aede12-2f73-41cb-b983-6d11a904839b/resourceGroups/promptflow/providers/Microsoft.MachineLearningServices/workspaces/promptflow-eastus&flight=promptfilestorage,PFSourceRun=false", # noqa: E501
"input_run_portal_url": "https://ml.azure.com/prompts/flow/bulkrun/run/web_classification_default_20230804_143634_056856/details?wsid=/subscriptions/96aede12-2f73-41cb-b983-6d11a904839b/resourceGroups/promptflow/providers/Microsoft.MachineLearningServices/workspaces/promptflow-eastus", # noqa: E501
}

def test_show_run_details(self, remote_client):
Expand Down

0 comments on commit 0100090

Please sign in to comment.