Skip to content

Commit

Permalink
feat: logging tsets creation time into mlflow params (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Stablum committed Nov 24, 2021
1 parent 2de1509 commit 0e068a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/tsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ def __init__(
):
self.rel = rel
kwargs.update(dict.fromkeys(self.tsets_names, None))
self.creation_time = kwargs['creation_time']
super().__init__(**kwargs)

self.load_data()

for which_tset in self.tsets_names:

if self.with_set_index is False:
# removes the set_index column from the glued-up tensor
self[which_tset] = self[which_tset][:, 1:]
Expand Down
5 changes: 3 additions & 2 deletions models/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ def run(Model,config_name, dynamic_config={}):
model_config = utils.load_model_config(config_name, dynamic_config=dynamic_config)
mlflow.set_experiment(model_config['experiment_name'])
mlflow.pytorch.autolog()
with mlflow.start_run(run_name=model_config['config_name']):
run_name = f"{model_config['config_name']}_{model_config['rel_name']}"
with mlflow.start_run(run_name=run_name):
mlflow.log_params(model_config)
print("__file__",__file__)
mlflow.log_artifact(__file__)
Expand All @@ -135,7 +136,7 @@ def run(Model,config_name, dynamic_config={}):
with_set_index=Model.with_set_index,
cap=model_config['cap_dataset']
)

mlflow.log_param('tsets_creation_time',tsets.creation_time)
for curr in tsets.tsets_names:
mlflow.log_param(f"{curr}_datapoints",tsets[curr].shape[0])

Expand Down

0 comments on commit 0e068a9

Please sign in to comment.