Azure / Azure/azure-sdk-for-python

mldesigner (AML Python SDK V2) Violates Python Typing Spec

Aperta
#39,098 1 commento 0 reazioni 1 assegnatario Rivendicata da @kshitij-microsoft Vedi su GitHub
Client customer-reported feature-request Machine Learning needs-team-attention Service Attention
Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
2g 2h
PR unite (30g)
202

Descrizione

The AML Python SDK hijacks type-hints to decorate AML component inputs and outputs, but this violates the typing spec. Thus, IDEs give correct warnings.

See examples in the AML [documentation here](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-create-component-pipeline-python?view=azureml-api-2#define-component-using-python-function).

See [discussion of same issue](https://github.com/microsoft/pylance-release/issues/5457) with Blender.

![Image](https://github.com/user-attachments/assets/bbd38738-3d76-45b1-99d5-6e7a2fa2d6b1)

In the short term you should add `# type: ignore` annotations to the examples; and for at least V3, you should go back to taking both `inputs` and `outputs` `dict`s as an argument to the `command_component` decorator as in V1.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.