If I modify an imported Python module while a Slurm job is running, will later iterations use the new code?
My Python training script that runs as a single Slurm job imports a model at startup and trains it multiple times with different random seeds: train.py: from model import MyModel for seed in [1, 2, 3, 4, 5]: model = MyModel() model.train(seed) model.py: from feature import FeatureExtractor class MyModel: def __init__(self): self.feature = FeatureExtractor() def train(self, seed): print(f"Training seed {seed}") feature.py: class FeatureExtractor: def __init__(self): print("Version 1") I submit Slurm Job A which starts running train.py. While Job A is still running (for example, after it finishe
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.