Summary
ComparerCollection.save() on a match(NodeObservation, NetworkModelResult) result produces a .msk file that fails to load. ComparerCollection.load() raises:
NotImplementedError: Unknown gtype: node
at comparison/_comparison.py:1425.
Root cause
GeometryType.NODE (src/modelskill/types.py:18) is wired correctly into most of the Comparer API:
Comparer._to_observation() (_comparison.py:778-812) has an explicit elif self.gtype == "node" branch.
Comparer.to_dataframe() (lines 1321-1345) has an explicit NODE branch.
But the save/load round trip was never updated:
Comparer.save() (lines 1347-1374) only special-cases gtype == "point" (line 1364) to flatten raw_mod_data into the netcdf. NODE data silently loses its raw model data on save.
Comparer.load() (lines 1376-1425) dispatches on data.gtype with branches for "track", "vertical", and "point", then falls into else: raise NotImplementedError(f"Unknown gtype: {data.gtype}") for "node".
ComparerCollection.save()/load() (comparison/_collection.py:829-897) just zip/unzip a per-Comparer netcdf file and delegate to Comparer.save()/Comparer.load(), so the gap surfaces there too.
Why this matters
Some users persist a ComparerCollection per calibration trial as a .msk file. As things stand, switching such a workflow to the new network-results path breaks that archiving outright.
Suggested fix
Add a node branch to Comparer.load() that reconstructs NodeModelResult from any _raw_* variables, mirroring the existing point branch, and extend Comparer.save()'s raw-data flattening to also cover gtype == "node".
Found by a test user evaluating the network functionality ahead of a 1.4.0 release.
Summary
ComparerCollection.save()on amatch(NodeObservation, NetworkModelResult)result produces a.mskfile that fails to load.ComparerCollection.load()raises:at
comparison/_comparison.py:1425.Root cause
GeometryType.NODE(src/modelskill/types.py:18) is wired correctly into most of theComparerAPI:Comparer._to_observation()(_comparison.py:778-812) has an explicitelif self.gtype == "node"branch.Comparer.to_dataframe()(lines 1321-1345) has an explicit NODE branch.But the save/load round trip was never updated:
Comparer.save()(lines 1347-1374) only special-casesgtype == "point"(line 1364) to flattenraw_mod_datainto the netcdf. NODE data silently loses its raw model data on save.Comparer.load()(lines 1376-1425) dispatches ondata.gtypewith branches for"track","vertical", and"point", then falls intoelse: raise NotImplementedError(f"Unknown gtype: {data.gtype}")for"node".ComparerCollection.save()/load()(comparison/_collection.py:829-897) just zip/unzip a per-Comparernetcdf file and delegate toComparer.save()/Comparer.load(), so the gap surfaces there too.Why this matters
Some users persist a
ComparerCollectionper calibration trial as a.mskfile. As things stand, switching such a workflow to the new network-results path breaks that archiving outright.Suggested fix
Add a
nodebranch toComparer.load()that reconstructsNodeModelResultfrom any_raw_*variables, mirroring the existingpointbranch, and extendComparer.save()'s raw-data flattening to also covergtype == "node".Found by a test user evaluating the network functionality ahead of a 1.4.0 release.