Skip to content

[python] Use Python writes for LeRobot OSS companion tables - #11550

Open
XiaoHongbo-Hope wants to merge 4 commits into
apache:masterfrom
XiaoHongbo-Hope:python-lerobot-oss-jindo-write-fallback
Open

XiaoHongbo-Hope wants to merge 4 commits into
apache:masterfrom
XiaoHongbo-Hope:python-lerobot-oss-jindo-write-fallback

Conversation

@XiaoHongbo-Hope

@XiaoHongbo-Hope XiaoHongbo-Hope commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Change

Use Python writing and committing for OSS-backed LeRobot Episodes and Datasets tables. Native Jindo rejects directory creation and manifest writes. Select from each companion table's resolved path for imports, appends, and direct writers; leave Frames, non-OSS tables, and reads unchanged. Overrides are temporary and do not alter table properties.

Validation

  • LeRobot aggregate tests: 118 passed, 123 skipped.
  • Direct writer tests: 28 passed. Injected Jindo write and commit failures reproduce without the respective fallback.
  • Flake8 error checks and git diff --check passed.
  • Live DLF/Jindo import has not been run.

@JingsongLi JingsongLi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed commit ec99d9e89f.

}
if str(frames_table.table_path).startswith("oss://"):
# The native Jindo writer cannot create directories on OSS.
options["write.native.enabled"] = "false"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Route Jindo commits through Python too

Eligible REST catalog tables still use the Rust committer because commit.native.enabled defaults to true. The Python writer stages the companion data files. The Rust committer then fails with Jindo write is not supported while writing the manifest. I reproduced this with a simulated REST catalog and pypaimon-rust 0.5.0. Setting commit.native.enabled=false let the same Datasets table publish snapshot 1. Please apply the fallback to both writer and committer selection, and cover a non-empty commit in the regression test.

"row-tracking.enabled": "true",
"data-evolution.enabled": "true",
}
if str(frames_table.table_path).startswith("oss://"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Apply the fallback when reopening existing companion tables

This guard runs during table creation. append_to_lerobot reloads existing companions from the catalog, so tables created before native execution became the default can still select the Rust writer. I reproduced Jindo create_dir is not supported when appending to a reopened Episodes table with those options. Please apply the Jindo check when selecting the write backend so existing companion tables get the fallback as well.

for call in catalog.create_table.call_args_list:
options = call.args[1].options
assert options.get("write.native.enabled") == native_write
assert CoreOptions(Options(options)).native_write_enabled() == (native_write is None)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Keep this assertion independent of the CI execution mode

When PYPAIMON_TEST_EXECUTION=python, the autouse fixture supplies False as the default for CoreOptions.native_write_enabled(). The file:// case then fails because this assertion expects True. I reproduced the failure on Python 3.11. The schema option assertion on the previous line already verifies what this change sets for both paths.

@XiaoHongbo-Hope XiaoHongbo-Hope changed the title [python] Avoid native Jindo writes for LeRobot metadata tables [python] Use Python writes for LeRobot OSS companion tables Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants