Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tchaton committed Feb 21, 2024
1 parent 69bffd0 commit 7769786
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lightning_data/processing/data_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import logging
import os
import random
import shutil
import signal
import tempfile
Expand All @@ -17,7 +18,7 @@
from urllib import parse

import numpy as np
from lightning import seed_everything
import torch
from tqdm.auto import tqdm as _tqdm

from lightning_data.constants import (
Expand Down Expand Up @@ -879,7 +880,9 @@ def run(self, data_recipe: DataRecipe) -> None:
print(f"Setup started with fast_dev_run={self.fast_dev_run}.")

# Force random seed to be fixed
seed_everything(self.random_seed)
random.seed(self.random_seed)
np.random.seed(self.random_seed)
torch.manual_seed(self.random_seed)

# Call the setup method of the user
user_items: List[Any] = data_recipe.prepare_structure(self.input_dir.path if self.input_dir else None)
Expand Down

0 comments on commit 7769786

Please sign in to comment.