diff --git a/docs/conf.py b/docs/conf.py index 83f2c61..6e2bf4e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ # The short X.Y version version = '0.1' # The full version, including alpha/beta/rc tags -release = '0.1.14' +release = '0.1.15' # -- General configuration --------------------------------------------------- diff --git a/setup.py b/setup.py index b1bed10..4d9f8cb 100644 --- a/setup.py +++ b/setup.py @@ -13,11 +13,11 @@ setup(name='steppy', packages=['steppy'], - version='0.1.14', + version='0.1.15', description='A lightweight, open-source, Python library for fast and reproducible experimentation', long_description=long_description, url='https://github.com/minerva-ml/steppy', - download_url='https://github.com/minerva-ml/steppy/archive/0.1.14.tar.gz', + download_url='https://github.com/minerva-ml/steppy/archive/0.1.15.tar.gz', author='Kamil A. Kaczmarek, Jakub Czakon', author_email='kamil.kaczmarek@neptune.ml, jakub.czakon@neptune.ml', keywords=['machine-learning', 'reproducibility', 'pipeline', 'data-science'], diff --git a/steppy/base.py b/steppy/base.py index 979dd78..eb36ce5 100644 --- a/steppy/base.py +++ b/steppy/base.py @@ -414,12 +414,14 @@ def set_mode_train(self): and cleans cache for all upstream Steps including this Step. """ self._set_mode('train') + return self def set_mode_inference(self): """Applies 'inference' mode to all upstream Steps including this Step and cleans cache for all upstream Steps including this Step. """ self._set_mode('inference') + return self def reset(self): """Reset all upstream Steps to the default training parameters and @@ -442,6 +444,7 @@ def reset(self): step_obj.load_persisted_output = DEFAULT_TRAINING_SETUP['load_persisted_output'] logger.info('Step {}, reset all upstream Steps to default training parameters, ' 'including this Step'.format(self.name)) + return self def set_parameters_upstream(self, parameters): """Set parameters to all upstream Steps including this Step. @@ -455,12 +458,14 @@ def set_parameters_upstream(self, parameters): if key == 'experiment_directory': step_obj._prepare_experiment_directories() logger.info('set new values to all upstream Steps including this Step.') + return self def clean_cache_step(self): """Clean cache for current step. """ logger.info('Step {}, cleaning cache'.format(self.name)) self.output = None + return self def clean_cache_upstream(self): """Clean cache for all steps that are upstream to `self`. @@ -469,6 +474,7 @@ def clean_cache_upstream(self): for step in self.all_upstream_steps.values(): logger.info('Step {}, cleaning cache'.format(step.name)) step.output = None + return self def get_step_by_name(self, name): """Extracts step by name from the pipeline.