mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-28 12:15:59 +00:00
docs(env_processor): rename step 2 and fix policy_cfg examples
- Rename '### 2. Update the Factory' → '### 2. Update Your EnvConfig Subclass' - Update factory usage examples to use keyword-argument style with policy_cfg parameter for both SmolVLA and ACT cases Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -316,24 +316,6 @@ class MyEnvProcessorStep(ObservationProcessorStep):
|
|||||||
return processed
|
return processed
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Update the Factory
|
|
||||||
|
|
||||||
```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=[]),
|
|
||||||
)
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. Update Your `EnvConfig` Subclass
|
### 2. Update Your `EnvConfig` Subclass
|
||||||
|
|
||||||
```python
|
```python
|
||||||
@@ -342,8 +324,10 @@ class MyEnvConfig(EnvConfig):
|
|||||||
@dataclass
|
@dataclass
|
||||||
class MyEnvConfig(EnvConfig):
|
class MyEnvConfig(EnvConfig):
|
||||||
# ... task/features/gym kwargs ...
|
# ... task/features/gym kwargs ...
|
||||||
|
|
||||||
def get_env_processors(self):
|
def get_env_processors(self):
|
||||||
from lerobot.processor.pipeline import PolicyProcessorPipeline
|
from lerobot.processor.pipeline import PolicyProcessorPipeline
|
||||||
|
|
||||||
return (
|
return (
|
||||||
PolicyProcessorPipeline(steps=[MyEnvProcessorStep()]),
|
PolicyProcessorPipeline(steps=[MyEnvProcessorStep()]),
|
||||||
PolicyProcessorPipeline(steps=[]),
|
PolicyProcessorPipeline(steps=[]),
|
||||||
|
|||||||
Reference in New Issue
Block a user