Unanswered
Hi
No I want to put them inside the pipeline.py file where I config all steps, like this:
from clearml import PipelineDecorator
from train_helpers.common import params
from dataset import DataModule
from train import Trainer
@PipelineDecorator.component(return_values=['_args'], cache=True)
def init_experiment():
_args = params.parse_args()
return _args
@PipelineDecorator.component(return_values=['data'], cache=False)
def data_preparation(args):
data = DataModule(args)
return data
@PipelineDecorator.component(cache=False)
def train_model(args, data):
Trainer(args).train()
@PipelineDecorator.pipeline(name='Pipeline_decorator', project='Pipeline_decorator', version='0.1', pipeline_execution_queue=None)
def main():
args, setup_logger = init_experiment()
data = data_preparation(args)
train_model(args, data)
if __name__ == '__main__':
# PipelineDecorator.debug_pipeline()
PipelineDecorator.run_locally()
main()
93 Views
0
Answers
8 months ago
8 months ago