@Mateusz Macias Thanks for the question. Can you please try Installing azure-identity>=1.8.0.
Failed to test real-time endpoint request() got an unexpected keyword argument 'tenant_id'
Hi all,
after deployment of real time endpoint I try to test it by pinging. For now my run is minimal and looks like this:
def run(raw_data):
"""
This function is called for every invocation of the endpoint to perform the actual scoring/prediction.
In the example we extract the data from the json input and call the scikit-learn model's predict()
method and return the result back
"""
logging.info("Request received")
KVUri = f"<<endpoint url here>>"
credential = ManagedIdentityCredential()
client = SecretClient(vault_url=KVUri, credential=credential)
retrieved_secret = client.get_secret("test-secret")
logging.info("Request processed")
return [retrieved_secret]
After pinging I just get an error:
Failed to test real-time endpoint
request() got an unexpected keyword argument 'tenant_id'
Somebody mentioned that this might be something that was fixed in later verisions of azure identity library. My conda currently looks like this:
name: model-env
channels:
- conda-forge
dependencies:
- python=3.7
- numpy=1.21.2
- pip=21.2.4
- scikit-learn=0.24.2
- scipy=1.7.1
- pip:
- azureml-defaults==1.39.0
- inference-schema[numpy-support]==1.3.0
- joblib==1.0.1
- azure-identity
- azure-keyvault-secrets
Unfortunately, getting never azure-identity seems to require newer python. Unfortunately - I did not manage to make an endpoint even deploy with python 3.8/3.9.
Does anybody have a suggestion on how to fix it?