Open hchitnen opened 3 months ago
Thanks for reaching out.
Could you run pip list and share the output?
Hi @hchitnen. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
Thanks for reaching out.
Could you run pip list and share the output?
Hi, I am using designer in Azure ML studio to build a pipeline. I am importing all the libraries in a zip folder.
i have followed the steps suggested by an user on stackoverflow. please find attached the screenshot for your reference.
Following the above steps, Here is how I am doing it for my project.
in the above, the "execute python script' has the code that I have shared earlier. And "ocr-v2" is the zip folder that has all the libraries. I have also specifically looked for "SensitiveHeaderCleanupPolicy" and it is included in the libraries. please find attached the screenshot.
Please do let me know in case any further information is needed from my end.
Hi, any update? Please do let me know in case any further information is needed from my end.
@hchitnen do the samples in this link work for you using the same credentials you used above, and latest image analysis client library 1.0.0b2)? https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/vision/azure-ai-vision-imageanalysis/samples
Same for the code your shared in "Get a caption for the image." - does it work for you in a terminal window? (not as uploaded ZIP package to Azure ML studio).
Just want to make sure basic functionality works for you in isolation, before looping in other folks to understand what's unique about your Azure ML package.
I am having the same issue on AzureML Jupyter notebook's default environments. The interesting thing is I can do
from azure.core.pipeline.policies._sensitive_header_cleanup_policy import SensitiveHeaderCleanupPolicy
without any error
but not
from azure.core.pipeline.policies import SensitiveHeaderCleanupPolicy
What worked for me? I pip uninstall every package in the python 3.10 environment. Then switch to python 3.8 environment. pip install all required packages and it works magically. I assume there is some package dependency conflict in AzureML Jupyter notebook's environments. They have a lot of outdated packages there.
That isn't nice. Some libraries need Python 3.10 like Unsloth. It doesn't make any sense that this error has not been fix given the cost of GPU VM.
Hello @dargilco, any update on this? I have a similar issue
I am getting the same error while trying the create a cron-job-schedule using az ml schedule create --file {file_name} --debug --resource-group {rsg_name} --workspace-name {workspace-name}
here is the error:
Traceback (most recent call last): File "/agent/_work/_temp/.azclitask/cliextensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/operations/_operation_orchestrator.py", line 279, in _get_code_asset_arm_id code_asset = self._code_assets.create_or_update(code_asset) # type: ignore[attr-defined] File "/agent/_work/_temp/.azclitask/cliextensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/_telemetry/activity.py", line 288, in wrapper return f(*args, **kwargs) File "/agent/_work/_temp/.azclitask/cliextensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/operations/_code_operations.py", line 212, in create_or_update raise ex File "/agent/_work/_temp/.azclitask/cliextensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/operations/_code_operations.py", line 160, in create_or_update code, _ = _check_and_upload_path( File "/agent/_work/_temp/.azclitask/cliextensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/_artifacts/_artifact_utilities.py", line 502, in _check_and_upload_path uploaded_artifact = _upload_to_datastore( File "/agent/_work/_temp/.azclitask/cliextensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/_artifacts/_artifact_utilities.py", line 387, in _upload_to_datastore artifact = upload_artifact( File "/agent/_work/_temp/.azclitask/cliextensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/_artifacts/_artifact_utilities.py", line 240, in upload_artifact storage_client = get_storage_client(credential=None, storage_account=None, account_url=sas_uri) File "/agent/_work/_temp/.azclitask/cliextensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/_utils/_storage_utils.py", line 177, in get_storage_client return client_builders[storage_type](credential, container_name, account_url) File "/agent/_work/_temp/.azclitask/cliextensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/_utils/_storage_utils.py", line 151, in <lambda> DatastoreType.AZURE_BLOB: lambda credential, container_name, account_url: BlobStorageClient( File "/agent/_work/_temp/.azclitask/cliextensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/_artifacts/_blob_storage_helper.py", line 50, in __init__ self.service_client = BlobServiceClient(account_url=account_url, credential=credential) File "/agent/_work/_temp/.azclitask/cliextensions/ml/azure/storage/blob/_blob_service_client.py", line 141, in __init__ self._client = AzureBlobStorage(self.url, base_url=self.url, pipeline=self._pipeline) File "/agent/_work/_temp/.azclitask/cliextensions/ml/azure/storage/blob/_generated/_azure_blob_storage.py", line 72, in __init__ policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy'
Here are the package versions: azure-cli 2.51.0 *
core 2.51.0 * telemetry 1.1.0
Dependencies: msal 1.24.0b1 azure-mgmt-resource 23.1.0b2
It worked for me by upgarding the version of azure-cli https://github.com/Azure/azure-cli/issues/28649
I deleted the 'SensitiveHeaderCleanupPolicy' class dependency from the package and it worked for me. although, not sure about the ramifications of this action. Worked for my use case.
Describe the bug The above error is throwing up when running the below code. To be specific, this happens when calling the 'ImageAnalysisClient' I have the azure-core 1.30 version (the latest) but still receiving the error.
Code To Reproduce
import pandas as pd import os from azure.ai.vision.imageanalysis import ImageAnalysisClient from azure.ai.vision.imageanalysis.models import VisualFeatures from azure.core.credentials import AzureKeyCredential import numpy as np
def azureml_main(dataframe1 = None, dataframe2 = None):
Get a caption for the image.
Exact Error:
---------- Start of error message from Python interpreter ---------- Got exception when invoking script at line 22 in function azureml_main: 'AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy''. ---------- End of error message from Python interpreter ----------