So, when I create an Endpoint instance for inferencing, it asks me for a scoring_script.py file (which I provide, no problems), but inside of it, I have a dependency that must be met.
My instance is crashing, because the image I’ve selected for ML work doesn’t have all Azure SDK dependencies, and I need to add custom dependencies. This "dependencies / add file" button asks me for a Python file, not a requirements text file or a Conda YAML file, so I don’t know how to define this script.
How can I specify these dependencies in a script? I couldn’t find it in the documentation.
2
Answers
Turns out that it was an UX problem on the Azure platform. The dependencies file was actually an environment .yml conda file, for example:
I have no idea why the filechooser asks for a .py file, but apparently, it's only to confuse developers like me :).
To include custom dependencies in your scoring script, you can use the pip package manager to install them.
Here’s an example of how you can include a custom dependency in your scoring script:
You can add as many dependencies as you need by calling pip install for each one.
Make sure to specify the correct version of the package you want to install, if necessary, to avoid compatibility issues.