[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.