Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.63k stars 2.84k forks source link

Deprecation Warnings when using evaluate #32279

Open pamelafox opened 1 year ago

pamelafox commented 1 year ago

Describe the bug

When using evaluate(), I get these deprecation warnings:

../../home/vscode/.local/lib/python3.11/site-packages/azure/ai/ml/_schema/core/fields.py:424
../../home/vscode/.local/lib/python3.11/site-packages/azure/ai/ml/_schema/core/fields.py:424
  /home/vscode/.local/lib/python3.11/site-packages/azure/ai/ml/_schema/core/fields.py:424: RemovedInMarshmallow4Warning: Passing field metadata as keyword arguments is deprecated. Use the explicit `metadata=...` argument instead. Additional metadata: {'unknown': 'include'}
    super().__init__(**kwargs)

../../home/vscode/.local/lib/python3.11/site-packages/azure/ai/ml/_schema/assets/package/model_package.py:22
  /home/vscode/.local/lib/python3.11/site-packages/azure/ai/ml/_schema/assets/package/model_package.py:22: RemovedInMarshmallow4Warning: The 'default' argument to fields is deprecated. Use 'dump_default' instead.
    target_environment_name = fields.Str(required=True, default="packaged-env")

../../home/vscode/.local/lib/python3.11/site-packages/azure/ai/ml/_schema/monitoring/compute.py:12
  /home/vscode/.local/lib/python3.11/site-packages/azure/ai/ml/_schema/monitoring/compute.py:12: RemovedInMarshmallow4Warning: Passing field metadata as keyword arguments is deprecated. Use the explicit `metadata=...` argument instead. Additional metadata: {'allowed_values': ['ServerlessSpark']}
    compute_type = fields.Str(allowed_values=["ServerlessSpark"])

To Reproduce

This code should produce the same warnings:

https://github.com/Azure/aistudio-chat-demo/blob/main/src/langchain/langchain_qna.ipynb

Expected behavior

No warnings

github-actions[bot] commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github @Azure/azure-ml-sdk.

luigiw commented 1 year ago

The azure-ai-ml package needs to update its dependency on marshmallow. Thx for reporting this issue. We'll address this in the sprint of November.

timvink commented 2 months ago

These deprecation warnings are still present:

../../../../anaconda/envs/ds_ditto/lib/python3.10/site-packages/azure/ai/ml/_schema/assets/index.py:17
  /anaconda/envs/ds_ditto/lib/python3.10/site-packages/azure/ai/ml/_schema/assets/index.py:17: RemovedInMarshmallow4Warning: The 'default' argument to fields is deprecated. Use 'dump_default' instead.
    stage = fields.Str(default="Development")

../../../../anaconda/envs/ds_ditto/lib/python3.10/site-packages/azure/ai/ml/_schema/core/fields.py:434
../../../../anaconda/envs/ds_ditto/lib/python3.10/site-packages/azure/ai/ml/_schema/core/fields.py:434
  /anaconda/envs/ds_ditto/lib/python3.10/site-packages/azure/ai/ml/_schema/core/fields.py:434: RemovedInMarshmallow4Warning: Passing field metadata as keyword arguments is deprecated. Use the explicit `metadata=...` argument instead. Additional metadata: {'unknown': 'include'}
    super().__init__(**kwargs)

../../../../anaconda/envs/ds_ditto/lib/python3.10/site-packages/azure/ai/ml/_schema/monitoring/compute.py:12
  /anaconda/envs/ds_ditto/lib/python3.10/site-packages/azure/ai/ml/_schema/monitoring/compute.py:12: RemovedInMarshmallow4Warning: Passing field metadata as keyword arguments is deprecated. Use the explicit `metadata=...` argument instead. Additional metadata: {'allowed_values': ['ServerlessSpark']}
    compute_type = fields.Str(allowed_values=["ServerlessSpark"])