File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1010
1111from trinity .common .config import Config , load_config
1212from trinity .common .constants import DataProcessorPipelineType
13+ from trinity .data .utils import (
14+ activate_data_processor ,
15+ stop_data_processor ,
16+ validate_data_pipeline ,
17+ )
1318from trinity .explorer .explorer import Explorer
1419from trinity .trainer .trainer import Trainer
15- from trinity .data .utils import activate_data_processor , stop_data_processor , validate_data_pipeline
1620from trinity .utils .log import get_logger
1721from trinity .utils .plugin_loader import load_plugins
1822
@@ -148,6 +152,7 @@ def both(config: Config) -> None:
148152 explorer .shutdown .remote ()
149153 trainer .shutdown .remote ()
150154
155+
151156def run (config_path : str , dlc : bool = False , plugin_dir : str = None ):
152157 load_plugins (plugin_dir )
153158 config = load_config (config_path )
Original file line number Diff line number Diff line change 11from trinity .common .config import DataPipelineConfig
22from trinity .common .constants import DataProcessorPipelineType
3-
43from trinity .utils .log import get_logger
54
65logger = get_logger (__name__ )
76
7+
88def activate_data_processor (data_processor_url : str , config_path : str ):
99 """Check whether to activate data module and preprocess datasets."""
1010 from trinity .cli .client import request
@@ -18,6 +18,7 @@ def activate_data_processor(data_processor_url: str, config_path: str):
1818 logger .error (f"Failed to activate data module: { res ['return_msg' ]} ." )
1919 return
2020
21+
2122def stop_data_processor (base_data_processor_url : str ):
2223 """Stop all pipelines in the data processor"""
2324 from trinity .cli .client import request
@@ -28,6 +29,7 @@ def stop_data_processor(base_data_processor_url: str):
2829 logger .error (f"Failed to stop all data pipelines: { res ['return_msg' ]} ." )
2930 return
3031
32+
3133def validate_data_pipeline (
3234 data_pipeline_config : DataPipelineConfig , pipeline_type : DataProcessorPipelineType
3335):
You can’t perform that action at this time.
0 commit comments