Create Data Storage
See point 3 Tracking all data across all instances of a given class: https://www.toptal.com/python/python-class-attributes-an-overly-thorough-guide
Create a data storage for easy exchange of information between single working step classes (like PreProcessing
or Training
). This shall replace calls like
with run():
exp_setup = ExperimentSetup(trainable=True)
PreProcessing(exp_setup, arbitrary_options1)
Training(exp_setup, arbitrary_options2)
by something like this (only first idea)
with run() as run_object:
run_object.datastorage = ExperimentSetup(trainable=True)
PreProcessing(arbitrary_options1)
Training(arbitrary_options2)
Need to check if this works for inheritances too or only for instances. Otherwise the datastorage always needs to be called by run.datastorage instead of self.datastorage or PreProcessing.datastorage. Remind, that this works only with mutable variables, all others would create an instance attribute during assertion process.