From 66e0d8b9fd4d0f7a2231d689c055e26fdf1cf04a Mon Sep 17 00:00:00 2001 From: YurenHao0426 Date: Sat, 13 Jun 2026 12:35:36 -0500 Subject: rrm workspace: TRM/HRM/SRM code, Maze dataset, dynamical-analysis pipeline Curated export for clone-and-run Maze training (2x A6000) + diagnostics. trm/hrm pretrain.py carry trajectory-augmentation code (backward-compatible). Heavy artifacts (checkpoints/wandb/npz) gitignored; see PROVENANCE.md. Co-Authored-By: Claude Fable 5 --- hrm/utils/functions.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 hrm/utils/functions.py (limited to 'hrm/utils') diff --git a/hrm/utils/functions.py b/hrm/utils/functions.py new file mode 100644 index 0000000..b123636 --- /dev/null +++ b/hrm/utils/functions.py @@ -0,0 +1,19 @@ +import importlib +import inspect + + +def load_model_class(identifier: str, prefix: str = "models."): + module_path, class_name = identifier.split('@') + + # Import the module + module = importlib.import_module(prefix + module_path) + cls = getattr(module, class_name) + + return cls + + +def get_model_source_path(identifier: str, prefix: str = "models."): + module_path, class_name = identifier.split('@') + + module = importlib.import_module(prefix + module_path) + return inspect.getsourcefile(module) -- cgit v1.2.3