MCPcopy Create free account
hub / github.com/FinancialComputingUCL/LOBFrame / delete_run

Method delete_run

optimizers/lightning_batch_gd.py:262–278  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

260 self.deleted_run = None
261
262 def delete_run(self):
263 api = wandb.Api()
264 project_path = "<Specify here the name of WB project>" # TODO: Specify here the name of WB project.
265 runs = api.runs(path=project_path)
266 print('Deleting runs...')
267 while len(runs) < 1:
268 runs = api.runs(path=project_path)
269 for run in runs:
270 input_list = run.metadata
271 if input_list is not None:
272 input_list = input_list['args']
273 result_dict = {input_list[i][2:]: input_list[i + 1] for i in range(0, len(input_list), 2)}
274 modified_dict = result_dict
275 if modified_dict['model'] == str(self.general_hyperparameters['model']) and modified_dict['prediction_horizon'] == str(self.model_hyperparameters['prediction_horizon']) and modified_dict['training_stocks'] == str(self.general_hyperparameters['training_stocks'][0]) and modified_dict['target_stocks'] == str(self.general_hyperparameters['target_stocks'][0]):
276 self.deleted_run = run.name
277 run.delete()
278 print(f"Run succesfully deleted from WanDB: {run.name}.")
279
280 def train(self):
281 self.lob_lightning_module = LOBLightningModule(

Callers 1

trainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected