vice versa) actually shows up as an assertion failure.
Line: 402
|
def setUpClass(cls) -> None: |
|
# Build two single-task models with the same architecture but |
|
# different seeds. Distinct seeds matter so that a head-routing |
|
# bug (loading head_b's weights when head_a is requested, or |
|
# vice versa) actually shows up as an assertion failure. |
|
cls.model_a, params_a = _build_model_and_params(rcut=4.0, seed=42) |
|
cls.model_b, params_b = _build_model_and_params(rcut=4.0, seed=7) |
|
cls.models = {"head_a": cls.model_a, "head_b": cls.model_b} |
|
cls.model_params = {"model_dict": {"head_a": params_a, "head_b": params_b}} |
|
|
|
cls.pt_path = tempfile.NamedTemporaryFile(suffix=".pt", delete=False).name |
vice versa) actually shows up as an assertion failure.
Line: 402
deepmd-kit/source/tests/pt_expt/infer/test_deep_eval_pt_checkpoint.py
Lines 399 to 409 in c38dc00