diff --git a/tutorials/neuronpedia/neuronpedia.py b/tutorials/neuronpedia/neuronpedia.py index 380a39fc..6e3e9af9 100755 --- a/tutorials/neuronpedia/neuronpedia.py +++ b/tutorials/neuronpedia/neuronpedia.py @@ -151,7 +151,7 @@ def generate( outputs_dir.mkdir(parents=True, exist_ok=True) # Check if output_dir has any files starting with "batch_" batch_files = list(outputs_dir.glob("batch-*.json")) - if len(batch_files) > 0 and resume_from_batch != 1: + if len(batch_files) > 0 and resume_from_batch == 1: print( f"Error: Output directory {outputs_dir.as_posix()} has existing batch files. This is only allowed if you are resuming from a batch. Please delete or move the existing batch-*.json files." ) @@ -230,7 +230,7 @@ def generate( ) # iterate from 1 to num_batches - for i in range(1, num_batches + 1): + for i in range(resume_from_batch, num_batches + 1): command = [ "python", "make_batch.py",