-
Notifications
You must be signed in to change notification settings - Fork 26
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
OpenMDAO recorder #370
Comments
Hello, You are right, there is no FAST-OAD-specific way to configure an OpenMDAO recorder, but you may still do it using your knowledge of OpenMDAO, and a part of FAST-OAD that we did not advertise yet, but is nonetheless part of the official (thus maintained) API of FAST-OAD. Assuming you have a configuration file, you can do: import fastoad.api as oad
import openmdao.api as om
conf = oad.FASTOADProblemConfigurator("path/to/your/conf_file.yml") # reads the configuration file
conf.write_needed_inputs("your/data_source.xml") # you may skip this step if you already generated your input file
problem = conf.get_problem(read_inputs=True) # here you get an OpenMDAO problem (with only a few additions)
# Here you may add your recorder using the OpenMDAO way
recorder = om.SqliteRecorder("record.sqlite")
problem.model.add_recorder(recorder)
problem.model.recording_options['includes'] = ['*']
# You run the problem normally
problem.setup()
problem.run_model()
# To get FAST-OAD outputs, you have to use the method we have added
# to our slightly modified Problem class:
problem.write_outputs() Please let me know it you can work with that. And if you want a more straight-forward solution, I would be interested to have some suggestions on the way we should make such feature available. Would you have this settings in the configuration file? What syntax you think would be useful? |
Hello, To answer your final question, in my opinion a good way to implement the recorder in FAST OAD would be to add it as an option that can be declared in the configuration file, in a similar manner as the optimisation driver. Best regards, |
Thanks for the feedback.
I take the occasion to write some thoughts about that: Actually, as you know, recorders in OpenMDAO are not set like the optimisation driver. You can set recorders for problem, driver, solvers, or systems. And strictly speaking, recording_options:
excludes :
- private:*
- *useless*
record_inputs : false And to be complete, we will have to allow to set a case prefix when running the problem. |
Hello,
is there any possibility today to use the OpenMDAO recorder for tracking the variables within FAST OAD?
I found it very useful when working in OpenMDAO to log the results, but it seems that in FAST OAD there is not the possibility to use it yet.
Thanks in advance for the reply.
Regards,
Alessandro Sgueglia
The text was updated successfully, but these errors were encountered: