Skip to content

Commit

Permalink
Set TOKENIZERS_PARALLELISM to false in train.py (#120)
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"
jamt9000 authored Jan 3, 2025
1 parent 50d16db commit c77352b
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

0 comments on commit c77352b

Please sign in to comment.