mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 10:16:09 +00:00
docs(configs): clarify the is_remote_target/is_remote split
Add a comment explaining why JobConfig keeps both the staticmethod (tests a raw target string from argv before a config exists) and the property (accessor for an existing config instance).
This commit is contained in:
@@ -142,6 +142,9 @@ class JobConfig:
|
|||||||
# Hub. A "lerobot" tag is always added; e.g. --job.tags '["lelab"]' adds more.
|
# Hub. A "lerobot" tag is always added; e.g. --job.tags '["lelab"]' adds more.
|
||||||
tags: list[str] = field(default_factory=list)
|
tags: list[str] = field(default_factory=list)
|
||||||
|
|
||||||
|
# Two entry points to the same predicate: the staticmethod tests a raw target string
|
||||||
|
# straight from argv (before any JobConfig exists, to decide dispatch early), while the
|
||||||
|
# property is the ergonomic accessor for code that already holds a config instance.
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_remote_target(target: str | None) -> bool:
|
def is_remote_target(target: str | None) -> bool:
|
||||||
"""True when `target` names an HF Jobs flavor rather than a local run."""
|
"""True when `target` names an HF Jobs flavor rather than a local run."""
|
||||||
|
|||||||
Reference in New Issue
Block a user