mirror of
https://github.com/webclinic017/drift.git
synced 2026-07-27 18:57:55 +00:00
fix: Changed config registering to not mutate (#119)
This commit is contained in:
+2
-1
@@ -17,7 +17,7 @@ def launch_wandb(project_name:str, default_config:dict, sweep:bool=False):
|
||||
|
||||
|
||||
def register_config_with_wandb(wandb: Optional[object], model_config:dict, training_config:dict, data_config:dict):
|
||||
if wandb is None: return
|
||||
if wandb is None: return model_config, training_config, data_config
|
||||
|
||||
config: dict = wandb.config
|
||||
|
||||
@@ -28,6 +28,7 @@ def register_config_with_wandb(wandb: Optional[object], model_config:dict, train
|
||||
for k in data_config:
|
||||
data_config[k] = config[k]
|
||||
|
||||
return model_config, training_config, data_config
|
||||
|
||||
def send_report_to_wandb(results: pd.DataFrame, wandb:Optional[object], project_name: str, model_name: str):
|
||||
if wandb is None: return
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ def __setup_pipeline(project_name:str, with_wandb: bool, sweep: bool):
|
||||
wandb = None
|
||||
if with_wandb:
|
||||
wandb = launch_wandb(project_name=project_name, default_config=dict(**model_config, **training_config, **data_config), sweep=sweep)
|
||||
register_config_with_wandb(wandb, model_config, training_config, data_config)
|
||||
model_config, training_config, data_config = register_config_with_wandb(wandb, model_config, training_config, data_config)
|
||||
model_config, training_config, data_config = preprocess_config(model_config, training_config, data_config)
|
||||
|
||||
return wandb, model_config, training_config, data_config
|
||||
|
||||
Reference in New Issue
Block a user