Rework radar system

This commit is contained in:
Ayzen
2026-10-06 12:32:26 +03:00
parent 552cdc688a
commit 5bb86b7165
299 changed files with 13537 additions and 27763 deletions
+6 -14
View File
@@ -6,14 +6,13 @@ import logging
from pathlib import Path
from python_app.file_io import atomic_write_json
from python_app.models.run_config_model import RunConfigModel, parse_combos_from_text
from python_app.models.run_config_schema import RunConfigModel
from python_app.orchestration.preprocess_assets import (
PREPROCESS_ASSET_KEYS,
PREPROCESS_ASSET_SPECS,
PREPROCESS_ASSET_NAMES,
preprocess_asset_model,
runtime_preprocess_asset_keys,
)
from python_app.storage.npz_store import NpzStore
from python_app.storage.npz.store import NpzStore
logger = logging.getLogger(__name__)
@@ -33,18 +32,14 @@ class ConfigWriter:
config: RunConfigModel,
) -> None:
"""Export selected preprocess sets into runtime bundles and update config paths."""
for key in PREPROCESS_ASSET_KEYS:
for key in PREPROCESS_ASSET_NAMES:
preprocess_asset_model(config, key).bundle_path = ""
for key in runtime_preprocess_asset_keys(config):
spec = PREPROCESS_ASSET_SPECS[key]
asset = preprocess_asset_model(config, key)
bundle_path = self._runtime_dir / spec.runtime_filename
bundle_path = self._runtime_dir / f"{key}_bundle.bin"
logger.debug("Exporting preprocess bundle %s (set=%s) -> %s", key, asset.set_name, bundle_path)
if key == "s21_object_calibration":
store.export_object_calibration_bundle(radar_key, asset.set_name, bundle_path, config)
else:
store.export_set_bundle(spec.set_kind, radar_key, asset.set_name, bundle_path)
store.export_set_bundle(key, radar_key, asset.set_name, bundle_path)
asset.bundle_path = str(bundle_path)
def write(self, config: RunConfigModel, output_path: Path) -> Path:
@@ -52,6 +47,3 @@ class ConfigWriter:
atomic_write_json(output_path, config.to_dict(), durable=True)
logger.debug("Wrote run config to %s", output_path)
return output_path
__all__ = ["ConfigWriter", "parse_combos_from_text"]