mirror of
https://github.com/webclinic017/drift.git
synced 2026-07-28 11:17:47 +00:00
55f083638f
* feat: Basic scaffolding up for inference process after training. * feat: Saving and loading models works. Inference works nearly. * feat: Added inference pipeline. * feat: Saving model now accoring to date and time; loading models now selects from latest file. Fixed the creation of dictionary of models. * feat: Added lightweight asset config, but full pipeline. * feat: Added new naming for dictionary. * fix: Fixed dictionary naming convention. * fix: Fixed naming again, now the model structure is good * fix: Changed the output path and the return values from run_pipeline. * feat: Added function to make sure folder exists for output models. Co-authored-by: Daniel Szemerey <szemereydaniel@gmail.com>
20 lines
815 B
Python
20 lines
815 B
Python
from training.inference import run_inference_pipeline
|
|
from models.saving import load_models
|
|
|
|
from run_pipeline import run_pipeline
|
|
from config.config import get_dev_config, get_default_ensemble_config, get_lightweight_ensemble_config
|
|
|
|
from typing import Callable
|
|
|
|
|
|
def run_inference(preload_models:bool, get_config:Callable):
|
|
if preload_models:
|
|
all_models_all_assets, data_config, training_config = load_models(None)
|
|
else:
|
|
all_models_all_assets, data_config, training_config, _, _, _ = run_pipeline(project_name='price-prediction', with_wandb = False, sweep = False, get_config=get_config)
|
|
|
|
run_inference_pipeline(data_config, training_config, all_models_all_assets)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
run_inference(preload_models=False, get_config=get_lightweight_ensemble_config) |