0

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.

Dependencies

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ericson Willians
  • 7,606
  • 11
  • 63
  • 114
  • One way I can thunk of is to create setup.py with all your required packages as per my answer here- https://stackoverflow.com/questions/76352244/how-to-create-diff-environments-for-different-python-packages-in-production/76355878#76355878 OR Directly use Azure ML SDK code as given in this blog- https://azure.github.io/azureml-cheatsheets/docs/cheatsheets/python/v1/environment/#in-azure-ml-sdk – SiddheshDesai Aug 09 '23 at 04:11
  • 2
    The bounty attracted a [ChatGPT](https://meta.stackoverflow.com/questions/421831/temporary-policy-chatgpt-is-banned) plagiariser. – Peter Mortensen Aug 14 '23 at 13:22
  • That answer is now deleted. – Peter Mortensen Sep 02 '23 at 16:13

1 Answers1

0

Turns out that it was an UX problem on the Azure platform. The dependencies file was actually an environment .yml conda file, for example:

name: pytorch_env
channels:
  - pytorch
  - defaults
dependencies:
  - python=3.8
  - numpy
  - matplotlib
  - pandas
  - scikit-learn
  - tqdm
  - pytorch
  - torchvision
  - pip
  - pip:
      - torchsummary
      - tensorboard

I have no idea why the filechooser asks for a .py file, but apparently, it's only to confuse developers like me :).

Ericson Willians
  • 7,606
  • 11
  • 63
  • 114