Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log

## [v2.3.4](https://github.com/simvue-io/python-api/releases/tag/v2.3.4) - 2026-02-10
## [v2.3.4](https://github.com/simvue-io/python-api/releases/tag/v2.3.4) - 2026-02-11

- Add handling of metrics based on size and enforce 10k points per grid metric as per server.
- Freeze `flatdict==4.0.0` do address install issues.
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ keywords:
- simulation
license: Apache-2.0
commit: a24e113aeb6091399cffa0166dd17d1bae0ed916
version: 2.3.3
date-released: '2026-02-10'
version: 2.3.4
date-released: '2026-02-11'
23 changes: 12 additions & 11 deletions simvue/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@

HEARTBEAT_INTERVAL: int = 60
RESOURCES_METRIC_PREFIX: str = "resources"
TOTAL_GRID_METRIC_SIZE: int = 1e6
MAXIMUM_GRID_METRIC_SIZE: int = 5 * 10**4

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -547,7 +548,7 @@ def _start(self) -> bool:
mode=self._dispatch_mode,
termination_trigger=self._shutdown_event,
object_types=["events", "metrics_regular", "metrics_tensor"],
thresholds=dict(object_size=MAXIMUM_GRID_METRIC_SIZE),
thresholds=dict(object_size=TOTAL_GRID_METRIC_SIZE),
callback=self._create_dispatch_callback(),
)

Expand Down Expand Up @@ -584,12 +585,6 @@ def _error(self, message: str, join_threads: bool = True) -> None:
RuntimeError
exception throw
"""
# Stop heartbeat
if self._heartbeat_termination_trigger and self._heartbeat_thread:
self._heartbeat_termination_trigger.set()
if join_threads:
self._heartbeat_thread.join()

# Finish stopping all threads
if self._shutdown_event:
self._shutdown_event.set()
Expand All @@ -600,6 +595,12 @@ def _error(self, message: str, join_threads: bool = True) -> None:
if join_threads:
self._dispatcher.join()

# Stop heartbeat
if self._heartbeat_termination_trigger and self._heartbeat_thread:
self._heartbeat_termination_trigger.set()
if join_threads:
self._heartbeat_thread.join()

if not self._suppress_errors:
raise SimvueRunError(message)

Expand Down Expand Up @@ -1860,10 +1861,6 @@ def set_status(
def _tidy_run(self) -> None:
self._executor.wait_for_completion()

if self._heartbeat_thread and self._heartbeat_termination_trigger:
self._heartbeat_termination_trigger.set()
self._heartbeat_thread.join()

if self._shutdown_event:
self._shutdown_event.set()

Expand All @@ -1876,6 +1873,10 @@ def _tidy_run(self) -> None:
self._dispatcher.purge()
self._dispatcher.join()

if self._heartbeat_thread and self._heartbeat_termination_trigger:
self._heartbeat_termination_trigger.set()
self._heartbeat_thread.join()

if (
self._sv_obj
and self._user_config.run.mode == "offline"
Expand Down
Loading