nf-core / deepmodeloptim

Stochastic Testing and Input Manipulation for Unbiased Learning Systems
https://nf-co.re/deepmodeloptim
MIT License
23 stars 9 forks source link

[future] how to pass a custom experiment file to the nextflow pipeline #64

Closed alessiovignoli closed 1 month ago

alessiovignoli commented 7 months ago

Do we allow to pass a user file? do we ask to put in the experiments.py. TO be decided and implemented.

alessiovignoli commented 7 months ago

This also connect to how an experiment file is passed to the csv.py class for noising and splitting.

alessiovignoli commented 7 months ago

This will be much easier once stimulus is a pypy package and in the pipeline we will be importing it like any other model, like import Json and so on. The user will write his own experiment importing STimulus the same way, then we can import his custom experiment from the given file like we import the model not woorying about consistency.

alessiovignoli commented 7 months ago

The launch_noise_csv.py and launch_split_csv.py have to be modified to import either from stimulus (python package) or from custom user-given experiment file.

The story is a bit different for the launch_training.py here the change has to happen inside the setup() function of the TuneModel class. Since the latter only takes as input a dicitonary, the import has to happen whithin it and it can be resolved in two ways: from stimulus import already_implemented_methods or from user_given_path import custom_experiments

This behaviour can be achieved through the config by giving two keys: experiment_file, and experiment_name, making the above import something like: from config[experiment_file] import config[experiment_name]

mathysgrapotte commented 1 month ago

should be dealt with in stimulus-py