fix(tidy3d): FXC-4704-reduce-verbosity-when-loading-data-from-batch #3131
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When loading data from batches with
verbose=True, we currently flood the console with all the “Loading simulation from…” messages which is not wanted in this case.Therefore, I fixed
verbose=Falseforweb.loadin the batch scenario.Note
Reduces noisy console output when iterating over batch results.
BatchData.load_sim_data(), passverbose=Falsetoweb.load()to suppress per-task “Loading simulation…” messagesCHANGELOG.mdunder Fixed to note restored original batch-load logging behaviorWritten by Cursor Bugbot for commit 9b049ff. This will update automatically on new commits. Configure here.
Greptile Summary
This PR fixes excessive verbosity when loading batch simulation data by hardcoding
verbose=Falsein theBatchData.load_sim_data()method.Changes:
tidy3d/web/api/container.py:627to passverbose=Falseinstead ofself.verbosetoweb.load()BatchData.verbose=True, each individual simulation load would print "Loading simulation from {path}", flooding the console with repetitive messagesImpact:
verbose=Truecontrols batch operations, not individual data loadsConfidence Score: 5/5
verbose=Falsewhen loading individual simulations from a batch, preventing console flooding while preserving all functionality.Important Files Changed
verbose=self.verbosetoverbose=FalseinBatchData.load_sim_data()to suppress individual "Loading simulation from..." messages when loading batch dataSequence Diagram
sequenceDiagram participant User participant Batch participant BatchData participant web.load participant Console User->>Batch: run(verbose=True) Batch->>BatchData: load() with verbose=True Note over BatchData: BatchData.verbose = True loop For each task in batch User->>BatchData: __getitem__(task_name) BatchData->>BatchData: load_sim_data(task_name) BatchData->>web.load: load(verbose=False) Note over web.load: BEFORE: verbose=self.verbose<br/>AFTER: verbose=False alt verbose=False (AFTER fix) web.load-->>BatchData: Returns data silently else verbose=True (BEFORE fix) web.load->>Console: "Loading simulation from {path}" web.load-->>BatchData: Returns data with log message end BatchData-->>User: Returns simulation data end Note over User,Console: Fix prevents console flooding<br/>with repeated load messages