mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-19 05:48:09 +00:00
refactor(Reporting): only report the last model's results, moved wandb-related functions to reporting (#69)
* refactor(Reporting): only report the last model's results, moved wandb-related functions to `reporting` * fix(Reporting): use .mean() on axis 1 to retain the metrics, fixed get_model_name() * fix(Config): sweep file syntax * fix(Config): changed hyperparameter search method to "bayes" * chore(Sweep): adjusted sweep config based on the results we saw (removed Momentum as well) * fix(Sweep): only use classification method for now, we're not yet prepared for regression
This commit is contained in:
@@ -61,21 +61,5 @@ def run_single_asset_trainig(
|
||||
# column names for model outputs should be different, so we can differentiate between original data and model predictions later, where necessary
|
||||
predictions["model_" + column_name] = preds
|
||||
|
||||
if wandb_active and not sweep:
|
||||
run = wandb.init(project=project_name, config={"model_type": model_name, "ticker": ticker_to_predict}, reinit=True)
|
||||
wandb.run.name = ticker_to_predict + "-" + model_name+ "-" + wandb.run.id
|
||||
wandb.run.save()
|
||||
|
||||
for rownum,(indx,val) in enumerate(result.iteritems()):
|
||||
run.log({"model_type": model_name, indx:val })
|
||||
|
||||
run.finish()
|
||||
|
||||
if wandb_active and sweep:
|
||||
mean_results = results.mean()
|
||||
|
||||
wandb.log({"model_type": 'avarage_model', 'results':results })
|
||||
for rownum,(indx,val) in enumerate(mean_results.iteritems()):
|
||||
wandb.log({"model_type": 'avarage_model', indx:val })
|
||||
|
||||
return results, predictions
|
||||
Reference in New Issue
Block a user