Azure / Azure/azure-sdk-for-python
Make AML SDK v2 support the type: pytorch and type: torch.distributed interchangeably
- Lingua principale
- Python
- Stelle
- 5.6k
- Fork
- 3.4k
- Merge medio
- 2g 2h
- PR unite (30g)
- 202
Descrizione
[Incident-662922382 Details - IcM](https://portal.microsofticm.com/imp/v5/incidents/details/662922382/summary)
Make AML SDK v2 support the `type: pytorch` and `type: torch.distributed` interchangeably.
DETAILS:
Going by the whole thread "Unable to use "DistributedComponent" in AML SDK v2".
1. AML SDK v2 uses `type: pytorch`. AML Designer uses `type: torch.distributed` in order to have backwards compatibility with AML SDK v1.5.
2. @**Ming Gu** has added support of using `type: pytorch` in AML Designer by making `type: pytorch` interchangeable with `type: torch.distributed` in AML Designer backend.
3. As my experiment with uploading component of `type: pytorch` showed, AML Designer actually stores the value as `type: torch.distributed` to have backwards compatibility with AML SDK v1.5.
4. AML SDK v2 get the value of `type: torch.distributed` and fails as AML SDK v2 does not recognize `type: torch.distributed`.
We have 2 options.
1. Make AML Designer store the value as `type: pytorch` `and make change in AML SDK v1.5` to support `type: pytorch``. But this cannot happen as AML SDK v1.5 is deprecated.`
2. Make AML SDK v2 support the `type: pytorch` and `type: torch.distributed` interchangeably.
We have to go with option 2.
I have an idea to do something like.
```
class DistributionType:
MPI = "mpi"
TENSORFLOW = "tensorflow"
PYTORCH = ["pytorch", "torch.distributed"]
RAY = "ray"
```
and for checking presence we can do something like.
```
if value in DistributionType.PYTORCH:
```
We have to decide if this will be an internal change or will change the documentation as well. We have to consider the following places.
1. [CLI (v2) command component YAML schema - Azure Machine Learning | Microsoft Learn](https://learn.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command?view=azureml-api-2#pytorchconfiguration)
2. [https://github.com/Azure/azure-sdk-for-python/blob/d266bc97dcd140e137cdd412f89a0ba05d42b9aa/sdk/ml/azure-ai-ml/azure/ai/ml/constants/_job/job.py#L6](https://github.com/Azure/azure-sdk-for-python/blob/d266bc97dcd140e137cdd412f89a0ba05d42b9aa/sdk/ml/azure-ai-ml/azure/ai/ml/constants/_job/job.py#L6)
3. [azureml-examples/sdk/python/jobs/single-step/pytorch/distributed-training/distributed-cifar10.ipynb at main · Azure/azureml-examples](https://github.com/Azure/azureml-examples/blob/main/sdk/python/jobs/single-step/pytorch/distributed-training/distributed-cifar10.ipynb)
Since this change requires understanding of our public facing contract, adding Amit Chauhan to guide the change from AML SDK v2 side.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.