Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/run_shared_device_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ def run_experiment(
raise ExperimentError("task input state differs from prior policy readback")
request_id = f"policy-vector-replay-{index}"
task = {
"schema": "rlinf.control.task.v1",
"schema": "embodirun.control.task.v1",
"request_id": request_id,
"runtime_id": RUNTIME_ID,
"prompt": "pick up the blue cube and place it in the bowl",
Expand All @@ -964,7 +964,7 @@ def run_experiment(
"wait": True,
}
status, response = _http_json(server, "POST", "/v1/tasks", task)
if status != 200 or response.get("schema") != "rlinf.control.result.v1":
if status != 200 or response.get("schema") != "embodirun.control.result.v1":
raise ExperimentError(f"task {request_id} failed: {status} {response}")
if response.get("completed_steps") != 1:
raise ExperimentError(f"task {request_id} did not complete one policy step")
Expand Down Expand Up @@ -1031,7 +1031,7 @@ def run_experiment(
raise ExperimentError("no shared observation reached the consumer subscription")

report = {
"schema": "rlinf.example.shared_device_inference.v1",
"schema": "embodirun.example.shared_device_inference.v1",
"status": "software_complete",
"software_only": True,
"physical_robot": False,
Expand Down Expand Up @@ -1107,7 +1107,7 @@ def main(argv: Sequence[str] | None = None) -> int:
raise ExperimentError(f"EmbodiInfer endpoint is not healthy: {health!r}")
if args.preflight_only:
report = {
"schema": "rlinf.example.shared_device_inference.v1",
"schema": "embodirun.example.shared_device_inference.v1",
"status": "preflight_only",
"software_only": True,
"physical_robot": False,
Expand Down
5 changes: 2 additions & 3 deletions integrations/sglang_pi05/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

This optional package owns the LeRobot Pi05 checkpoint compatibility pipeline.
Install it only in the managed SGLang inference environment. The managed entry
point is `embodirun-sglang-pi05-serve`; the historical `rlinf-sglang-pi05-serve`
name remains a compatibility alias, and EmbodiRun's own `embodirun-sglang-serve`
launcher stays a thin wrapper in the root package.
point is `embodirun-sglang-pi05-serve`. EmbodiRun's own
`embodirun-sglang-serve` launcher stays a thin wrapper in the root package.
2 changes: 0 additions & 2 deletions integrations/sglang_pi05/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ dependencies = [

[project.scripts]
embodirun-sglang-pi05-serve = "embodirun_sglang_pi05.pi05:main"
# Compatibility alias for existing deployments.
rlinf-sglang-pi05-serve = "embodirun_sglang_pi05.pi05:main"

[tool.setuptools.packages.find]
where = ["src"]
4 changes: 0 additions & 4 deletions integrations/xlerobot_owner/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ video = ["aiortc>=1.14,<2"]
embodirun-xlerobot-owner = "embodirun_xlerobot_owner.__main__:main"
embodirun-xlerobot-joycon = "embodirun_xlerobot_owner.joycon_teleop:main"
embodirun-xlerobot-dualsense = "embodirun_xlerobot_owner.dualsense_drive:main"
# Compatibility aliases for existing deployments.
rlinf-xlerobot-owner = "embodirun_xlerobot_owner.__main__:main"
rlinf-xlerobot-joycon = "embodirun_xlerobot_owner.joycon_teleop:main"
rlinf-xlerobot-dualsense = "embodirun_xlerobot_owner.dualsense_drive:main"

[tool.setuptools.packages.find]
where = ["src"]
Expand Down
9 changes: 1 addition & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,8 @@ embodirun-control-serve = "embodirun.services.control.server:main"
embodirun-simulation-serve = "embodirun.services.simulation.server:main"
embodirun-sglang-serve = "embodirun.services.inference.adapters.sglang.pi05:main"
embodirun-go2-streamvln = "embodirun.bindings.unitree.go2.streamvln.cli:main"
# Compatibility aliases for existing deployments.
rlinf-deploy = "embodirun.services.host.cli.cli:main"
rlinf-control-serve = "embodirun.services.control.server:main"
rlinf-simulation-serve = "embodirun.services.simulation.server:main"
rlinf-sglang-serve = "embodirun.services.inference.adapters.sglang.pi05:main"
rlinf-go2-streamvln = "embodirun.bindings.unitree.go2.streamvln.cli:main"

[tool.setuptools]
py-modules = ["rlinf_deploy"]

[tool.setuptools.packages.find]
where = ["src"]
Expand All @@ -154,4 +147,4 @@ ignore = ["E501", "B905", "C408"]

[tool.ruff.lint.isort]
# The independently installed integration packages are first-party too.
known-first-party = ["embodirun", "embodirun_*", "rlinf_deploy"]
known-first-party = ["embodirun", "embodirun_*"]
8 changes: 4 additions & 4 deletions src/embodirun/application/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
from embodirun.model_services.providers import provider
from embodirun.robots.sensors import SensorInput

CONTROL_CONFIG_SCHEMA = "rlinf.control.config.v1"
TASK_REQUEST_SCHEMA = "rlinf.control.task.v1"
TASK_RESULT_SCHEMA = "rlinf.control.result.v1"
ERROR_SCHEMA = "rlinf.control.error.v1"
CONTROL_CONFIG_SCHEMA = "embodirun.control.config.v1"
TASK_REQUEST_SCHEMA = "embodirun.control.task.v1"
TASK_RESULT_SCHEMA = "embodirun.control.result.v1"
ERROR_SCHEMA = "embodirun.control.error.v1"


class ControlContractError(ValueError):
Expand Down
10 changes: 5 additions & 5 deletions src/embodirun/application/control_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ def _control_job_database(
) -> Path:
"""Choose one persistent, per-service job database under device state."""

configured = state_dir or os.environ.get("RLINF_DEPLOY_CONTROL_STATE_DIR")
configured = state_dir or os.environ.get("EMBODIRUN_CONTROL_STATE_DIR")
if configured is None:
manager = service.device_manager
if manager is None:
Expand All @@ -1352,7 +1352,7 @@ def _load_auth_policy(token_file: Path | None) -> AuthPolicy:

configured = token_file
if configured is None:
environment_path = os.environ.get("RLINF_DEPLOY_CONTROL_TOKEN_FILE")
environment_path = os.environ.get("EMBODIRUN_CONTROL_TOKEN_FILE")
configured = Path(environment_path).expanduser() if environment_path else None
if configured is None:
return AuthPolicy()
Expand All @@ -1379,11 +1379,11 @@ def _configured_recorder(
) -> ObservationRecorder | None:
configured_dir = recording_dir
if configured_dir is None:
environment_path = os.environ.get("RLINF_DEPLOY_CONTROL_RECORDING_DIR")
environment_path = os.environ.get("EMBODIRUN_CONTROL_RECORDING_DIR")
configured_dir = Path(environment_path).expanduser() if environment_path else None
if configured_dir is None:
return None
configured_id = recording_id or os.environ.get("RLINF_DEPLOY_CONTROL_RECORDING_ID", config.runtime_id)
configured_id = recording_id or os.environ.get("EMBODIRUN_CONTROL_RECORDING_ID", config.runtime_id)
expected_frames = tuple(item.name for item in config.inputs)
return ObservationRecorder(
store,
Expand Down Expand Up @@ -1693,7 +1693,7 @@ def _shutdown_client(client: Any) -> None:
def _package_version() -> str:
"""Report installed package metadata without inventing a source hash."""

for distribution in ("embodirun", "rlinf-deploy"):
for distribution in ("embodirun", "embodirun"):
try:
return package_version(distribution)
except PackageNotFoundError: # editable/source checkouts may lack metadata
Expand Down
4 changes: 2 additions & 2 deletions src/embodirun/application/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def submit(
worker = threading.Thread(
target=self._run_job,
args=(key,),
name=f"rlinf-job-{run_id}",
name=f"embodirun-job-{run_id}",
daemon=True,
)
self._workers[key] = worker
Expand Down Expand Up @@ -439,7 +439,7 @@ def cancel(self, caller_id: str, session_id: str, request_id: str) -> JobRecord:
callback_thread = threading.Thread(
target=self._run_cancel_callback,
args=(key, runtime, callback),
name=f"rlinf-job-cancel-{runtime.key.request_id}",
name=f"embodirun-job-cancel-{runtime.key.request_id}",
daemon=True,
)
# Register before starting so close() cannot release the SQLite
Expand Down
8 changes: 4 additions & 4 deletions src/embodirun/application/simulation/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
from dataclasses import dataclass
from typing import Any

SIMULATION_CONFIG_SCHEMA = "rlinf.simulation.config.v1"
EPISODE_REQUEST_SCHEMA = "rlinf.simulation.episode.v1"
EPISODE_RESULT_SCHEMA = "rlinf.simulation.result.v1"
ERROR_SCHEMA = "rlinf.simulation.error.v1"
SIMULATION_CONFIG_SCHEMA = "embodirun.simulation.config.v1"
EPISODE_REQUEST_SCHEMA = "embodirun.simulation.episode.v1"
EPISODE_RESULT_SCHEMA = "embodirun.simulation.result.v1"
ERROR_SCHEMA = "embodirun.simulation.error.v1"


class SimulationContractError(ValueError):
Expand Down
2 changes: 1 addition & 1 deletion src/embodirun/bindings/unitree/go2/streamvln/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def build_parser() -> argparse.ArgumentParser:
parser.add_argument("--username", required=True, help="SSH username")
parser.add_argument(
"--remote-root",
default=".local/share/rlinf-go2-agent",
default=".local/share/embodirun-go2-agent",
help="remote installation root, absolute or relative to the SSH user's home",
)
parser.add_argument("--connect-timeout", type=float, default=10.0)
Expand Down
2 changes: 1 addition & 1 deletion src/embodirun/deployment/operations/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

INFERENCE_REPOSITORY = "https://github.com/BUAA-CI-LAB/EmbodiInfer.git"

DEFAULT_MANAGED_ROOT = ".local/share/rlinf-deploy"
DEFAULT_MANAGED_ROOT = ".local/share/embodirun"


class InitError(RuntimeError):
Expand Down
5 changes: 1 addition & 4 deletions src/embodirun/deployment/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@
# project. Managed checkouts cloned before the rename keep working instead of
# forcing a fresh clone.
_REPOSITORY_ALIASES = {
"rlinf-deploy": "EmbodiRun",
"rlinf-inference": "EmbodiInfer",
"embodirun-internal": "EmbodiRun",
"embodiinfer-internal": "EmbodiInfer",
"embodirun": "EmbodiRun",
"embodirun-inference": "EmbodiInfer",
"embodiinfer": "EmbodiInfer",
}

Expand Down
2 changes: 1 addition & 1 deletion src/embodirun/deployment/supervisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from .plan import ServiceSpec

_SERVICE_ID = re.compile(r"[A-Za-z0-9][A-Za-z0-9_.-]*\Z")
_IDENTITY_ENVIRONMENT = "RLINF_DEPLOY_SERVICE_ID"
_IDENTITY_ENVIRONMENT = "EMBODIRUN_SERVICE_ID"
_REQUEST_LIMIT_BYTES = 1024 * 1024


Expand Down
4 changes: 2 additions & 2 deletions src/embodirun/devices/execution/arbitration.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def _raise_io_failure(result: IOResult) -> None:
# existing last-error surface; the structured IOResult remains
# available to callers that need scheduler context.
with contextlib.suppress(Exception):
result.error._rlinf_io_result = result
result.error._embodirun_io_result = result
raise result.error
if result.status is IOStatus.REJECTED and result.operation == "stop":
# Another stop is pending/running. The scheduler keeps a single
Expand Down Expand Up @@ -1013,7 +1013,7 @@ def _run(self) -> None:
if port_result is None:
port_result = getattr(error, "result", None)
if not isinstance(port_result, IOResult):
port_result = getattr(error, "_rlinf_io_result", None)
port_result = getattr(error, "_embodirun_io_result", None)
was_cancelled = ticket.cancel_event.is_set()
status = CommandStatus.CANCELLED if was_cancelled else CommandStatus.FAILED
with self._condition:
Expand Down
4 changes: 2 additions & 2 deletions src/embodirun/devices/execution/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def __init__(
self._preemptive_active = False
self._worker = threading.Thread(
target=self._run,
name=f"rlinf-device-io-{bus_id}",
name=f"embodirun-device-io-{bus_id}",
daemon=True,
)
self._worker.start()
Expand Down Expand Up @@ -411,7 +411,7 @@ def invoke() -> None:

threading.Thread(
target=invoke,
name=f"rlinf-device-preemptive-stop-{self.bus_id}",
name=f"embodirun-device-preemptive-stop-{self.bus_id}",
daemon=True,
).start()
if not done.wait(wait_timeout):
Expand Down
4 changes: 2 additions & 2 deletions src/embodirun/devices/execution/teleop.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
resolve_axes_action as resolve_so101_axes_action,
)

TELEOP_AXES_ACTION_SPACE = "rlinf.teleop.axes.v1"
TELEOP_AXES_ACTION_SPACE = "embodirun.teleop.axes.v1"
_ROBOT_KIND_ALIASES = {
"arx5": "arx.x5",
"arx.x5": "arx.x5",
Expand Down Expand Up @@ -158,7 +158,7 @@ def main(argv: list[str] | None = None) -> int:
from .inputs import ControlInputBridge, JoystickInput, KeyboardInput

parser = argparse.ArgumentParser(
prog="rlinf-control-teleop",
prog="embodirun-control-teleop",
description=(
"Poll keyboard and optional joystick input and forward manual control "
"requests to the loopback control service. Keyboard commands: space "
Expand Down
4 changes: 2 additions & 2 deletions src/embodirun/devices/lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def __init__(
self.owner_id = owner_id or f"control:{os.getpid()}"
explicit_lock_dir = lock_dir is not None
self.lock_dir = Path(
lock_dir or os.environ.get("RLINF_DEPLOY_DEVICE_LOCK_DIR", "/tmp/rlinf-deploy-device-locks")
lock_dir or os.environ.get("EMBODIRUN_DEVICE_LOCK_DIR", "/tmp/embodirun-device-locks")
).expanduser()
if state_path is None:
if explicit_lock_dir:
Expand All @@ -446,7 +446,7 @@ def __init__(
Path.home() / ".local" / "state",
)
).expanduser()
state_path = state_root / "rlinf-deploy" / "device-state.json"
state_path = state_root / "embodirun" / "device-state.json"
self.state_store = DeviceStateStore(state_path)
self._records: dict[str, _Record] = {}
self._unresolved = self.state_store.load()
Expand Down
10 changes: 5 additions & 5 deletions src/embodirun/devices/observations/producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ def default_interval_s() -> float:
A poll costs roughly 20 ms on a Pi 4B, so 0.03 s yields a ~50 ms period and
reaches 20 Hz.

Override with ``RLINF_DEPLOY_OBSERVATION_INTERVAL_S``; invalid values fall
Override with ``EMBODIRUN_OBSERVATION_INTERVAL_S``; invalid values fall
back to the default.
"""

raw = os.environ.get("RLINF_DEPLOY_OBSERVATION_INTERVAL_S", "0.03")
raw = os.environ.get("EMBODIRUN_OBSERVATION_INTERVAL_S", "0.03")
try:
value = float(raw)
except ValueError:
Expand Down Expand Up @@ -76,7 +76,7 @@ def __init__(self, capture: Callable[[], Any], name: str) -> None:
self._stop = False
self._thread = threading.Thread(
target=self._run,
name=f"rlinf-observation-source-{name}",
name=f"embodirun-observation-source-{name}",
daemon=True,
)
self._thread.start()
Expand Down Expand Up @@ -362,7 +362,7 @@ def start(self) -> ObservationProducer:
self._stop_event.clear()
self._thread = threading.Thread(
target=self._run,
name="rlinf-observation-producer",
name="embodirun-observation-producer",
daemon=True,
)
self._thread.start()
Expand Down Expand Up @@ -932,7 +932,7 @@ def run() -> None:
except BaseException as error: # pragma: no cover - defensive cleanup path
result[0] = error

thread = threading.Thread(target=run, name="rlinf-observation-close", daemon=True)
thread = threading.Thread(target=run, name="embodirun-observation-close", daemon=True)
thread.start()
thread.join(max(0.0, timeout_s))
return (not thread.is_alive(), result[0])
Expand Down
2 changes: 1 addition & 1 deletion src/embodirun/devices/recording.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def start(self) -> ObservationRecorder:
raise RecordingError(str(error)) from error
self._thread = threading.Thread(
target=self._run,
name=f"rlinf-observation-recorder-{self.recording_id}",
name=f"embodirun-observation-recorder-{self.recording_id}",
daemon=True,
)
self._thread.start()
Expand Down
4 changes: 2 additions & 2 deletions src/embodirun/robots/sensors/cameras/v4l2/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ def _camera_buffer_size() -> int:
caps delivery at 10.00 fps while 2 (or more) reaches 20.00 fps. Two buffers
keep the configured rate and cost only one frame of freshness.

Override with ``RLINF_DEPLOY_CAMERA_BUFFERSIZE``; values below 1 fall back to
Override with ``EMBODIRUN_CAMERA_BUFFERSIZE``; values below 1 fall back to
the default.
"""

raw = os.environ.get("RLINF_DEPLOY_CAMERA_BUFFERSIZE", "2")
raw = os.environ.get("EMBODIRUN_CAMERA_BUFFERSIZE", "2")
try:
value = int(raw)
except ValueError:
Expand Down
7 changes: 3 additions & 4 deletions src/embodirun/services/control/http_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,8 @@ def _propose_args(

def _identity(self, headers: Mapping[str, str], token: str | None) -> tuple[str, str]:
# ``x-embodirun-*`` are the canonical identity headers; the legacy
# ``x-rlinf-*`` names stay accepted for existing deployments.
caller = _first_header(headers, "x-embodirun-caller-id", "x-rlinf-caller-id", "x-caller-id")
session = _first_header(headers, "x-embodirun-session-id", "x-rlinf-session-id", "x-session-id")
caller = _first_header(headers, "x-embodirun-caller-id", "x-caller-id")
session = _first_header(headers, "x-embodirun-session-id", "x-session-id")
if self.application.auth.token_authentication_enabled:
# Let the application report the normal 401 for a missing token;
# scope headers are required once a token is actually present.
Expand Down Expand Up @@ -435,7 +434,7 @@ def _token(headers: Mapping[str, str]) -> str | None:
if len(parts) != 2 or parts[0].lower() != "bearer" or not parts[1].strip():
raise AuthenticationError("authorization must use a Bearer token")
return parts[1].strip()
return _first_header(headers, "x-embodirun-token", "x-rlinf-token", "x-control-token")
return _first_header(headers, "x-embodirun-token", "x-control-token")


def _optional(mapping: Mapping[str, Any], name: str) -> str | None:
Expand Down
2 changes: 1 addition & 1 deletion src/embodirun/services/host/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def build_parser() -> argparse.ArgumentParser:
parser.add_argument(
"--state-dir",
type=Path,
help=("local state directory (default: ~/.local/state/rlinf-deploy, kept for compatibility)"),
help=("local state directory (default: ~/.local/state/embodirun, kept for compatibility)"),
)
commands = parser.add_subparsers(dest="command", required=True)
validate.register(commands)
Expand Down
2 changes: 1 addition & 1 deletion src/embodirun/services/host/cli/command/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def register(commands: Any) -> None:
)
parser.add_argument(
"--root",
default=".local/share/rlinf-deploy",
default=".local/share/embodirun",
help="managed directory on each node, relative to its home by default",
)
parser.set_defaults(command_handler=run)
Expand Down
2 changes: 1 addition & 1 deletion src/embodirun/services/host/cli/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def executor(self, node_id: str) -> Iterator[Executor]:


def state_path(directory: Path | None, deployment_name: str) -> Path:
root = Path.home() / ".local" / "state" / "rlinf-deploy" if directory is None else directory.expanduser()
root = Path.home() / ".local" / "state" / "embodirun" if directory is None else directory.expanduser()
return root / f"{deployment_name}.json"


Expand Down
Loading