mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 10:16:09 +00:00
fixing stale assertion
This commit is contained in:
@@ -77,7 +77,7 @@ def test_config_validates_features_model_ids_and_saved_auto_route(tmp_path):
|
|||||||
FastWAMConfig(tokenizer_model_id="somebody/other-tokenizer")
|
FastWAMConfig(tokenizer_model_id="somebody/other-tokenizer")
|
||||||
|
|
||||||
|
|
||||||
def test_preprocessor_normalizes_images_and_postprocessor_toggles_actions(tmp_path):
|
def test_preprocessor_passes_images_through_and_postprocessor_toggles_actions(tmp_path):
|
||||||
cfg = FastWAMConfig(
|
cfg = FastWAMConfig(
|
||||||
action_dim=3,
|
action_dim=3,
|
||||||
proprio_dim=2,
|
proprio_dim=2,
|
||||||
@@ -127,8 +127,9 @@ def test_preprocessor_normalizes_images_and_postprocessor_toggles_actions(tmp_pa
|
|||||||
postprocessor.save_pretrained(tmp_path, config_filename="policy_postprocessor.json")
|
postprocessor.save_pretrained(tmp_path, config_filename="policy_postprocessor.json")
|
||||||
_, loaded_postprocessor = make_pre_post_processors(cfg, pretrained_path=str(tmp_path))
|
_, loaded_postprocessor = make_pre_post_processors(cfg, pretrained_path=str(tmp_path))
|
||||||
|
|
||||||
|
# VISUAL normalization is IDENTITY
|
||||||
expected_image = torch.tensor(
|
expected_image = torch.tensor(
|
||||||
[[[[-1.0, 0.0], [1.0, 0.0]], [[-1.0, 0.0], [1.0, 0.0]], [[-1.0, 0.0], [1.0, 0.0]]]]
|
[[[[0.0, 0.5], [1.0, 0.5]], [[0.0, 0.5], [1.0, 0.5]], [[0.0, 0.5], [1.0, 0.5]]]]
|
||||||
)
|
)
|
||||||
assert preprocessor.name == "policy_preprocessor"
|
assert preprocessor.name == "policy_preprocessor"
|
||||||
assert postprocessor.name == "policy_postprocessor"
|
assert postprocessor.name == "policy_postprocessor"
|
||||||
|
|||||||
Reference in New Issue
Block a user