Open IliasAarab opened 4 months ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.
Hi @IliasAarab, thank you for opening an issue. Proxy and pipeline configuration can be set in SDK clients through the mechanisms described in our Core client library developer reference documentation.
For proxies specifically, you can either use the HTTP_PROXY
and HTTPS_PROXY
environment variables or pass a azure.core.pipeline.policies.ProxyPolicy
instance to your client constructor in a proxy_policy
keyword argument.
Hi @IliasAarab. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.
@mccoyp thank you for the guidance! I'm still having an issue when trying to initialize an MLClient
instance when passing a credential object to the constructor:
from azure.ai.ml import MLClient
from azure.identity import InteractiveBrowserCredential
from azure.core.pipeline.policies import ProxyPolicy
proxies = {"http": "myproxy", "https": "myproxy"}
proxy_policy = ProxyPolicy()
proxy_policy.proxies = proxies
credential = InteractiveBrowserCredential()
client = MLClient.from_config(
credential=credential,
proxy_policy=proxy_policy
)
client.compute.get("is-cpu")
InteractiveBrowserCredential.get_token failed: Authentication failed: <urllib3.connection.HTTPSConnection object at 0x000001F13531D810>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed
ClientAuthenticationError: Authentication failed: <urllib3.connection.HTTPSConnection object at 0x000001F13531D810>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed
Everything works fine when I set my proxies as global env variables. (but that's not a viable option for all use cases).
When I first set global env variables for the initial interactive authentication, and then continue work with the client (having passed proxy_policy) with global env variables deleted, everything still works fine. So the current problem resides with the initial auth.
Also, wondering how to pass requests_ca_bundle
to the ProxyPolicy or to disable ssl verification (e.g., verify=False
.
/unresolve
@IliasAarab thank you for the information. @xiangyan99, would you be able to take a look?
Hi @xiangyan99, any updates on this ?
Could you help to clarify your request?
In your case, it failed because InteractiveBrowserCredential
does not support proxy.
Do you ask to add proxy support for InteractiveBrowserCredential
?
Hi @IliasAarab. 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.
@xiangyan99 yes I guess that's what it boils down to. Or alternatively, whether there is another Credential
object similar to InteractiveBrowserCredential
that supports proxies? Otherwise, I am confused as what the added value is of the proxy_policy
arg into MLClient
as the client also needs a Credential
instance.
@xiangyan99 let me know if there is an update please.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.
Please let me know if there is any update, or a decision on some course of action.
Is it possible to add proxy/ssl config to the
MLClient
?