Skip to content

Commit

Permalink
fix(sweep): added cuda clean
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaNG committed May 8, 2024
1 parent 921d951 commit 4d3f64f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kan_gpt/sweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

def wandb_sweep():
run = wandb.init(resume="allow", anonymous="must")
torch.cuda.empty_cache()

class Args:
model_type = wandb.config.model_type
Expand All @@ -21,6 +20,9 @@ class Args:

run_args = Args()

if "cuda" in run_args.device:
torch.cuda.empty_cache()

main(args=run_args, run=run)

if "cuda" in run_args.device:
Expand Down

0 comments on commit 4d3f64f

Please sign in to comment.