Skip to content

Commit

Permalink
chore: Replaced random with UUID
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddhantSadangi committed Dec 17, 2024
1 parent 3b75a57 commit 67c7d14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions how-to-guides/hpo/scripts/neptune_hpo_separate_runs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import math
import uuid
from datetime import datetime
from uuid import uuid4

import torch
import torch.nn as nn
Expand Down Expand Up @@ -72,7 +72,7 @@ def forward(self, x):
)

if __name__ == "__main__":
sweep_id = str(uuid.uuid4())
sweep_id = str(uuid4())

sweep_run = Run(run_id=f"sweep-{sweep_id}")

Expand Down
4 changes: 2 additions & 2 deletions how-to-guides/hpo/scripts/neptune_hpo_single_run.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import math
from datetime import datetime
from random import random
from uuid import uuid4

import torch
import torch.nn as nn
Expand Down Expand Up @@ -72,7 +72,7 @@ def forward(self, x):
)

if __name__ == "__main__":
run = Run(run_id=f"hpo-{random()}")
run = Run(run_id=f"hpo-{uuid4()}")

run.add_tags(["all-trials", "script"])

Expand Down

0 comments on commit 67c7d14

Please sign in to comment.