VLAarchtests / tests /test_proposal_semantic_diversity.py
lsnu's picture
2026-03-25 runpod handoff update
e7d8e79 verified
import numpy as np
from sim_reveal.procedural_envs import BAG_PROXY, make_proxy_env
def test_proposal_semantic_diversity():
env = make_proxy_env(proxy_name=BAG_PROXY.name, resolution=32, seed=7, rollout_horizon=4)
_, _ = env.reset(seed=7)
teacher_chunk, _ = env.teacher_chunk_and_rollout(chunk_horizon=4, rollout_horizon=4)
candidates, outcomes = env.sample_candidate_action_chunks(
teacher_chunk=teacher_chunk,
num_candidates=6,
rollout_horizon=4,
)
assert candidates.shape[0] == 6
assert len(set(outcomes["candidate_macro_names"])) >= 4
assert len(set(outcomes["candidate_negative_families"])) >= 3
assert float(np.std(outcomes["candidate_utility"])) > 0.0