镜像自地址
https://github.com/MINT-SJTU/Evo-RL.git
已同步 2026-11-20 18:17:06 +00:00
chore(ci): make quality checks pass across repo
- fix ruff violations in dataset, recording, and value modules - fix typos findings and markdown/workflow lint issues - update pages workflow checkout to disable credential persistence - apply pre-commit auto-formatting and EOF normalization - include requested repo housekeeping updates (.gitignore and README)
这个提交包含在:
@ -9,7 +9,9 @@ def test_contiguous_distributed_eval_sampler_has_contiguous_shards_with_tail_pad
|
||||
|
||||
shards: list[list[int]] = []
|
||||
for rank in range(world_size):
|
||||
sampler = ContiguousDistributedEvalSampler(dataset_size=dataset_size, num_replicas=world_size, rank=rank)
|
||||
sampler = ContiguousDistributedEvalSampler(
|
||||
dataset_size=dataset_size, num_replicas=world_size, rank=rank
|
||||
)
|
||||
shard = list(iter(sampler))
|
||||
shards.append(shard)
|
||||
assert len(shard) == len(sampler) == 4
|
||||
@ -30,7 +32,9 @@ def test_contiguous_distributed_eval_sampler_handles_more_ranks_than_samples():
|
||||
|
||||
shards: list[list[int]] = []
|
||||
for rank in range(world_size):
|
||||
sampler = ContiguousDistributedEvalSampler(dataset_size=dataset_size, num_replicas=world_size, rank=rank)
|
||||
sampler = ContiguousDistributedEvalSampler(
|
||||
dataset_size=dataset_size, num_replicas=world_size, rank=rank
|
||||
)
|
||||
shard = list(iter(sampler))
|
||||
shards.append(shard)
|
||||
assert len(shard) == len(sampler) == 1
|
||||
|
||||
@ -13,8 +13,7 @@ from lerobot.configs.value import (
|
||||
ValueInferencePipelineConfig,
|
||||
ValueInferenceVizConfig,
|
||||
)
|
||||
from lerobot.scripts import lerobot_value_infer as value_infer
|
||||
from lerobot.scripts import value_infer_viz
|
||||
from lerobot.scripts import lerobot_value_infer as value_infer, value_infer_viz
|
||||
|
||||
|
||||
class _FakeHFDataset:
|
||||
|
||||
@ -10,8 +10,6 @@ from torch import nn
|
||||
|
||||
import lerobot.processor.tokenizer_processor as tokenizer_processor
|
||||
import lerobot.values.pistar06.modeling_pistar06 as pistar06_modeling
|
||||
import lerobot.values.pistar06.processor_pistar06 as pistar06_processor
|
||||
from lerobot.configs.value_train import ValueTargetsConfig
|
||||
from lerobot.utils.constants import OBS_LANGUAGE_ATTENTION_MASK, OBS_LANGUAGE_TOKENS, OBS_STATE
|
||||
from lerobot.values.pistar06.configuration_pistar06 import Pistar06Config
|
||||
from lerobot.values.pistar06.modeling_pistar06 import (
|
||||
@ -95,10 +93,7 @@ class _DummyAutoModel:
|
||||
@classmethod
|
||||
def from_pretrained(cls, repo_id, **kwargs):
|
||||
output_loading_info = bool(kwargs.pop("output_loading_info", False))
|
||||
if "siglip" in repo_id.lower():
|
||||
model = _DummyVisionModel()
|
||||
else:
|
||||
model = _DummyLanguageModel()
|
||||
model = _DummyVisionModel() if "siglip" in repo_id.lower() else _DummyLanguageModel()
|
||||
if output_loading_info:
|
||||
return model, {"missing_keys": [], "unexpected_keys": [], "mismatched_keys": []}
|
||||
return model
|
||||
|
||||
在新工单中引用
屏蔽一个用户