mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-21 19:49:49 +00:00
Update docs/source/env_processor.mdx
Co-authored-by: Khalil Meftah <khalil.meftah@huggingface.co> Signed-off-by: Pepijn <138571049+pkooij@users.noreply.github.com>
This commit is contained in:
@@ -338,7 +338,22 @@ def make_env_pre_post_processors(env_cfg: EnvConfig):
|
|||||||
|
|
||||||
postprocessor = PolicyProcessorPipeline(steps=[])
|
postprocessor = PolicyProcessorPipeline(steps=[])
|
||||||
return preprocessor, postprocessor
|
return preprocessor, postprocessor
|
||||||
```
|
### 2. Update Your `EnvConfig` Subclass
|
||||||
|
|
||||||
|
```python
|
||||||
|
# In src/lerobot/envs/configs.py
|
||||||
|
@EnvConfig.register_subclass("myenv")
|
||||||
|
@dataclass
|
||||||
|
class MyEnvConfig(EnvConfig):
|
||||||
|
# ... task/features/gym kwargs ...
|
||||||
|
|
||||||
|
def get_env_processors(self):
|
||||||
|
from lerobot.processor.pipeline import PolicyProcessorPipeline
|
||||||
|
|
||||||
|
return (
|
||||||
|
PolicyProcessorPipeline(steps=[MyEnvProcessorStep()]),
|
||||||
|
PolicyProcessorPipeline(steps=[]),
|
||||||
|
)
|
||||||
|
|
||||||
### 3. Use in Evaluation
|
### 3. Use in Evaluation
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user