flashnode 0.3.5__tar.gz → 0.4.1__tar.gz

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.
Files changed (100) hide show
  1. {flashnode-0.3.5 → flashnode-0.4.1}/PKG-INFO +54 -7
  2. {flashnode-0.3.5 → flashnode-0.4.1}/README.md +52 -5
  3. flashnode-0.4.1/flashnode/agent/cli.py +1507 -0
  4. flashnode-0.4.1/flashnode/agent/hostinfo.py +307 -0
  5. flashnode-0.4.1/flashnode/agent/servers.py +284 -0
  6. flashnode-0.4.1/flashnode/agent/ui.py +247 -0
  7. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/doctor.py +36 -8
  8. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/executor/argv_runner.py +91 -10
  9. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/executor/client.py +50 -8
  10. flashnode-0.4.1/flashnode/executor/datasets.py +457 -0
  11. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/executor/docker_runner.py +73 -10
  12. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/executor/environments.py +308 -20
  13. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/executor/hardening.py +47 -0
  14. flashnode-0.4.1/flashnode/executor/loop.py +1103 -0
  15. flashnode-0.4.1/flashnode/executor/procs.py +190 -0
  16. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/executor/runner.py +73 -0
  17. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/executor/task_logs.py +22 -13
  18. flashnode-0.4.1/flashnode/executor/trusted_runner.py +239 -0
  19. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/identity/enrol.py +9 -1
  20. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/identity/store.py +19 -6
  21. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/inventory/capabilities.py +27 -0
  22. flashnode-0.4.1/flashnode/status.py +186 -0
  23. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode.egg-info/PKG-INFO +54 -7
  24. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode.egg-info/SOURCES.txt +20 -0
  25. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode.egg-info/entry_points.txt +1 -0
  26. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode.egg-info/requires.txt +1 -1
  27. {flashnode-0.3.5 → flashnode-0.4.1}/pyproject.toml +39 -2
  28. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_argv_runner.py +99 -55
  29. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_capabilities.py +59 -0
  30. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_checkpoint_relay.py +25 -0
  31. flashnode-0.4.1/tests/test_cli_data.py +150 -0
  32. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_cli_env.py +1 -1
  33. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_cli_join.py +41 -0
  34. flashnode-0.4.1/tests/test_cli_presentation.py +213 -0
  35. flashnode-0.4.1/tests/test_cli_short_commands.py +452 -0
  36. flashnode-0.4.1/tests/test_cli_status.py +110 -0
  37. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_cli_trusted.py +36 -0
  38. flashnode-0.4.1/tests/test_client.py +235 -0
  39. flashnode-0.4.1/tests/test_datasets.py +155 -0
  40. flashnode-0.4.1/tests/test_datasets_fetch.py +240 -0
  41. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_docker_runner.py +50 -21
  42. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_enrol.py +19 -0
  43. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_environments.py +155 -10
  44. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_evidence.py +14 -0
  45. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_executor.py +15 -7
  46. flashnode-0.4.1/tests/test_executor_loop.py +689 -0
  47. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_hardening.py +67 -12
  48. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_identity.py +12 -0
  49. flashnode-0.4.1/tests/test_install_script.py +100 -0
  50. flashnode-0.4.1/tests/test_interpreter_provisioning.py +318 -0
  51. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_local_data.py +27 -8
  52. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_loop_counters.py +176 -4
  53. flashnode-0.4.1/tests/test_loop_datasets.py +264 -0
  54. flashnode-0.4.1/tests/test_procs.py +222 -0
  55. flashnode-0.4.1/tests/test_runner_abort.py +564 -0
  56. flashnode-0.4.1/tests/test_servers.py +216 -0
  57. flashnode-0.4.1/tests/test_status.py +272 -0
  58. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_task_logs.py +37 -0
  59. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_trusted_runner.py +168 -3
  60. flashnode-0.4.1/tests/test_ui.py +236 -0
  61. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_work_status.py +96 -0
  62. flashnode-0.3.5/flashnode/agent/cli.py +0 -653
  63. flashnode-0.3.5/flashnode/executor/loop.py +0 -615
  64. flashnode-0.3.5/flashnode/executor/trusted_runner.py +0 -131
  65. flashnode-0.3.5/flashnode/status.py +0 -103
  66. flashnode-0.3.5/tests/test_status.py +0 -125
  67. {flashnode-0.3.5 → flashnode-0.4.1}/LICENSE +0 -0
  68. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/__init__.py +0 -0
  69. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/agent/__init__.py +0 -0
  70. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/agent/daemon.py +0 -0
  71. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/agent/kube.py +0 -0
  72. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/artifacts/__init__.py +0 -0
  73. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/benchmark/__init__.py +0 -0
  74. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/config/__init__.py +0 -0
  75. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/config/local_data.py +0 -0
  76. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/executor/__init__.py +0 -0
  77. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/executor/archives.py +0 -0
  78. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/executor/evidence.py +0 -0
  79. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/executor/health.py +0 -0
  80. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/executor/images.py +0 -0
  81. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/identity/__init__.py +0 -0
  82. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/identity/credentials.py +0 -0
  83. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/inventory/__init__.py +0 -0
  84. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/inventory/gpu.py +0 -0
  85. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode/telemetry/__init__.py +0 -0
  86. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode.egg-info/dependency_links.txt +0 -0
  87. {flashnode-0.3.5 → flashnode-0.4.1}/flashnode.egg-info/top_level.txt +0 -0
  88. {flashnode-0.3.5 → flashnode-0.4.1}/setup.cfg +0 -0
  89. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_agent.py +0 -0
  90. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_allowlist_drift.py +0 -0
  91. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_archives.py +0 -0
  92. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_credentials.py +0 -0
  93. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_doctor.py +0 -0
  94. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_gpu_probe.py +0 -0
  95. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_hardening_platform.py +0 -0
  96. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_images_allowlist.py +0 -0
  97. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_interfaces.py +0 -0
  98. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_tier_health.py +0 -0
  99. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_trusted_tier_endtoend.py +0 -0
  100. {flashnode-0.3.5 → flashnode-0.4.1}/tests/test_work_gate.py +0 -0
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flashnode
3
- Version: 0.3.5
3
+ Version: 0.4.1
4
4
  Summary: Open host agent for the FlashML fragmented-compute network: join, benchmark, execute sandboxed ML tasks, earn contribution credits.
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://github.com/Zolli-Labs/flashnode
7
7
  Requires-Python: >=3.10
8
8
  Description-Content-Type: text/markdown
9
9
  License-File: LICENSE
10
- Requires-Dist: flashruntime<0.6,>=0.4.3
10
+ Requires-Dist: flashruntime<0.7,>=0.6.1
11
11
  Requires-Dist: psutil>=5.9
12
12
  Requires-Dist: websockets>=12
13
13
  Requires-Dist: cryptography>=42
@@ -49,6 +49,42 @@ verified results. Two profiles:
49
49
  inside managed pools (DaemonSet); KubeRay owns workload pods there.
50
50
  Implemented.
51
51
 
52
+ ## Install
53
+
54
+ ```bash
55
+ curl -fsSL https://raw.githubusercontent.com/Zolli-Labs/flashml/main/install.sh | sh
56
+ ```
57
+
58
+ One line, no root, nothing system-wide. It puts the agent in its own
59
+ environment under `~/.flashnode/agent` and links `flash` (and `flashnode`)
60
+ into `~/.local/bin`. **If this machine has no suitable Python, it downloads
61
+ one** — that is the point: a RunPod pod shipping 3.8 and an Alibaba FC
62
+ sandbox shipping 3.13 both end up running the agent on the same interpreter.
63
+
64
+ Before the installer is on `main`, take it from the branch and say which
65
+ version to install:
66
+
67
+ ```bash
68
+ curl -fsSL https://raw.githubusercontent.com/Zolli-Labs/flashml/fix/trusted-tier-execution/install.sh \
69
+ | FLASH_REF="flashnode @ git+https://github.com/Zolli-Labs/flashml.git@fix/trusted-tier-execution#subdirectory=flashnode" sh
70
+ ```
71
+
72
+ Then, wherever you installed it from:
73
+
74
+ ```bash
75
+ flash login dev # or: prod, or any coordinator URL
76
+ flash run -d # contribute, in the background
77
+ flash logs # watch what it is doing
78
+ flash stop # ask it to finish up and exit
79
+ ```
80
+
81
+ `flash` and `flashnode` are the same program under two names, and every
82
+ command takes an optional SERVER: a nickname (`dev`, `prod`), a URL, or
83
+ enough of a coordinator you have already joined to be unambiguous
84
+ (`flash run render`). Leave it out and — if this machine joined exactly one
85
+ coordinator — that is the one it means. `--coordinator URL` still works
86
+ everywhere it ever did.
87
+
52
88
  ## Check your machine first
53
89
 
54
90
  ```bash
@@ -119,6 +155,18 @@ flashnode work --coordinator http://<coordinator>:8100 # reads the saved token
119
155
  flashnode logout --coordinator http://<coordinator>:8100 # forget it locally (does not revoke server-side)
120
156
  ```
121
157
 
158
+ FlashML Cloud also supports browser device-code login. On a rented or
159
+ disposable host, add `--ephemeral`:
160
+
161
+ ```bash
162
+ flashnode login --coordinator https://<cloud-api> --ephemeral
163
+ ```
164
+
165
+ That flag rotates the local node id before enrollment, so a reused RunPod or
166
+ Colab state directory cannot carry the previous renter's machine identity into
167
+ the next account. Do not use it on a laptop or workstation whose identity
168
+ should remain stable while offline.
169
+
122
170
  `login`/`logout` write to a per-coordinator credential store at
123
171
  `~/.flashnode/credentials.json` (override with `FLASHNODE_CREDENTIALS`),
124
172
  keyed by coordinator URL so one machine can hold separate tokens for
@@ -126,11 +174,10 @@ separate pools. The file is written with mode `0600` on every save. A
126
174
  missing or unparseable file is treated as "no saved token" rather than a
127
175
  crash. `CoordinatorClient` sends the saved token as a bearer header on
128
176
  every request to that coordinator once it's saved — there is nothing else
129
- to configure. Token issuance is still manual and out-of-band today (the
130
- coordinator operator hands you the token; there is no self-service signup
131
- or browser device flow yet), and `flashnode logout` only removes the local
132
- copy — the operator revokes access by removing your token from the
133
- coordinator's configuration.
177
+ to configure. Self-hosted coordinators may still issue tokens manually;
178
+ FlashML Cloud uses the browser device-code flow. `flashnode logout` only
179
+ removes the local copy revoke the machine in the cloud console or through
180
+ the coordinator's own access controls as appropriate.
134
181
 
135
182
  - Stable node identity; registers with capabilities (CPU, RAM, arch, GPU)
136
183
  and **re-registers automatically** if the coordinator restarts.
@@ -32,6 +32,42 @@ verified results. Two profiles:
32
32
  inside managed pools (DaemonSet); KubeRay owns workload pods there.
33
33
  Implemented.
34
34
 
35
+ ## Install
36
+
37
+ ```bash
38
+ curl -fsSL https://raw.githubusercontent.com/Zolli-Labs/flashml/main/install.sh | sh
39
+ ```
40
+
41
+ One line, no root, nothing system-wide. It puts the agent in its own
42
+ environment under `~/.flashnode/agent` and links `flash` (and `flashnode`)
43
+ into `~/.local/bin`. **If this machine has no suitable Python, it downloads
44
+ one** — that is the point: a RunPod pod shipping 3.8 and an Alibaba FC
45
+ sandbox shipping 3.13 both end up running the agent on the same interpreter.
46
+
47
+ Before the installer is on `main`, take it from the branch and say which
48
+ version to install:
49
+
50
+ ```bash
51
+ curl -fsSL https://raw.githubusercontent.com/Zolli-Labs/flashml/fix/trusted-tier-execution/install.sh \
52
+ | FLASH_REF="flashnode @ git+https://github.com/Zolli-Labs/flashml.git@fix/trusted-tier-execution#subdirectory=flashnode" sh
53
+ ```
54
+
55
+ Then, wherever you installed it from:
56
+
57
+ ```bash
58
+ flash login dev # or: prod, or any coordinator URL
59
+ flash run -d # contribute, in the background
60
+ flash logs # watch what it is doing
61
+ flash stop # ask it to finish up and exit
62
+ ```
63
+
64
+ `flash` and `flashnode` are the same program under two names, and every
65
+ command takes an optional SERVER: a nickname (`dev`, `prod`), a URL, or
66
+ enough of a coordinator you have already joined to be unambiguous
67
+ (`flash run render`). Leave it out and — if this machine joined exactly one
68
+ coordinator — that is the one it means. `--coordinator URL` still works
69
+ everywhere it ever did.
70
+
35
71
  ## Check your machine first
36
72
 
37
73
  ```bash
@@ -102,6 +138,18 @@ flashnode work --coordinator http://<coordinator>:8100 # reads the saved token
102
138
  flashnode logout --coordinator http://<coordinator>:8100 # forget it locally (does not revoke server-side)
103
139
  ```
104
140
 
141
+ FlashML Cloud also supports browser device-code login. On a rented or
142
+ disposable host, add `--ephemeral`:
143
+
144
+ ```bash
145
+ flashnode login --coordinator https://<cloud-api> --ephemeral
146
+ ```
147
+
148
+ That flag rotates the local node id before enrollment, so a reused RunPod or
149
+ Colab state directory cannot carry the previous renter's machine identity into
150
+ the next account. Do not use it on a laptop or workstation whose identity
151
+ should remain stable while offline.
152
+
105
153
  `login`/`logout` write to a per-coordinator credential store at
106
154
  `~/.flashnode/credentials.json` (override with `FLASHNODE_CREDENTIALS`),
107
155
  keyed by coordinator URL so one machine can hold separate tokens for
@@ -109,11 +157,10 @@ separate pools. The file is written with mode `0600` on every save. A
109
157
  missing or unparseable file is treated as "no saved token" rather than a
110
158
  crash. `CoordinatorClient` sends the saved token as a bearer header on
111
159
  every request to that coordinator once it's saved — there is nothing else
112
- to configure. Token issuance is still manual and out-of-band today (the
113
- coordinator operator hands you the token; there is no self-service signup
114
- or browser device flow yet), and `flashnode logout` only removes the local
115
- copy — the operator revokes access by removing your token from the
116
- coordinator's configuration.
160
+ to configure. Self-hosted coordinators may still issue tokens manually;
161
+ FlashML Cloud uses the browser device-code flow. `flashnode logout` only
162
+ removes the local copy revoke the machine in the cloud console or through
163
+ the coordinator's own access controls as appropriate.
117
164
 
118
165
  - Stable node identity; registers with capabilities (CPU, RAM, arch, GPU)
119
166
  and **re-registers automatically** if the coordinator restarts.