mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-17 21:08:08 +00:00
Feature: Added sweep functionality (#65)
* feat: Parametricized model selection works now. * feat: Fixed errors. Sweep generates and you can run it, but it gives an error for model.only_columns attribute. * feat: Factored the wandb management, default config managment and the model_dictionary out of the run_pipeline to a seperate file. * fix: Took out prints and fixed the mismatch of ensemble models when classifing. * fix(Models): added StaticMomentum model to the dictionary, hopefully fixed sklearn-ex RandomForestRegressor problem * fix(Dependencies): pin scikit-learn-ex's version, moved map_model_name_to_function to `models` * feat(Sweep): added `run_sweep.py` shortcut * feat(Pipeline): skip training a meta model if array is empty Co-authored-by: Mark Aron Szulyovszky <mark.szulyovszky@gmail.com>
This commit is contained in:
co-authored by
Mark Aron Szulyovszky
parent
d3d7184ea4
commit
1c1b8b2e54
@@ -0,0 +1,27 @@
|
||||
|
||||
|
||||
def launch_wandb(project_name:str, default_config:dict, sweep:bool=False):
|
||||
from wandb_setup import get_wandb
|
||||
wandb = get_wandb()
|
||||
|
||||
if type(wandb) == type(None):
|
||||
return None
|
||||
elif sweep:
|
||||
wandb.init(project=project_name, config = default_config)
|
||||
return wandb
|
||||
else:
|
||||
wandb.init(project=project_name, config = default_config, reinit=True)
|
||||
return wandb
|
||||
|
||||
|
||||
def seperate_configs(wandb, model_config:dict, training_config:dict, data_config:dict) -> tuple[dict,dict,dict]:
|
||||
config:dict = wandb.config
|
||||
|
||||
if type(wandb) is not type(None):
|
||||
for k in training_config: training_config[k] = config[k]
|
||||
for k in model_config: model_config[k] = config[k]
|
||||
# for k in data_config: data_config[k] = config[k]
|
||||
|
||||
return model_config, training_config, data_config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user