Repository navigation
[python] Use Python writes for LeRobot OSS companion tables - #11550
XiaoHongbo-Hope wants to merge 4 commits into
Conversation
JingsongLi
left a comment
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
[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://"): |
There was a problem hiding this comment.
[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) |
There was a problem hiding this comment.
[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.
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
git diff --checkpassed.