Skip to content

X-VLA LIBERO: Duplicated Steps in Environment and Policy PreProcessor during Eval #2955

@gianlucageraci

Description

@gianlucageraci

Ticket Type

🐛 Bug Report (Something isn't working)

Environment & System Info

Description

Note that this issue coincides heavily with #2954.

I identified a redundancy in the preprocessing pipeline when evaluating the XVLA policy within the LIBERO environment.

The pipeline instantiates two processor chains:

  1. Environment Preprocessor: via make_env_pre_post_processorsmake_xvla_libero_pre_post_processors
  2. Policy Preprocessor: via make_pre_post_processorsmake_xvla_pre_post_processors

Both chains currently append XVLAImageNetNormalizeProcessorStep and XVLAAddDomainIdProcessorStep. Because the pipeline executes Env PreprocessorPolicy Preprocessor, these transformations are applied twice to the input observations.

Reproduction / Code Analysis

The duplication occurs in lerobot/policies/xvla/processor_xvla.py.

1. Environment-Specific Processor (make_xvla_libero_pre_post_processors)
Adds normalization and domain ID:

def make_xvla_libero_pre_post_processors() -> tuple[...]:
    # ...
    pre_processor_steps.extend(
        [LiberoProcessorStep(), XVLAImageNetNormalizeProcessorStep(), XVLAAddDomainIdProcessorStep()]
    )
    # ...
  1. General Policy Processor (make_xvla_pre_post_processors) Also adds normalization and domain ID:
def make_xvla_pre_post_processors(...) -> tuple[...]:
    # ...
    input_steps = [
        # ...
        XVLAImageToFloatProcessorStep(),
        XVLAImageNetNormalizeProcessorStep(), # DUPLICATE
        XVLAAddDomainIdProcessorStep(),       # DUPLICATE
        # ...
    ]

This leads to double normalization which in turns leads to erroneous input values and redundant processing.

Suggested Fix

Remove the general XVLA steps from the environment-specific processor (make_xvla_libero_pre_post_processors). It should likely only handle LiberoProcessorStep and leave the standard normalization to the policy processor.

def make_xvla_libero_pre_post_processors() -> tuple[...]:
    # ...
    # Removed XVLAImageNetNormalizeProcessorStep and XVLAAddDomainIdProcessorStep
    pre_processor_steps.extend(
        [LiberoProcessorStep()]
    )
    # ...

Additional Remarks

Currently this issue is mitigated when directly evaluating the pre-trained lerobot/xvla-libero checkpoint available on huggingface as the checkpoint there does not include the XVLAImageToFloatProcessorStep and the XVLAImageNetNormalizeProcessorStep (which I think is incorrect, see #2954).
When I first finetuned lerobot/xvla-libero on LIBERO with the additional XVLAImageToFloatProcessorStep and the XVLAImageNetNormalizeProcessorStep steps in the preprocessing pipeline and then evaluated this model I ran into the double normalization error which led to negative input values.

Context & Reproduction

No response

Relevant logs or stack trace

Checklist

  • I have searched existing tickets to ensure this isn't a duplicate.
  • I am using the latest version of the main branch.
  • I have verified this is not an environment-specific problem.

Additional Info / Workarounds

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn’t working correctlyevaluationFor issues or PRs related to environment evaluation, and benchmarks.policiesItems related to robot policiesprocessorIssue related to processor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions