unidroid-cli 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,196 @@
1
+ Metadata-Version: 2.5
2
+ Name: unidroid-cli
3
+ Version: 0.3.0
4
+ Summary: udcli - the Unidroid command line: auth, account, challenge, submission, bench, dataset and validator
5
+ License: MIT
6
+ Requires-Python: >=3.10
7
+ Requires-Dist: httpx>=0.27
8
+ Requires-Dist: huggingface-hub>=0.25
9
+ Requires-Dist: pyyaml>=6
10
+ Requires-Dist: rich>=13
11
+ Requires-Dist: typer>=0.12
12
+ Provides-Extra: dev
13
+ Requires-Dist: py-sr25519-bindings>=0.2; extra == 'dev'
14
+ Requires-Dist: pytest>=8; extra == 'dev'
15
+ Requires-Dist: ruff>=0.4; extra == 'dev'
16
+ Provides-Extra: wallet
17
+ Requires-Dist: bittensor-wallet>=4.0; extra == 'wallet'
18
+ Description-Content-Type: text/markdown
19
+
20
+ # udcli - Unidroid CLI
21
+
22
+ Submit robotics models (VLAs, WAMs, world models) to [Unidroid](https://unidroid.ai) challenges,
23
+ manage your account, evaluate locally and use BenchHub.
24
+
25
+ ```bash
26
+ pip install unidroid-cli # core
27
+ pip install "unidroid-cli[wallet]" # needed for submission submit / account coldkey register
28
+ ```
29
+
30
+ Env: `UNIDROID_API_URL` (`https://api.unidroid.ai`), `UNIDROID_API_KEY`, `UNIDROID_HOME` (`~/.unidroid`),
31
+ `UNIDROID_CACHE_DIR` (`~/.unidroid/bench-cache`), `HF_TOKEN`. Without `UNIDROID_API_URL` or `--api-url`,
32
+ `udcli` talks to `https://api.unidroid.ai`. `~/.unidroid/credentials.json` is written atomically and limited to
33
+ your user.
34
+
35
+ Commands that cannot be undone (`account coldkey remove`, `auth keys delete`, `dataset discard`,
36
+ `dataset archive`) ask first; pass `--yes` / `-y` to skip the question in scripts.
37
+
38
+ ## Commands
39
+
40
+ Commands are grouped by what they act on, like the Hugging Face `hf` CLI. `udcli <group>` (or `-h` at any level)
41
+ lists what a group can do.
42
+
43
+ | Group | Commands | For |
44
+ | --- | --- | --- |
45
+ | `auth` | `login`, `logout`, `whoami`, `keys list\|create\|revoke\|delete`, `hf set\|status\|remove` | Who you are, API keys, the Hugging Face read token |
46
+ | `account` | `balance`, `ledger`, `claim`, `coldkey list\|register\|remove` | Platform balance, TAO deposits, coldkeys |
47
+ | `challenge` | `list`, `show`, `leaderboard` | Browsing challenges |
48
+ | `submission` | `hash`, `push`, `check`, `eval`, `submit`, `resume`, `list`, `show` | Your entries, from preparing to results |
49
+ | `bench` | `list`, `info`, `download`, `upload`, `link`, `status`, `cache list\|info\|clear` | BenchHub benchmarks |
50
+ | `dataset` | `list`, `info`, `mine`, `buy`, `download`, `upload`, `media`, `uploads`, `discard`, `set-price`, `edit`, `pending`, `approve`, `reject`, `archive`, `restore` | Datasets for sale |
51
+ | `validator` | `pending`, `fetch` | Validator accounts |
52
+
53
+ `--api-key` and `--api-url` work on every command, before or after the subcommand. They apply only to
54
+ that run, so you can use another account without `udcli auth login` and without replacing the saved key.
55
+ `UNIDROID_API_KEY` does the same when the flag is omitted. List commands accept `--json`.
56
+
57
+ ## Miner quick start
58
+
59
+ ```bash
60
+ udcli auth login # optional: save an API key from unidroid.ai/account/api-keys
61
+ udcli account balance --api-key unidroid_... # or pass the key on any command; overrides login
62
+ udcli auth hf set # read-only HF token for validators
63
+ udcli account coldkey register --wallet miner
64
+ udcli account coldkey remove <ss58> # or: --wallet miner
65
+ udcli account balance # shows the address to send TAO to
66
+ # After transferring TAO from that coldkey:
67
+ udcli account claim 9092713-0006 # extrinsic id from the block explorer
68
+
69
+ udcli challenge list
70
+ udcli challenge show pi05-libero-s1
71
+ udcli submission hash --path ./my-submission
72
+ udcli submission check --path ./my-submission --challenge pi05-libero-s1
73
+ udcli submission eval --challenge pi05-libero-s1 --hf-repo you/pi05-libero # docker + GPU, same sandbox as validators
74
+ udcli submission eval --challenge pi05-libero-s1 --model-dir ./model # a local model folder, mounted at /model
75
+ udcli submission submit --path ./my-submission --hf-repo you/pi05-libero --challenge pi05-libero-s1 \
76
+ --wallet miner --hotkey default
77
+ udcli submission list
78
+ udcli submission show 42 # each validator's status, score, error, success rate, episodes
79
+ udcli submission show 42 --compare udcli-eval-pi05-libero-s1-<ts>/out/results.json
80
+ udcli challenge leaderboard pi05-libero-s1
81
+ ```
82
+
83
+ `submission eval` runs the public eval config on the challenge's public benchmarks in the validator sandbox.
84
+ `submission show --compare` puts that local `results.json` next to what validators reported: the score, the
85
+ success rate and episode count, and whether your run used the same eval config (by sha256).
86
+
87
+ Every submission is a folder: `agent.yaml`, `brain/`, `train/`, optional `tests/` and `docs/`, and `weights/`.
88
+ Weights go to your own Hugging Face repo; the rest goes to Unidroid as one deterministic ZIP. `agent.yaml` lists
89
+ the sha256 of every file under `weights/`, and the hotkey signs those hashes with the ZIP's hash. Keep the pinned
90
+ commit available and unchanged until Review ends, or you're disqualified. Winners are copied to Unidroid's HF org
91
+ before payout; the published copy also holds the ZIP.
92
+
93
+ ```bash
94
+ udcli submission hash --path ./my-submission # (re)write the weights: block of agent.yaml
95
+ udcli submission hash --path ./my-submission --check # verify only
96
+ udcli submission check --path ./my-submission --challenge pi05-franka-s1
97
+ udcli submission push --path ./my-submission --hf-repo you/pi05-weights # optional: push weights/ on its own
98
+ udcli submission submit --path ./my-submission --hf-repo you/pi05-weights --challenge pi05-franka-s1 \
99
+ --wallet miner --hotkey default
100
+ udcli submission resume <upload-id> # finish an interrupted upload (24 hours)
101
+ ```
102
+
103
+ `submission submit` pushes `weights/` with your local Hugging Face login (`HF_TOKEN` or `hf auth login`;
104
+ it never leaves your machine), creating a private repo when missing and skipping the push when `main`
105
+ already holds the same files. It then pins the commit, compares it with `agent.yaml`, builds the ZIP and
106
+ uploads it. The publication terms and the fee are shown first: nothing is pushed to Hugging Face until you accept,
107
+ and any files on `main` that `agent.yaml` does not declare are listed before they are removed. Interrupted
108
+ uploads resume without re-sending finished parts. `--skip-upload --revision <sha>` uses weights you pushed
109
+ yourself (`--revision` is only valid with `--skip-upload`), `--write-hashes` rewrites stale
110
+ hashes without asking. Validators download with the read token saved by `udcli auth hf set`; it must belong
111
+ to the repo owner and must not be able to write. The fee is charged when the upload completes. `.DS_Store`,
112
+ `Thumbs.db`, swap and backup files, `.cache/`, `.git/` and `__pycache__/` are never hashed or uploaded; any
113
+ other dot file under `weights/` is refused.
114
+
115
+ ## Validators
116
+
117
+ ```bash
118
+ udcli validator pending [--challenge pi05-franka-s1]
119
+ udcli validator fetch 42 --out ./submission-42 # every hash checked against what the miner signed
120
+ ```
121
+
122
+ ## BenchHub
123
+
124
+ ```bash
125
+ udcli bench list [--category manipulation] [--visibility public]
126
+ udcli bench info libero-spatial
127
+ udcli bench download libero-spatial # sha256-verified, cached
128
+ udcli bench upload ./my-bench --visibility private [--thumbnail cover.png] # team role
129
+ udcli bench link franka-tabletop-v13 --visibility private # admin, Nepher EnvHub
130
+ udcli bench status
131
+ udcli bench cache list | info | clear [id]
132
+ ```
133
+
134
+ A benchmark is either uploaded to R2 or linked from the Nepher EnvHub. `bench link` is admin only: it takes an
135
+ EnvHub environment id, and the server reads that bundle's `manifest.yaml` as the BenchHub record. The bundle
136
+ stays on EnvHub and the server pins its current sha256. Downloads work the same for both: the API checks access
137
+ and returns a short-lived URL, and EnvHub bundles are streamed through the Unidroid API. You never need a Nepher
138
+ API key.
139
+
140
+ - **Public**: any logged-in user.
141
+ - **Private**: validators and the uploading team, only during the active window (UTC). Never miners.
142
+ - **Admins**: always.
143
+
144
+ A bundle needs `manifest.yaml` with `id`, `name`, `category`, `format`,
145
+ `description`. Optional: `robot` (for example `franka-panda`) and `robot_type` (any string, for example
146
+ `arm` or `humanoid`). Put any revision in the id. A benchmark id is immutable.
147
+
148
+ ## Datasets
149
+
150
+ Robot datasets for training VLA models. Anyone can browse; buying and downloading need `udcli auth login`.
151
+
152
+ ```bash
153
+ udcli dataset list [--search franka] [--free] [--sort popular]
154
+ udcli dataset info franka-pick-place-v1 # price, size, license, Hugging Face preview, what you may do
155
+ udcli dataset buy franka-pick-place-v1 # pays from your balance (see: udcli account balance)
156
+ udcli dataset download franka-pick-place-v1 [--out ./data] [--extract]
157
+ udcli dataset mine
158
+ ```
159
+
160
+ Downloads resume after an interruption and are checked against the published sha256. Archives are unpacked
161
+ safely: nothing leaves the target folder.
162
+
163
+ Admins upload and price datasets; a super admin approves an admin's upload (a super admin's own upload goes on
164
+ sale once verified):
165
+
166
+ ```bash
167
+ udcli dataset upload ./my-dataset --id franka-pick-place-v1 --license CC-BY-4.0 --price 25 \
168
+ --robot franka-panda --hf-repo unidroid/franka-pick-place-v1-sample --sample-episodes 3 \
169
+ --thumbnail ./cover.png --video ./preview.mp4
170
+ udcli dataset media franka-pick-place-v1 --thumbnail ./new-cover.png --video ./clip.mp4
171
+ udcli dataset uploads # your uploads and their review state
172
+ udcli dataset set-price franka-pick-place-v1 30
173
+ udcli dataset pending # super admin
174
+ udcli dataset approve franka-pick-place-v1 [--note ...]
175
+ udcli dataset reject franka-pick-place-v1 --reason "..."
176
+ udcli dataset archive franka-pick-place-v1 # off sale; buyers keep access
177
+ ```
178
+
179
+ When `--hf-repo` is given, `udcli` extracts `N` episodes (`--sample-episodes N`, plus optional `--sample-frames`
180
+ to slice each episode), rewrites LeRobot `meta/` counts so the sample loads directly, generates a Dataset Card
181
+ `README.md`, and pushes the free sample to Hugging Face using your local token (`--hf-token`, `HF_TOKEN`, or
182
+ `hf auth login`; never sent to Unidroid). The sample is public, so the files are listed and you confirm before
183
+ they are pushed (`--yes` or `--confirm-rights` skips it), and a paid dataset whose sample would hold every episode
184
+ is refused. Pass `--auto-media` to extract a thumbnail and short preview clip
185
+ from the dataset folder automatically. The full folder is packaged deterministically as a store-only ZIP, uploaded
186
+ to R2 in parallel parts (`--jobs`), and resumes without re-zipping when you run the same command again.
187
+
188
+ ## Development
189
+
190
+ ```bash
191
+ pip install -e ".[dev]"
192
+ pytest
193
+ ```
194
+
195
+ `tests/protocol_vectors.json` is copied from `unidroid-backend`. `tests/test_backend_e2e.py` runs
196
+ against the real backend when it's installed alongside, and is skipped otherwise.
@@ -0,0 +1,29 @@
1
+ unidroid_cli/__init__.py,sha256=uY3cMAMpdqMKE578vu86FHlJK6FgmnTzyGQFF28Mpx0,23
2
+ unidroid_cli/__main__.py,sha256=wT62aXCuN7iwRPQoswnmeGiBS5Cou0CIBvMxbOTfvFs,33
3
+ unidroid_cli/_common.py,sha256=_nL0ck5S4pUh-PxMEIMB04XUiZZWJNonKNh-OkdHZAY,2225
4
+ unidroid_cli/agent.py,sha256=zrYc66DuJMAgftPk6KBihn8xYV-5wzyYiMw7BOw_viA,16150
5
+ unidroid_cli/bench.py,sha256=Ukh-V-A0tQTQ3S-tMORizVmo5WMDQ1YbFaFDe4yk8iQ,5779
6
+ unidroid_cli/checks.py,sha256=Ntc9s_3gNq3iPh5DabYeGEht4FJc6ZZlbCeffBwi-i8,1815
7
+ unidroid_cli/cli.py,sha256=_QpQL3XGu_FtBlFFXaCrOSiImYGJ65TcUmZZ5LpRnG4,3762
8
+ unidroid_cli/compare.py,sha256=xa86HhTrnYbf9kw4A_Cd161dOQOmAPhSJu4BllwFH1M,2481
9
+ unidroid_cli/config.py,sha256=cd2il0uU_OdN2TKP-jdZyHUF_gpm1ySvV-gaQUnPoJI,2821
10
+ unidroid_cli/dataset.py,sha256=aRdUmy-qac33kSwEipD0EsRekGhorFtfJAKXKejqvJY,17292
11
+ unidroid_cli/dataset_sample.py,sha256=D4fCO9inp3OnCgFKgtO1rvHqEo_A9LnSzB2hE1c1Vbw,24797
12
+ unidroid_cli/hfrepo.py,sha256=q478PWkl2LICSMemgtDU_W6WnC3ikfJSuE2Za1AL56c,8436
13
+ unidroid_cli/http.py,sha256=CeXvAvDJ42uUytZvMBhEgSK4Gb404eMFrWhDIN1GRkc,2495
14
+ unidroid_cli/protocol.py,sha256=7HhILc9Z3hxlB3UkVfPIvUgG4hS8aOlgfCBJgkr088s,3081
15
+ unidroid_cli/safe_extract.py,sha256=x10e8AuCyeZ0tjDps5CvDyD076O74F70XUfEYw_8G2w,2404
16
+ unidroid_cli/uploads.py,sha256=d3GSSxuPojHuzG_9FbOYtSZbzVZUrvUBbvHQrk8Wmj8,3322
17
+ unidroid_cli/wallet.py,sha256=a9K8MQOwpqnBfSuJ4EtBiALJo8RXpDXsrN-o_pLbO8A,2153
18
+ unidroid_cli/commands/__init__.py,sha256=Nh2zR1LEdQVNZF18BcMHyC1z0CH6qwYEpZZk1WuV3Ik,60
19
+ unidroid_cli/commands/account.py,sha256=YSE37kd9n-FpdlxHld07sOpmrTSW5zC-CtgC_cPhl38,5252
20
+ unidroid_cli/commands/auth.py,sha256=2HSO5hT47E2W1nnj4jZ0-dVYk6g06c5GuF51HY1XFjA,6163
21
+ unidroid_cli/commands/bench.py,sha256=tA3VCaK7PsRkWLoGyuhjtdHmRNLcjeBf6ToALVDziOc,6369
22
+ unidroid_cli/commands/challenge.py,sha256=KjTzD6-Ah0OvZrVITfGjuZofCnsOju-dq0lXVgbBSM4,4942
23
+ unidroid_cli/commands/dataset.py,sha256=44UmYUP8DP81WOtRGlIKw3ArgARDvxPPt9XTCuxC1-o,27501
24
+ unidroid_cli/commands/submission.py,sha256=-1GsJAZ8pEbMelGiGwyIzRyvTtyrP9inJlXMLsNrtFo,26697
25
+ unidroid_cli/commands/validator.py,sha256=p7m10cUGP_E3fSKmbRut-ufNsopeHm3My6-tQKSiOz8,5980
26
+ unidroid_cli-0.3.0.dist-info/METADATA,sha256=p_qge7AqNMXP87IBcry80nZGoILc8i5WTWal2xod_So,10888
27
+ unidroid_cli-0.3.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
28
+ unidroid_cli-0.3.0.dist-info/entry_points.txt,sha256=xxOoyHzNPlhtNSTFMhToFMnNfsJL1rSNMASEcpbU0NI,48
29
+ unidroid_cli-0.3.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ udcli = unidroid_cli.cli:main