Support Archive Storage for Models

The goal of this project is the modify Models and DataFlows to support saving and loading from archives (such as .zip and .tar for example).

Currently all DFFML models have a directory property, which is where they store the contents of the model’s state. It does not currently hold a copy of the model’s config.

We’ll want to modify the Model’s context entry and exit code to have it pack/unpack it’s config and its saved state directory from/into the archive at location.

Skills

  • Python

Difficulty

Beginner/Intermediate

Getting Started

  • Read the contributing guidelines

    • https://intel.github.io/dffml/main/contributing/index.html

  • Go through the quickstart

    • https://intel.github.io/dffml/main/quickstart/model.html

  • Go trough the model tutorials

    • https://intel.github.io/dffml/main/tutorials/models/

  • Go through the model plugins

    • https://intel.github.io/dffml/main/plugins/dffml_model.html

  • Start programming to understand better what will need to happen. The following is a rough guide meant to give you some activities that will help you better understand what needs to be done so you can write a more complete proposal.

    • Rename the directory property to location for all models.

    • On __aenter__() of dffml.model.model.Model, if location has an extension, such as zip or tar, extract it to a temporary directory.

    • Write a method, get_directory(), which returns the location of the temporary directory property on the Model class.

    • On __aexit__() , pack the model state directory into the location, along with it’s config.

    • Understand where all the code for models are that will potentially need to be changed (dffml/model and model/)

    • Make this work with test cases for the SLR model.

Potential Mentors

Tracking and Discussion

This project is related to the following issues. Please discuss and ask questions in the issue comments. Please also ping mentors on Gitter when you post on the following issues so that they are sure to see that you’ve commented.

  • https://github.com/intel/dffml/issues/662