yuuu94's picture
Add 6k matching source and deployment configuration
b5511a3 verified
Raw History Blame Contribute Delete
753 Bytes
import hashlib
from pathlib import Path
from work.graphvla_tcp_20261020.contracts import array_digest, validate_masks
from work.graphvla_tcp_20261020.contracts import check_graph_config as check_base
from .visual_patch import MODE
def pooling_contract():
root=Path(__file__).parent
return hashlib.sha256(b''.join((root/n).read_bytes() for n in ('visual_patch.py','masks.py','framework.py','geometry.py','runtime.py'))).hexdigest()
def check_graph_config(config,recipe):
check_base(config,recipe)
if config.get('visual_pooling')!=MODE or config.get('visual_pooling_contract')!=pooling_contract():
raise ValueError('Requires matching V7 coverage-weighted config and source contract; V5 center/V6 uniform checkpoints are not V7')