-
Notifications
You must be signed in to change notification settings - Fork 54
Control warnings when loading simulation data from file #2234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@weiliangjin2021 had a suggestion for adding a feature that skips validation when loading from file, which I will try out soon. |
I guess this is another incentive to switch to pydantic v2. There, model_construct makes this trivial (we could just call |
I was trying this but yeah |
The hacky workaround is to change the log level around internal pieces of code that we want to avoid issuing warnings... |
Is it worth it for me to create a PR with this hacky workaround for |
Is your feature request related to a problem? Please describe.
I found this slightly annoying issue when working with the
TerminalComponentModeler
. Whenever I interact with theBatchData
to perform post-processing I need to accessSimulationData
, which triggers a load from a file. When loading the file, theSimulation
gets validated and any warnings are emitted. In my notebook, after many of the cells showing simple post processing steps, there are now a bunch of warnings.Even in steps like
s_matrix = modeler.run()
there can be many duplicate warnings, since the
SimulationData
is accessed many times to compute scattering parameters. See the attached screenshots for an example, although some of these duplicates may be emitted from a different part of the code.Describe the solution you'd like
Some internal functionality for loading
SimulationData
without warnings/validation from theSimulation
. So that I can dosim_data = batch_data["some_task_name"]
and not get any warnings.
@tylerflex @lucas-flexcompute I think you both have worked on
Batch
andBatchData
.The text was updated successfully, but these errors were encountered: