From 7323651a07973fb499a39465e8d4182672d7db4f Mon Sep 17 00:00:00 2001 From: Nirbhai Date: Fri, 19 Jun 2026 09:30:46 +0530 Subject: [PATCH] Add Olmo3 architecture adapter tests --- .../test_olmo3_adapter.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/unit/model_bridge/supported_architectures/test_olmo3_adapter.py diff --git a/tests/unit/model_bridge/supported_architectures/test_olmo3_adapter.py b/tests/unit/model_bridge/supported_architectures/test_olmo3_adapter.py new file mode 100644 index 000000000..9fef59891 --- /dev/null +++ b/tests/unit/model_bridge/supported_architectures/test_olmo3_adapter.py @@ -0,0 +1,24 @@ +"""Unit tests for Olmo3ArchitectureAdapter. + +The adapter body is `pass` — it inherits its config, component mapping, and +weight conversions unchanged from Olmo2ArchitectureAdapter (covered by +test_olmo2_adapter.py). The only contract this subclass owns is the subclass +relationship itself. +""" + +from transformer_lens.model_bridge.supported_architectures.olmo2 import ( + Olmo2ArchitectureAdapter, +) +from transformer_lens.model_bridge.supported_architectures.olmo3 import ( + Olmo3ArchitectureAdapter, +) + + +class TestOlmo3Inheritance: + """Subclass relationship to Olmo2ArchitectureAdapter. The class body is + `pass`, so the inherited surface is the contract worth pinning. A future + accidental override would be caught here. + """ + + def test_subclass_of_olmo2(self) -> None: + assert issubclass(Olmo3ArchitectureAdapter, Olmo2ArchitectureAdapter)