Referencing Python Dependency files in scoring file

Cameron Grimshaw-Jones 16 Reputation points
2021-12-07T14:55:10.963+00:00

Hello,

I'm intending to add some python files in the dependencies in the screenshot below. How do I reference them in my scoring.py file?

i.e. if the dependency file is called main.py, i'd like to import a python function from main.py - along the lines of the below:
"import main"

in my scoring.py file. Is this possible?

155653-image.png

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,332 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ramr-msft 17,826 Reputation points
    2021-12-08T11:57:51.577+00:00

    [Edited to update broken link]

    Thanks for the question. Did you use the designer or Azure machine leaning SDK for training the model, Also can you please share the requirement of main.py file that you are trying?.

    The “score.py” exposed in trained_model_outputs is for customized deployment, only have model init and scoring logic, user can add their own pre-process and post-process code on top of that.
    The scoring logic that having pre-process logic is available through Designer deployed web service, which can be on both AKS and ACI. You can follow this doc: Tutorial: Deploy ML models with the designer - Azure Machine Learning | Microsoft Learn.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.