Skip to content

Commit

Permalink
Make shorter
Browse files Browse the repository at this point in the history
  • Loading branch information
lowlypalace committed Dec 16, 2023
1 parent ab7d1d4 commit 8cd9c4c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions experiments/hyperparameter_search/launch_sweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ def train(worker_data: WorkerInitData) -> WorkerDoneData:
device = worker_data.device

# Set the number of threads to one.
# Otherwise, PyTorch will use all the available cores to run computations on CPU.
# If we launch multiple workers, then they will fight for the CPU.
# Otherwise, PyTorch will use all the available cores to run computations on CPU which will slow down the training.
th.set_num_threads(1)

# Set the seed
Expand Down

0 comments on commit 8cd9c4c

Please sign in to comment.