Skip to content
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

Better handling for "no sources" validator in Simulation #813

Closed
tylerflex opened this issue Mar 30, 2023 · 3 comments
Closed

Better handling for "no sources" validator in Simulation #813

tylerflex opened this issue Mar 30, 2023 · 3 comments
Assignees

Comments

@tylerflex
Copy link
Collaborator

Right now, we get this validator twice when constructing a sim for the mode solver and plotting the mode solver results.

It's unnecessary to print this warning in these cases as we really only want to warn the user if they are running the simulation.

We could add as a pre-upload validator (which errors) but we'd still want the user to be able to submit a simulation without sources if (for some reason) they want to view ModeMonitorData or PermittivityData results.

Not sure what the best approach is, but I might even suggest moving it from WARNING to INFO for now as a short term solution?

@tylerflex
Copy link
Collaborator Author

Referenced in #978, possibly duplicate and we can close.

@lucas-flexcompute
Copy link
Collaborator

I'm not so sure our solution for #978 will help much here. I'm proposing another solution specifically for this, just in case.

@tylerflex
Copy link
Collaborator Author

perhaps we can move this to a "pre-upload" validator (and make it error) that way it doesn't get triggered for mode stuff

lucas-flexcompute added a commit that referenced this issue Jul 3, 2023
Also included a flag in the pre upload validator to optionally raise an
error if no sources are present in the simulation. This flag is true by
default on `run` and manual job creation, but false for the mode solver.
It cannot be changed from `run` (only in `Job` or `Batch`), because
simulations with no sources should be very rare and we already have a
lot of arguments in `run`.

Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
lucas-flexcompute added a commit that referenced this issue Jul 4, 2023
Also included a flag in the pre-upload validator to optionally raise an
error if no sources are present in the simulation. This flag is true by
default on `run` and manual job creation, but false for the mode solver.
It cannot be changed from `run` (only in `Job), because simulations
with no sources should be very rare and we already have a lot of
arguments in `run`.

Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants