[Scheduler] introduce synchronized data directly in the scheduler#1704
[Scheduler] introduce synchronized data directly in the scheduler#1704tdavidcl wants to merge 7 commits intoShamrock-code:mainfrom
Conversation
|
Thanks @tdavidcl for opening this PR! You can do multiple things directly here: Once the workflow completes a message will appear displaying informations related to the run. Also the PR gets automatically reviewed by gemini, you can: |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request establishes a foundational system for managing and persisting runtime variables directly within the scheduler. By introducing synchronized, serializable data structures and integrating them with the existing dump/load functionality, it enables critical simulation parameters to be consistently maintained across distributed environments and simulation restarts. This is a significant step towards achieving an immutable configuration that solely defines simulation parameters. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a valuable feature for managing synchronized, persistent data within the scheduler using a SolverGraph with serializable edges, moving towards an immutable configuration. However, the deserialization logic in SynchronizedData::from_json lacks proper input validation and error handling, making the application susceptible to Denial of Service (DoS) attacks where a malformed dump file can cause the simulation to crash due to unhandled exceptions. It is recommended to use safer access methods (like find() or contains()) and wrap the deserialization process in a try-catch block to ensure graceful failure when encountering invalid data, aligning with the principle of robust error handling emphasized in this repository. Additionally, the review identifies general issues such as temporary test code, typos, minor performance optimizations, and debugging output that need to be addressed for a cleaner implementation.
src/shamrock/include/shamrock/solvergraph/ScalarEdgeSerializable.hpp
Outdated
Show resolved
Hide resolved
…le.hpp Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Workflow reportworkflow report corresponding to commit 9bc88dd Light CI is enabled. This will only run the basic tests and not the full tests. Pre-commit check reportPre-commit check: ✅ Test pipeline can run. Doxygen diff with
|
After a lot of trial and error this PR aims at providing some runtime edges directly in the scheduler that are persitent across restarts. This typically should serve to store runtime variables such as time, dt, dxfact (in ramses solver) and more.
Currently this is at the "it just works" state now i need to make it much cleaner.
The end goal is to finally have a immutable config that just describe the parameters and nothing else !!!