Hi ngavranovic,
Hope you are doing well.
To address your modularity concerns in Azure ML, the best approach is to package the shared logic (e.g., common/
) as a Python package and install it via pip
in each component's execution environment. This can be done by creating a setup.py
for the common/
directory, making it installable, and then specifying the package in the component YAML file under the environment
section.
Alternatively, you can upload the common/
code to a storage location like Azure Blob Storage or GitHub and use it as an external dependency in your components. Another option is to adjust the sys.path
in your model scripts to include the common/
directory without duplication. While the code
attribute in the component YAML currently only supports specifying a single directory, Azure ML frequently updates its features, so this functionality could be enhanced in the future.
I hope this information helps. Thank you!