Pipeline.py 871 B

1234567891011121314151617181920212223242526272829303132
  1. from pycs.pipeline import Result
  2. from pycs.pipeline.Job import Job
  3. class Pipeline:
  4. def load(self, root: str, distribution: dict):
  5. """
  6. load and store properties needed for prediction and fitting
  7. :param root: path to model root directory containing distribution.json
  8. :param distribution: pipeline dict from distribution.json containing pipeline specific configuration
  9. :return:
  10. """
  11. pass
  12. def close(self):
  13. """
  14. this function is called everytime a pipeline is not needed anymore
  15. and should be used to close and clean native resources
  16. :return:
  17. """
  18. pass
  19. def execute(self, job: Job) -> Result:
  20. """
  21. receive a job, execute it and return the predicted result
  22. :param job: that should be executed
  23. :return:
  24. """
  25. pass