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:
Mark Aron Szulyovszky
2021-12-22 12:04:38 +01:00
committed by GitHub
parent cfc9529274
commit 25b64f5a3d
8 changed files with 78 additions and 71 deletions
-16
View File
@@ -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