Azure / Azure/azure-sdk-for-python
How to provide environment variables to command components (SDK V2)
- Lingua principale
- Python
- Stelle
- 5.6k
- Fork
- 3.4k
- Merge medio
- 2g 2h
- PR unite (30g)
- 213
Descrizione
Hey!
We're migrating from SDK V1 to V2.
I have to say it's been a headache.
We use yaml command components to run/deploy our scripts with SDK v2.
The yaml command components are loaded into a pipeline_component, and then the pipeline_component runs in a job, using the Python V2 SDK.
The above works, the job and its components execute.
**But**, how do we set environment variables for these (yaml) components so that they are reachable at runtime?
Can we set it in the command component yaml? In the loaded component? In the pipeline? In the Environment? I've searched and tried almost everything by now, but to no avail.
There's even a forum question about it, where the mods are suggesting the commandComponent.schema.json supports it, which it doesn't:
https://learn.microsoft.com/en-us/answers/questions/2237919/how-to-pass-environment-variable-into-azureml-comp?comment=answer-2015022&page=1#comment-2360727
Side comment is that a lot of the documentaton on SDK V2 references the _mldesigner_ package, which has dependencies to SDK v1 (azureml.core) - and from what I gather this is contraproductive since SDK v1 is out or support next summer? And not even supporting above Python 3.9?
At least when I've tried to use mldesigner, I get errors that I need to add azureml.core as well.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia esaminando il flusso dei componenti di comando YAML di SDK V2 e il riferimento commandComponent.schema.json menzionato nell’issue. Verifica come vengono gestite le variabili di ambiente per i componenti caricati, le pipeline e gli ambienti, e confronta il risultato con le indicazioni di mldesigner nella documentazione. Il lavoro è completato quando viene documentata la configurazione supportata oppure vengono dichiarate chiaramente la limitazione e le versioni dei pacchetti necessarie.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- cloud, machine-learning
- Tipo di issue
- Documentazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100