Skip to content

Commit

Permalink
Set TOKENIZERS_PARALLELISM to false in train.py
Browse files Browse the repository at this point in the history
Avoids the warning about "The current process just got forked. Disabling parallelism to avoid deadlocks"
  • Loading branch information
jamt9000 committed Jan 1, 2025
1 parent 6a9b738 commit ea654a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion train.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# flake8: noqa: E402
import argparse
import json
import os

import pytorch_lightning as pl
# Disable tokenizer parallelism to avoid deadlocks due to forking
os.environ["TOKENIZERS_PARALLELISM"] = "false"

import pytorch_lightning as pl
import src.data_loaders as module_data
import torch
from pytorch_lightning.callbacks import ModelCheckpoint
Expand Down

0 comments on commit ea654a4

Please sign in to comment.