Migrate from background threads to Ray actors#46
Draft
metesaka wants to merge 37 commits into
Draft
Conversation
ParquetIngestDriver mirrors the CSV/XLSX tabular drivers: watches a directory for *.parquet/*.pq files, supports wide/narrow layouts and row-offset paging. Includes unit tests.
Adopt the build -> change_inputs -> solve model contract and load points from the model's watertap-mapping.json instead of a hand-authored RDF graph. Registering a stream per mapped point writes its external reference and Pyomo variable (hasExternalReference/hasPyomoVar) via the insert-graph interface. watertap_graph_path is now optional (model ontology insert). Tests updated to the mapping contract.
Quote the dependency (the unquoted entry was invalid TOML and broke test collection); streamlit is required by the WaterTAP GUI driver.
Point the example at watertap_mapping_path (+ optional model.ttl insert) and document the new required/optional keys.
Each model folder exposes the standard interface: build-and-solve.py (build/change_inputs/solve), generate-values.py (generate_new_values), watertap-mapping.json (point URI -> Pyomo path), and an s223 model.ttl. Remove the old flat simple-pipe ttl.
data-generator.py writes parquet snapshots for any model folder.
simulation_driver.py auto-generates inputs and solves each tick;
gui_driver.py solves on changes from a model-agnostic Streamlit GUI
(input_gui.py). acquirium.toml wires both models x {simulation, GUI,
parquet} with one block enabled. Remove the old pump scripts.
Single README introducing both models, data generation, the drivers, and how to change the config; replaces the two per-model READMEs.
- New app methods to start, stop and list drivers - Removing driver only server command - All drivers are now ray actors - App manages all of the drivers - cli changes for server, users can add new drivers to a running server but not in different processes
Contributor
Author
Changes up to now:Drivers no longer run as daemon threads inside the server process — each one Driver execution on Ray
Breaking changes
Testing
|
Contributor
Author
Changes up to now:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR is for changing the acquirium backend to use Ray for running Apps (soft sensors), Drivers and other background processes without using python threads or Docker.
Builds on #45 so we need to merge that one first