Skip to content

serialize with --features=HalfKP no longer works #234

@jdart1

Description

@jdart1

This used to work (as of commit 40ed594 it did), but no longer does. It looks like it now assumes there are PSQT features.
There may be other dependencies on a PSQT-enabled network, for example in the trainer.

jdart@bunny:~/chess/nnue-pytorch$ python3 serialize.py --features=HalfKP arasan-d10-20220723.nnue arasan-d10-20220723.pt
Converting arasan-d10-20220723.nnue to arasan-d10-20220723.pt
Traceback (most recent call last):
  File "/home/jdart/chess/nnue-pytorch/serialize.py", line 253, in <module>
    main()
  File "/home/jdart/chess/nnue-pytorch/serialize.py", line 236, in main
    reader = NNUEReader(f, feature_set)
  File "/home/jdart/chess/nnue-pytorch/serialize.py", line 144, in __init__
    self.model = M.NNUE(feature_set)
  File "/home/jdart/chess/nnue-pytorch/model.py", line 162, in __init__
    self._init_layers()
  File "/home/jdart/chess/nnue-pytorch/model.py", line 177, in _init_layers
    self._init_psqt()
  File "/home/jdart/chess/nnue-pytorch/model.py", line 185, in _init_psqt
    initial_values = self.feature_set.get_initial_psqt_features()
  File "/home/jdart/chess/nnue-pytorch/feature_set.py", line 119, in get_initial_psqt_features
    init += feature.get_initial_psqt_features()
  File "/home/jdart/chess/nnue-pytorch/halfkp.py", line 33, in get_initial_psqt_features
    raise Exception('Not supported yet. See HalfKA')
Exception: Not supported yet. See HalfKA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions