Skip to content

Support training model version publication

Every training worker will need to publish a new model version at the end of its run.

A new module arkindex_worker.worker.training must be created with the following methods ported from current ufcn worker dev:

  • create_archive (should stay as a top level context manager)
  • in a new class Mixin TrainingMixin:
    • TrainingMixin.publish_model_version takes 2 parameters:
      • model_path is a path towards an existing folder that will get uploaded (as a TAR + ZSTD file)
      • model_id is an UUID of an Arkindex Training model.
    • TrainingMixin.create_model_version
    • TrainingMixin.upload_to_s3
    • TrainingMixin.update_model_version

A unit test is required to test the upload of a known file, requiring mocks for Arkindex & S3 API calls.