MLOpsPython icon indicating copy to clipboard operation
MLOpsPython copied to clipboard

Example of custom module

Open epa095 opened this issue 5 years ago • 0 comments
trafficstars

Its quite common that one creates some code which is needed both during training and scoring, e.g. a custom data transformer or a custom model. Then one wants to have this as a module which is available for import in both training and scoring. It would be very useful if this example repository covered that scenario, as it requires some small tweaks.

For reference, what we had to do was:

  • Create a new folder under diabetes_regression with our stuff, e.g. diabetes_regression/awesome
  • Change diabetes_regression/scoring/inference_config.yml so it had:
entryScript: scoring/score.py
condaFile: conda_dependencies.yml
sourceDirectory: ../
...

At the moment the inference on azure app service does not work (related issue: #279) with custom module because of import errors, which is probably fixed by either #279, or editing ml_service/util/create_scoring_image.py

epa095 avatar May 22 '20 07:05 epa095