nemo-platform-plugin 0.1.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.
Files changed (1224) hide show
  1. nemo_platform/__init__.py +117 -0
  2. nemo_platform/_base_client.py +2146 -0
  3. nemo_platform/_client.py +1200 -0
  4. nemo_platform/_compat.py +241 -0
  5. nemo_platform/_constants.py +29 -0
  6. nemo_platform/_decoders/jsonl.py +138 -0
  7. nemo_platform/_exceptions.py +123 -0
  8. nemo_platform/_files.py +188 -0
  9. nemo_platform/_models.py +967 -0
  10. nemo_platform/_qs.py +164 -0
  11. nemo_platform/_resource.py +58 -0
  12. nemo_platform/_response.py +872 -0
  13. nemo_platform/_streaming.py +391 -0
  14. nemo_platform/_types.py +288 -0
  15. nemo_platform/_utils/__init__.py +79 -0
  16. nemo_platform/_utils/_compat.py +60 -0
  17. nemo_platform/_utils/_datetime_parse.py +151 -0
  18. nemo_platform/_utils/_json.py +50 -0
  19. nemo_platform/_utils/_logs.py +40 -0
  20. nemo_platform/_utils/_path.py +142 -0
  21. nemo_platform/_utils/_proxy.py +80 -0
  22. nemo_platform/_utils/_reflection.py +57 -0
  23. nemo_platform/_utils/_resources_proxy.py +39 -0
  24. nemo_platform/_utils/_streams.py +27 -0
  25. nemo_platform/_utils/_sync.py +73 -0
  26. nemo_platform/_utils/_transform.py +472 -0
  27. nemo_platform/_utils/_typing.py +171 -0
  28. nemo_platform/_utils/_utils.py +448 -0
  29. nemo_platform/_version.py +21 -0
  30. nemo_platform/auth/__init__.py +15 -0
  31. nemo_platform/auth/device_flow.py +303 -0
  32. nemo_platform/auth/helpers.py +211 -0
  33. nemo_platform/auth/token_provider.py +239 -0
  34. nemo_platform/beta/evaluator/__init__.py +120 -0
  35. nemo_platform/beta/evaluator/agent_inference.py +360 -0
  36. nemo_platform/beta/evaluator/constants.py +4 -0
  37. nemo_platform/beta/evaluator/dataset_schemas/common.py +177 -0
  38. nemo_platform/beta/evaluator/dataset_schemas/compatibility.py +353 -0
  39. nemo_platform/beta/evaluator/dataset_schemas/templates.py +389 -0
  40. nemo_platform/beta/evaluator/datasets/__init__.py +28 -0
  41. nemo_platform/beta/evaluator/datasets/loader.py +415 -0
  42. nemo_platform/beta/evaluator/enums.py +64 -0
  43. nemo_platform/beta/evaluator/execution/_protocols.py +20 -0
  44. nemo_platform/beta/evaluator/execution/backends/base.py +86 -0
  45. nemo_platform/beta/evaluator/execution/backends/local/backend.py +132 -0
  46. nemo_platform/beta/evaluator/execution/benchmark_execution.py +666 -0
  47. nemo_platform/beta/evaluator/execution/config.py +64 -0
  48. nemo_platform/beta/evaluator/execution/evaluator.py +289 -0
  49. nemo_platform/beta/evaluator/execution/job_poll.py +98 -0
  50. nemo_platform/beta/evaluator/execution/metric_execution.py +878 -0
  51. nemo_platform/beta/evaluator/execution/pipeline.py +64 -0
  52. nemo_platform/beta/evaluator/execution/runs.py +143 -0
  53. nemo_platform/beta/evaluator/execution/scoring.py +224 -0
  54. nemo_platform/beta/evaluator/execution/utils.py +116 -0
  55. nemo_platform/beta/evaluator/execution/values.py +53 -0
  56. nemo_platform/beta/evaluator/inference.py +456 -0
  57. nemo_platform/beta/evaluator/metrics/aggregation.py +451 -0
  58. nemo_platform/beta/evaluator/metrics/bleu.py +94 -0
  59. nemo_platform/beta/evaluator/metrics/exact_match.py +52 -0
  60. nemo_platform/beta/evaluator/metrics/f1.py +50 -0
  61. nemo_platform/beta/evaluator/metrics/hooks.py +41 -0
  62. nemo_platform/beta/evaluator/metrics/llm_judge.py +392 -0
  63. nemo_platform/beta/evaluator/metrics/number_check.py +95 -0
  64. nemo_platform/beta/evaluator/metrics/protocol.py +241 -0
  65. nemo_platform/beta/evaluator/metrics/ragas/__init__.py +41 -0
  66. nemo_platform/beta/evaluator/metrics/ragas/base.py +521 -0
  67. nemo_platform/beta/evaluator/metrics/ragas/git_patch.py +36 -0
  68. nemo_platform/beta/evaluator/metrics/ragas/imports.py +192 -0
  69. nemo_platform/beta/evaluator/metrics/ragas/metrics.py +183 -0
  70. nemo_platform/beta/evaluator/metrics/remote.py +250 -0
  71. nemo_platform/beta/evaluator/metrics/rouge.py +71 -0
  72. nemo_platform/beta/evaluator/metrics/string_check.py +69 -0
  73. nemo_platform/beta/evaluator/metrics/template_rendering.py +141 -0
  74. nemo_platform/beta/evaluator/metrics/tool_calling.py +173 -0
  75. nemo_platform/beta/evaluator/metrics/types.py +62 -0
  76. nemo_platform/beta/evaluator/metrics/utils.py +54 -0
  77. nemo_platform/beta/evaluator/resilience/api.py +142 -0
  78. nemo_platform/beta/evaluator/resilience/classifier.py +142 -0
  79. nemo_platform/beta/evaluator/resilience/config.py +69 -0
  80. nemo_platform/beta/evaluator/resilience/errors.py +117 -0
  81. nemo_platform/beta/evaluator/resilience/policy.py +50 -0
  82. nemo_platform/beta/evaluator/resilience/scheduler.py +459 -0
  83. nemo_platform/beta/evaluator/resilience/types.py +93 -0
  84. nemo_platform/beta/evaluator/structured_output.py +184 -0
  85. nemo_platform/beta/evaluator/templates.py +115 -0
  86. nemo_platform/beta/evaluator/values/__init__.py +162 -0
  87. nemo_platform/beta/evaluator/values/agents.py +84 -0
  88. nemo_platform/beta/evaluator/values/common.py +28 -0
  89. nemo_platform/beta/evaluator/values/dataset_schemas.py +112 -0
  90. nemo_platform/beta/evaluator/values/datasets.py +28 -0
  91. nemo_platform/beta/evaluator/values/metrics.py +587 -0
  92. nemo_platform/beta/evaluator/values/models.py +157 -0
  93. nemo_platform/beta/evaluator/values/multi_metric_results.py +359 -0
  94. nemo_platform/beta/evaluator/values/params.py +109 -0
  95. nemo_platform/beta/evaluator/values/results.py +699 -0
  96. nemo_platform/beta/evaluator/values/scores.py +300 -0
  97. nemo_platform/beta/safe_synthesizer/__init__.py +4 -0
  98. nemo_platform/beta/safe_synthesizer/config.py +29 -0
  99. nemo_platform/beta/safe_synthesizer/job.py +309 -0
  100. nemo_platform/beta/safe_synthesizer/job_builder.py +355 -0
  101. nemo_platform/cli/__init__.py +4 -0
  102. nemo_platform/cli/app.py +321 -0
  103. nemo_platform/cli/commands/__init__.py +15 -0
  104. nemo_platform/cli/commands/api/__init__.py +114 -0
  105. nemo_platform/cli/commands/api/adapters.py +384 -0
  106. nemo_platform/cli/commands/api/files/__init__.py +237 -0
  107. nemo_platform/cli/commands/api/files/filesets.py +386 -0
  108. nemo_platform/cli/commands/api/files/otlp/__init__.py +12 -0
  109. nemo_platform/cli/commands/api/files/otlp/logs.py +116 -0
  110. nemo_platform/cli/commands/api/guardrail/__init__.py +270 -0
  111. nemo_platform/cli/commands/api/guardrail/configs.py +311 -0
  112. nemo_platform/cli/commands/api/iam/__init__.py +12 -0
  113. nemo_platform/cli/commands/api/iam/role_bindings.py +264 -0
  114. nemo_platform/cli/commands/api/inference/__init__.py +76 -0
  115. nemo_platform/cli/commands/api/inference/deployment_configs/__init__.py +370 -0
  116. nemo_platform/cli/commands/api/inference/deployment_configs/versions.py +132 -0
  117. nemo_platform/cli/commands/api/inference/deployments/__init__.py +565 -0
  118. nemo_platform/cli/commands/api/inference/deployments/versions.py +141 -0
  119. nemo_platform/cli/commands/api/inference/gateway/__init__.py +14 -0
  120. nemo_platform/cli/commands/api/inference/gateway/model.py +324 -0
  121. nemo_platform/cli/commands/api/inference/gateway/openai/__init__.py +12 -0
  122. nemo_platform/cli/commands/api/inference/gateway/openai/v1/__init__.py +12 -0
  123. nemo_platform/cli/commands/api/inference/gateway/openai/v1/models.py +106 -0
  124. nemo_platform/cli/commands/api/inference/gateway/provider.py +327 -0
  125. nemo_platform/cli/commands/api/inference/models.py +106 -0
  126. nemo_platform/cli/commands/api/inference/providers.py +612 -0
  127. nemo_platform/cli/commands/api/inference/virtual_models.py +412 -0
  128. nemo_platform/cli/commands/api/intake/__init__.py +18 -0
  129. nemo_platform/cli/commands/api/intake/apps/__init__.py +326 -0
  130. nemo_platform/cli/commands/api/intake/apps/tasks.py +340 -0
  131. nemo_platform/cli/commands/api/intake/entries/__init__.py +445 -0
  132. nemo_platform/cli/commands/api/intake/entries/events.py +118 -0
  133. nemo_platform/cli/commands/api/intake/evaluator_results.py +267 -0
  134. nemo_platform/cli/commands/api/intake/exports/__init__.py +63 -0
  135. nemo_platform/cli/commands/api/intake/exports/jobs.py +245 -0
  136. nemo_platform/cli/commands/api/intake/ingest/__init__.py +14 -0
  137. nemo_platform/cli/commands/api/intake/ingest/atif.py +115 -0
  138. nemo_platform/cli/commands/api/intake/ingest/chat_completions.py +125 -0
  139. nemo_platform/cli/commands/api/intake/ingest/otlp/__init__.py +12 -0
  140. nemo_platform/cli/commands/api/intake/ingest/otlp/v1/__init__.py +12 -0
  141. nemo_platform/cli/commands/api/intake/ingest/otlp/v1/traces.py +72 -0
  142. nemo_platform/cli/commands/api/intake/spans/__init__.py +202 -0
  143. nemo_platform/cli/commands/api/intake/spans/evaluator_results.py +65 -0
  144. nemo_platform/cli/commands/api/intake/traces.py +183 -0
  145. nemo_platform/cli/commands/api/jobs/__init__.py +576 -0
  146. nemo_platform/cli/commands/api/jobs/results.py +211 -0
  147. nemo_platform/cli/commands/api/jobs/steps.py +243 -0
  148. nemo_platform/cli/commands/api/jobs/tasks.py +210 -0
  149. nemo_platform/cli/commands/api/members.py +304 -0
  150. nemo_platform/cli/commands/api/models/__init__.py +555 -0
  151. nemo_platform/cli/commands/api/models/adapters.py +261 -0
  152. nemo_platform/cli/commands/api/projects.py +332 -0
  153. nemo_platform/cli/commands/api/safe_synthesizer/__init__.py +12 -0
  154. nemo_platform/cli/commands/api/safe_synthesizer/jobs/__init__.py +417 -0
  155. nemo_platform/cli/commands/api/safe_synthesizer/jobs/results.py +211 -0
  156. nemo_platform/cli/commands/api/secrets/__init__.py +315 -0
  157. nemo_platform/cli/commands/api/secrets/admin.py +44 -0
  158. nemo_platform/cli/commands/api/workspaces.py +339 -0
  159. nemo_platform/cli/commands/auth.py +803 -0
  160. nemo_platform/cli/commands/config.py +308 -0
  161. nemo_platform/cli/commands/docs.py +277 -0
  162. nemo_platform/cli/commands/manifest_registry.py +180 -0
  163. nemo_platform/cli/commands/plugins.py +87 -0
  164. nemo_platform/cli/commands/quickstart/__init__.py +15 -0
  165. nemo_platform/cli/commands/quickstart/cli.py +1178 -0
  166. nemo_platform/cli/commands/services/_process.py +472 -0
  167. nemo_platform/cli/commands/services/cli.py +694 -0
  168. nemo_platform/cli/commands/setup.py +1947 -0
  169. nemo_platform/cli/commands/skills/agents/claude.py +29 -0
  170. nemo_platform/cli/commands/skills/agents/codex.py +32 -0
  171. nemo_platform/cli/commands/skills/agents/cursor.py +18 -0
  172. nemo_platform/cli/commands/skills/agents/opencode.py +20 -0
  173. nemo_platform/cli/commands/skills/base.py +53 -0
  174. nemo_platform/cli/commands/skills/cli.py +313 -0
  175. nemo_platform/cli/commands/skills/installer.py +51 -0
  176. nemo_platform/cli/commands/skills/registry.py +396 -0
  177. nemo_platform/cli/commands/use_cases/__init__.py +15 -0
  178. nemo_platform/cli/commands/use_cases/agent.py +245 -0
  179. nemo_platform/cli/commands/use_cases/chat.py +965 -0
  180. nemo_platform/cli/commands/use_cases/wait.py +151 -0
  181. nemo_platform/cli/core/__init__.py +8 -0
  182. nemo_platform/cli/core/agent_helpers.py +84 -0
  183. nemo_platform/cli/core/api.py +160 -0
  184. nemo_platform/cli/core/autocomplete.py +63 -0
  185. nemo_platform/cli/core/code_generator.py +306 -0
  186. nemo_platform/cli/core/context.py +179 -0
  187. nemo_platform/cli/core/errors.py +349 -0
  188. nemo_platform/cli/core/formatters.py +718 -0
  189. nemo_platform/cli/core/help_formatter.py +868 -0
  190. nemo_platform/cli/core/lazy_load.py +187 -0
  191. nemo_platform/cli/core/logging.py +24 -0
  192. nemo_platform/cli/core/pagination.py +255 -0
  193. nemo_platform/cli/core/stdin_utils.py +233 -0
  194. nemo_platform/cli/core/streaming.py +30 -0
  195. nemo_platform/cli/core/table_config.py +302 -0
  196. nemo_platform/cli/core/timestamp_formatter.py +127 -0
  197. nemo_platform/cli/core/types.py +112 -0
  198. nemo_platform/cli/core/waiters.py +339 -0
  199. nemo_platform/cli/manifest.py +108 -0
  200. nemo_platform/client/__init__.py +15 -0
  201. nemo_platform/client/factory.py +597 -0
  202. nemo_platform/config/README.md +168 -0
  203. nemo_platform/config/__init__.py +23 -0
  204. nemo_platform/config/config.py +538 -0
  205. nemo_platform/config/models.py +377 -0
  206. nemo_platform/config/types.py +7 -0
  207. nemo_platform/filesets/__init__.py +19 -0
  208. nemo_platform/filesets/filesystem/callbacks.py +229 -0
  209. nemo_platform/filesets/filesystem/filesystem.py +940 -0
  210. nemo_platform/filesets/resources.py +1120 -0
  211. nemo_platform/lib/.keep +4 -0
  212. nemo_platform/models/__init__.py +14 -0
  213. nemo_platform/models/resources.py +836 -0
  214. nemo_platform/pagination.py +149 -0
  215. nemo_platform/py.typed +0 -0
  216. nemo_platform/quickstart/__init__.py +99 -0
  217. nemo_platform/quickstart/cluster.py +198 -0
  218. nemo_platform/quickstart/config.py +402 -0
  219. nemo_platform/quickstart/container.py +758 -0
  220. nemo_platform/quickstart/gpu_config.py +111 -0
  221. nemo_platform/quickstart/platform_config.py +82 -0
  222. nemo_platform/quickstart/preflight.py +451 -0
  223. nemo_platform/quickstart/prompts.py +426 -0
  224. nemo_platform/quickstart/storage.py +90 -0
  225. nemo_platform/quickstart/validators.py +268 -0
  226. nemo_platform/resources/__init__.py +16 -0
  227. nemo_platform/resources/adapters/__init__.py +34 -0
  228. nemo_platform/resources/adapters/adapters.py +704 -0
  229. nemo_platform/resources/adapters/api.md +15 -0
  230. nemo_platform/resources/audit/__init__.py +16 -0
  231. nemo_platform/resources/entities/__init__.py +34 -0
  232. nemo_platform/resources/entities/api.md +16 -0
  233. nemo_platform/resources/entities/entities.py +1014 -0
  234. nemo_platform/resources/evaluation/__init__.py +118 -0
  235. nemo_platform/resources/evaluation/api.md +303 -0
  236. nemo_platform/resources/evaluation/benchmark_job_results.py +541 -0
  237. nemo_platform/resources/evaluation/benchmark_jobs/__init__.py +48 -0
  238. nemo_platform/resources/evaluation/benchmark_jobs/benchmark_jobs.py +900 -0
  239. nemo_platform/resources/evaluation/benchmark_jobs/results/__init__.py +76 -0
  240. nemo_platform/resources/evaluation/benchmark_jobs/results/aggregate_scores.py +197 -0
  241. nemo_platform/resources/evaluation/benchmark_jobs/results/artifacts.py +206 -0
  242. nemo_platform/resources/evaluation/benchmark_jobs/results/results.py +516 -0
  243. nemo_platform/resources/evaluation/benchmark_jobs/results/row_scores.py +213 -0
  244. nemo_platform/resources/evaluation/benchmarks.py +690 -0
  245. nemo_platform/resources/evaluation/evaluation.py +277 -0
  246. nemo_platform/resources/evaluation/metric_job_results.py +533 -0
  247. nemo_platform/resources/evaluation/metric_jobs/__init__.py +48 -0
  248. nemo_platform/resources/evaluation/metric_jobs/metric_jobs.py +888 -0
  249. nemo_platform/resources/evaluation/metric_jobs/results/__init__.py +76 -0
  250. nemo_platform/resources/evaluation/metric_jobs/results/aggregate_scores.py +197 -0
  251. nemo_platform/resources/evaluation/metric_jobs/results/artifacts.py +206 -0
  252. nemo_platform/resources/evaluation/metric_jobs/results/results.py +512 -0
  253. nemo_platform/resources/evaluation/metric_jobs/results/row_scores.py +213 -0
  254. nemo_platform/resources/evaluation/metrics.py +3495 -0
  255. nemo_platform/resources/files/__init__.py +62 -0
  256. nemo_platform/resources/files/api.md +65 -0
  257. nemo_platform/resources/files/files.py +683 -0
  258. nemo_platform/resources/files/filesets.py +783 -0
  259. nemo_platform/resources/files/otlp/__init__.py +48 -0
  260. nemo_platform/resources/files/otlp/logs.py +337 -0
  261. nemo_platform/resources/files/otlp/otlp.py +117 -0
  262. nemo_platform/resources/guardrail/__init__.py +48 -0
  263. nemo_platform/resources/guardrail/api.md +116 -0
  264. nemo_platform/resources/guardrail/configs.py +679 -0
  265. nemo_platform/resources/guardrail/guardrail.py +463 -0
  266. nemo_platform/resources/iam/__init__.py +48 -0
  267. nemo_platform/resources/iam/api.md +22 -0
  268. nemo_platform/resources/iam/iam.py +117 -0
  269. nemo_platform/resources/iam/role_bindings.py +537 -0
  270. nemo_platform/resources/inference/__init__.py +118 -0
  271. nemo_platform/resources/inference/api.md +224 -0
  272. nemo_platform/resources/inference/deployment_configs/__init__.py +48 -0
  273. nemo_platform/resources/inference/deployment_configs/deployment_configs.py +756 -0
  274. nemo_platform/resources/inference/deployment_configs/versions.py +418 -0
  275. nemo_platform/resources/inference/deployments/__init__.py +48 -0
  276. nemo_platform/resources/inference/deployments/deployments.py +1017 -0
  277. nemo_platform/resources/inference/deployments/versions.py +434 -0
  278. nemo_platform/resources/inference/gateway/__init__.py +76 -0
  279. nemo_platform/resources/inference/gateway/gateway.py +181 -0
  280. nemo_platform/resources/inference/gateway/model.py +708 -0
  281. nemo_platform/resources/inference/gateway/openai/__init__.py +48 -0
  282. nemo_platform/resources/inference/gateway/openai/openai.py +700 -0
  283. nemo_platform/resources/inference/gateway/openai/v1/__init__.py +48 -0
  284. nemo_platform/resources/inference/gateway/openai/v1/models.py +290 -0
  285. nemo_platform/resources/inference/gateway/openai/v1/v1.py +117 -0
  286. nemo_platform/resources/inference/gateway/provider.py +749 -0
  287. nemo_platform/resources/inference/inference.py +277 -0
  288. nemo_platform/resources/inference/models.py +290 -0
  289. nemo_platform/resources/inference/providers.py +1049 -0
  290. nemo_platform/resources/inference/virtual_models.py +846 -0
  291. nemo_platform/resources/intake/__init__.py +132 -0
  292. nemo_platform/resources/intake/api.md +268 -0
  293. nemo_platform/resources/intake/apps/__init__.py +48 -0
  294. nemo_platform/resources/intake/apps/apps.py +718 -0
  295. nemo_platform/resources/intake/apps/tasks.py +731 -0
  296. nemo_platform/resources/intake/entries/__init__.py +48 -0
  297. nemo_platform/resources/intake/entries/entries.py +855 -0
  298. nemo_platform/resources/intake/entries/events.py +320 -0
  299. nemo_platform/resources/intake/evaluator_results.py +512 -0
  300. nemo_platform/resources/intake/exports/__init__.py +48 -0
  301. nemo_platform/resources/intake/exports/exports.py +229 -0
  302. nemo_platform/resources/intake/exports/jobs.py +464 -0
  303. nemo_platform/resources/intake/ingest/__init__.py +76 -0
  304. nemo_platform/resources/intake/ingest/atif.py +242 -0
  305. nemo_platform/resources/intake/ingest/chat_completions.py +270 -0
  306. nemo_platform/resources/intake/ingest/ingest.py +181 -0
  307. nemo_platform/resources/intake/ingest/otlp/__init__.py +48 -0
  308. nemo_platform/resources/intake/ingest/otlp/otlp.py +117 -0
  309. nemo_platform/resources/intake/ingest/otlp/v1/__init__.py +48 -0
  310. nemo_platform/resources/intake/ingest/otlp/v1/traces.py +183 -0
  311. nemo_platform/resources/intake/ingest/otlp/v1/v1.py +117 -0
  312. nemo_platform/resources/intake/intake.py +309 -0
  313. nemo_platform/resources/intake/spans/__init__.py +48 -0
  314. nemo_platform/resources/intake/spans/evaluator_results.py +197 -0
  315. nemo_platform/resources/intake/spans/spans.py +367 -0
  316. nemo_platform/resources/intake/traces.py +351 -0
  317. nemo_platform/resources/jobs/__init__.py +76 -0
  318. nemo_platform/resources/jobs/api.md +118 -0
  319. nemo_platform/resources/jobs/jobs.py +1300 -0
  320. nemo_platform/resources/jobs/results.py +555 -0
  321. nemo_platform/resources/jobs/steps.py +491 -0
  322. nemo_platform/resources/jobs/tasks.py +470 -0
  323. nemo_platform/resources/members/__init__.py +34 -0
  324. nemo_platform/resources/members/api.md +19 -0
  325. nemo_platform/resources/members/members.py +634 -0
  326. nemo_platform/resources/models/__init__.py +48 -0
  327. nemo_platform/resources/models/adapters.py +514 -0
  328. nemo_platform/resources/models/api.md +44 -0
  329. nemo_platform/resources/models/models.py +981 -0
  330. nemo_platform/resources/projects/__init__.py +34 -0
  331. nemo_platform/resources/projects/api.md +21 -0
  332. nemo_platform/resources/projects/projects.py +736 -0
  333. nemo_platform/resources/safe_synthesizer/__init__.py +48 -0
  334. nemo_platform/resources/safe_synthesizer/api.md +62 -0
  335. nemo_platform/resources/safe_synthesizer/jobs/__init__.py +48 -0
  336. nemo_platform/resources/safe_synthesizer/jobs/jobs.py +895 -0
  337. nemo_platform/resources/safe_synthesizer/jobs/results.py +819 -0
  338. nemo_platform/resources/safe_synthesizer/safe_synthesizer.py +117 -0
  339. nemo_platform/resources/secrets/__init__.py +48 -0
  340. nemo_platform/resources/secrets/admin.py +150 -0
  341. nemo_platform/resources/secrets/api.md +34 -0
  342. nemo_platform/resources/secrets/secrets.py +756 -0
  343. nemo_platform/resources/workspaces/__init__.py +34 -0
  344. nemo_platform/resources/workspaces/api.md +20 -0
  345. nemo_platform/resources/workspaces/workspaces.py +734 -0
  346. nemo_platform/skills/__init__.py +28 -0
  347. nemo_platform/skills/inference/SKILL.md +564 -0
  348. nemo_platform/skills/nemo-build-agent/SKILL.md +221 -0
  349. nemo_platform/skills/nemo-build-agent/references/templates/data-designer-config.py +80 -0
  350. nemo_platform/skills/nemo-evaluator/SKILL.md +140 -0
  351. nemo_platform/skills/nemo-explore/SKILL.md +70 -0
  352. nemo_platform/skills/nemo-files/SKILL.md +81 -0
  353. nemo_platform/skills/nemo-fine-tune/SKILL.md +43 -0
  354. nemo_platform/skills/nemo-guardrails/SKILL.md +519 -0
  355. nemo_platform/skills/nemo-secrets/SKILL.md +60 -0
  356. nemo_platform/skills/nemo-skill-selection/SKILL.md +146 -0
  357. nemo_platform/skills/nemo-spec/SKILL.md +76 -0
  358. nemo_platform/skills/nemo-spec/references/templates/agent-spec.md +68 -0
  359. nemo_platform/skills/nemo-status/SKILL.md +115 -0
  360. nemo_platform/skills/nemo-teardown/SKILL.md +185 -0
  361. nemo_platform/skills/nemo-try-agent/SKILL.md +102 -0
  362. nemo_platform/types/__init__.py +54 -0
  363. nemo_platform/types/adapters/__init__.py +24 -0
  364. nemo_platform/types/adapters/adapter_create_params.py +63 -0
  365. nemo_platform/types/adapters/adapter_entity_filter_param.py +56 -0
  366. nemo_platform/types/adapters/adapter_list_params.py +46 -0
  367. nemo_platform/types/adapters/adapter_patch_params.py +35 -0
  368. nemo_platform/types/adapters/adapters_page.py +37 -0
  369. nemo_platform/types/audit/__init__.py +18 -0
  370. nemo_platform/types/audit/jobs/__init__.py +18 -0
  371. nemo_platform/types/entities/__init__.py +26 -0
  372. nemo_platform/types/entities/entities_page.py +37 -0
  373. nemo_platform/types/entities/entity.py +63 -0
  374. nemo_platform/types/entities/entity_create_params.py +46 -0
  375. nemo_platform/types/entities/entity_delete_entity_by_name_params.py +31 -0
  376. nemo_platform/types/entities/entity_get_entity_by_name_params.py +31 -0
  377. nemo_platform/types/entities/entity_list_params.py +47 -0
  378. nemo_platform/types/entities/entity_update_entity_by_name_params.py +52 -0
  379. nemo_platform/types/evaluation/__init__.py +242 -0
  380. nemo_platform/types/evaluation/agent.py +68 -0
  381. nemo_platform/types/evaluation/agent_goal_accuracy_metric.py +92 -0
  382. nemo_platform/types/evaluation/agent_goal_accuracy_metric_param.py +69 -0
  383. nemo_platform/types/evaluation/agent_goal_accuracy_metric_param_param.py +70 -0
  384. nemo_platform/types/evaluation/agent_goal_accuracy_metric_response.py +88 -0
  385. nemo_platform/types/evaluation/agent_param.py +69 -0
  386. nemo_platform/types/evaluation/aggregate_range_score.py +65 -0
  387. nemo_platform/types/evaluation/aggregate_rubric_score.py +64 -0
  388. nemo_platform/types/evaluation/aggregated_metric_result.py +34 -0
  389. nemo_platform/types/evaluation/answer_accuracy_metric.py +89 -0
  390. nemo_platform/types/evaluation/answer_accuracy_metric_param.py +66 -0
  391. nemo_platform/types/evaluation/answer_accuracy_metric_param_param.py +67 -0
  392. nemo_platform/types/evaluation/answer_accuracy_metric_response.py +85 -0
  393. nemo_platform/types/evaluation/benchmark.py +81 -0
  394. nemo_platform/types/evaluation/benchmark_create_params.py +64 -0
  395. nemo_platform/types/evaluation/benchmark_create_response.py +26 -0
  396. nemo_platform/types/evaluation/benchmark_evaluation_job.py +75 -0
  397. nemo_platform/types/evaluation/benchmark_evaluation_jobs_list_filter_param.py +49 -0
  398. nemo_platform/types/evaluation/benchmark_evaluation_jobs_page.py +37 -0
  399. nemo_platform/types/evaluation/benchmark_evaluation_jobs_sort_field.py +22 -0
  400. nemo_platform/types/evaluation/benchmark_job_create_params.py +58 -0
  401. nemo_platform/types/evaluation/benchmark_job_get_logs_params.py +30 -0
  402. nemo_platform/types/evaluation/benchmark_job_list_params.py +44 -0
  403. nemo_platform/types/evaluation/benchmark_job_result.py +93 -0
  404. nemo_platform/types/evaluation/benchmark_job_result_list_params.py +116 -0
  405. nemo_platform/types/evaluation/benchmark_job_result_retrieve_params.py +50 -0
  406. nemo_platform/types/evaluation/benchmark_job_results_list_response.py +37 -0
  407. nemo_platform/types/evaluation/benchmark_jobs/__init__.py +18 -0
  408. nemo_platform/types/evaluation/benchmark_jobs/results/__init__.py +22 -0
  409. nemo_platform/types/evaluation/benchmark_jobs/results/benchmark_evaluation_result.py +30 -0
  410. nemo_platform/types/evaluation/benchmark_jobs/results/benchmark_metric_result.py +44 -0
  411. nemo_platform/types/evaluation/benchmark_jobs/results/row_score_download_params.py +28 -0
  412. nemo_platform/types/evaluation/benchmark_list_params.py +84 -0
  413. nemo_platform/types/evaluation/benchmark_offline_job.py +43 -0
  414. nemo_platform/types/evaluation/benchmark_offline_job_param.py +44 -0
  415. nemo_platform/types/evaluation/benchmark_online_agent_job.py +71 -0
  416. nemo_platform/types/evaluation/benchmark_online_agent_job_param.py +74 -0
  417. nemo_platform/types/evaluation/benchmark_online_job.py +66 -0
  418. nemo_platform/types/evaluation/benchmark_online_job_param.py +68 -0
  419. nemo_platform/types/evaluation/benchmark_ref.py +22 -0
  420. nemo_platform/types/evaluation/benchmark_retrieve_params.py +29 -0
  421. nemo_platform/types/evaluation/benchmark_retrieve_response.py +27 -0
  422. nemo_platform/types/evaluation/benchmarks_list_response.py +42 -0
  423. nemo_platform/types/evaluation/bleu_metric.py +76 -0
  424. nemo_platform/types/evaluation/bleu_metric_param.py +50 -0
  425. nemo_platform/types/evaluation/bleu_metric_param_param.py +52 -0
  426. nemo_platform/types/evaluation/bleu_metric_response.py +69 -0
  427. nemo_platform/types/evaluation/built_in_dataset.py +46 -0
  428. nemo_platform/types/evaluation/context_entity_recall_metric.py +89 -0
  429. nemo_platform/types/evaluation/context_entity_recall_metric_param.py +66 -0
  430. nemo_platform/types/evaluation/context_entity_recall_metric_param_param.py +67 -0
  431. nemo_platform/types/evaluation/context_entity_recall_metric_response.py +85 -0
  432. nemo_platform/types/evaluation/context_precision_metric.py +89 -0
  433. nemo_platform/types/evaluation/context_precision_metric_param.py +66 -0
  434. nemo_platform/types/evaluation/context_precision_metric_param_param.py +67 -0
  435. nemo_platform/types/evaluation/context_precision_metric_response.py +85 -0
  436. nemo_platform/types/evaluation/context_recall_metric.py +89 -0
  437. nemo_platform/types/evaluation/context_recall_metric_param.py +66 -0
  438. nemo_platform/types/evaluation/context_recall_metric_param_param.py +67 -0
  439. nemo_platform/types/evaluation/context_recall_metric_response.py +85 -0
  440. nemo_platform/types/evaluation/context_relevance_metric.py +89 -0
  441. nemo_platform/types/evaluation/context_relevance_metric_param.py +66 -0
  442. nemo_platform/types/evaluation/context_relevance_metric_param_param.py +67 -0
  443. nemo_platform/types/evaluation/context_relevance_metric_response.py +85 -0
  444. nemo_platform/types/evaluation/dataset_rows.py +35 -0
  445. nemo_platform/types/evaluation/dataset_rows_param.py +36 -0
  446. nemo_platform/types/evaluation/evaluate_dataset_rows_param.py +33 -0
  447. nemo_platform/types/evaluation/exact_match_metric.py +79 -0
  448. nemo_platform/types/evaluation/exact_match_metric_param.py +53 -0
  449. nemo_platform/types/evaluation/exact_match_metric_param_param.py +53 -0
  450. nemo_platform/types/evaluation/exact_match_metric_response.py +72 -0
  451. nemo_platform/types/evaluation/extended_benchmark.py +130 -0
  452. nemo_platform/types/evaluation/f1_metric.py +76 -0
  453. nemo_platform/types/evaluation/f1_metric_param.py +50 -0
  454. nemo_platform/types/evaluation/f1_metric_param_param.py +50 -0
  455. nemo_platform/types/evaluation/f1_metric_response.py +69 -0
  456. nemo_platform/types/evaluation/faithfulness_metric.py +89 -0
  457. nemo_platform/types/evaluation/faithfulness_metric_param.py +66 -0
  458. nemo_platform/types/evaluation/faithfulness_metric_param_param.py +67 -0
  459. nemo_platform/types/evaluation/faithfulness_metric_response.py +85 -0
  460. nemo_platform/types/evaluation/field_mapping.py +56 -0
  461. nemo_platform/types/evaluation/field_mapping_param.py +57 -0
  462. nemo_platform/types/evaluation/fileset.py +48 -0
  463. nemo_platform/types/evaluation/fileset_param.py +49 -0
  464. nemo_platform/types/evaluation/fileset_ref.py +22 -0
  465. nemo_platform/types/evaluation/histogram.py +30 -0
  466. nemo_platform/types/evaluation/histogram_bin.py +33 -0
  467. nemo_platform/types/evaluation/inference_params.py +65 -0
  468. nemo_platform/types/evaluation/inference_params_param.py +53 -0
  469. nemo_platform/types/evaluation/json_score_parser.py +35 -0
  470. nemo_platform/types/evaluation/json_score_parser_param.py +34 -0
  471. nemo_platform/types/evaluation/llm_judge_metric.py +126 -0
  472. nemo_platform/types/evaluation/llm_judge_metric_param.py +103 -0
  473. nemo_platform/types/evaluation/llm_judge_metric_param_param.py +105 -0
  474. nemo_platform/types/evaluation/llm_judge_metric_response.py +120 -0
  475. nemo_platform/types/evaluation/metric_create_params.py +959 -0
  476. nemo_platform/types/evaluation/metric_create_response.py +75 -0
  477. nemo_platform/types/evaluation/metric_evaluate_params.py +111 -0
  478. nemo_platform/types/evaluation/metric_evaluation_job.py +65 -0
  479. nemo_platform/types/evaluation/metric_evaluation_jobs_list_filter_param.py +49 -0
  480. nemo_platform/types/evaluation/metric_evaluation_jobs_page.py +37 -0
  481. nemo_platform/types/evaluation/metric_evaluation_jobs_sort_field.py +22 -0
  482. nemo_platform/types/evaluation/metric_evaluation_response.py +98 -0
  483. nemo_platform/types/evaluation/metric_evaluation_row_score.py +45 -0
  484. nemo_platform/types/evaluation/metric_job_create_params.py +48 -0
  485. nemo_platform/types/evaluation/metric_job_get_logs_params.py +30 -0
  486. nemo_platform/types/evaluation/metric_job_list_params.py +44 -0
  487. nemo_platform/types/evaluation/metric_job_result.py +93 -0
  488. nemo_platform/types/evaluation/metric_job_result_list_params.py +114 -0
  489. nemo_platform/types/evaluation/metric_job_result_retrieve_params.py +50 -0
  490. nemo_platform/types/evaluation/metric_job_results_list_response.py +37 -0
  491. nemo_platform/types/evaluation/metric_jobs/__init__.py +18 -0
  492. nemo_platform/types/evaluation/metric_jobs/results/__init__.py +20 -0
  493. nemo_platform/types/evaluation/metric_jobs/results/row_score_download_params.py +28 -0
  494. nemo_platform/types/evaluation/metric_list_params.py +73 -0
  495. nemo_platform/types/evaluation/metric_offline_job.py +106 -0
  496. nemo_platform/types/evaluation/metric_offline_job_param.py +107 -0
  497. nemo_platform/types/evaluation/metric_online_agent_job.py +133 -0
  498. nemo_platform/types/evaluation/metric_online_agent_job_param.py +135 -0
  499. nemo_platform/types/evaluation/metric_online_job.py +127 -0
  500. nemo_platform/types/evaluation/metric_online_job_param.py +129 -0
  501. nemo_platform/types/evaluation/metric_output.py +30 -0
  502. nemo_platform/types/evaluation/metric_ref.py +22 -0
  503. nemo_platform/types/evaluation/metric_retrieve_response.py +98 -0
  504. nemo_platform/types/evaluation/metric_retriever_job.py +64 -0
  505. nemo_platform/types/evaluation/metric_retriever_job_param.py +65 -0
  506. nemo_platform/types/evaluation/metric_type.py +47 -0
  507. nemo_platform/types/evaluation/metrics_list_response.py +90 -0
  508. nemo_platform/types/evaluation/model.py +44 -0
  509. nemo_platform/types/evaluation/model_param.py +44 -0
  510. nemo_platform/types/evaluation/model_ref.py +22 -0
  511. nemo_platform/types/evaluation/nemo_agent_toolkit_remote_metric.py +87 -0
  512. nemo_platform/types/evaluation/nemo_agent_toolkit_remote_metric_param.py +64 -0
  513. nemo_platform/types/evaluation/nemo_agent_toolkit_remote_metric_param_param.py +65 -0
  514. nemo_platform/types/evaluation/nemo_agent_toolkit_remote_metric_response.py +80 -0
  515. nemo_platform/types/evaluation/noise_sensitivity_metric.py +89 -0
  516. nemo_platform/types/evaluation/noise_sensitivity_metric_param.py +66 -0
  517. nemo_platform/types/evaluation/noise_sensitivity_metric_param_param.py +67 -0
  518. nemo_platform/types/evaluation/noise_sensitivity_metric_response.py +85 -0
  519. nemo_platform/types/evaluation/number_check_metric.py +104 -0
  520. nemo_platform/types/evaluation/number_check_metric_param.py +81 -0
  521. nemo_platform/types/evaluation/number_check_metric_param_param.py +83 -0
  522. nemo_platform/types/evaluation/number_check_metric_response.py +97 -0
  523. nemo_platform/types/evaluation/parameter.py +42 -0
  524. nemo_platform/types/evaluation/parameter_param.py +40 -0
  525. nemo_platform/types/evaluation/percentiles.py +54 -0
  526. nemo_platform/types/evaluation/range_score.py +56 -0
  527. nemo_platform/types/evaluation/range_score_param.py +57 -0
  528. nemo_platform/types/evaluation/reasoning_params.py +41 -0
  529. nemo_platform/types/evaluation/reasoning_params_param.py +41 -0
  530. nemo_platform/types/evaluation/regex_score_parser.py +38 -0
  531. nemo_platform/types/evaluation/regex_score_parser_param.py +37 -0
  532. nemo_platform/types/evaluation/remote_metric.py +91 -0
  533. nemo_platform/types/evaluation/remote_metric_param.py +68 -0
  534. nemo_platform/types/evaluation/remote_metric_param_param.py +69 -0
  535. nemo_platform/types/evaluation/remote_metric_response.py +84 -0
  536. nemo_platform/types/evaluation/remote_score.py +49 -0
  537. nemo_platform/types/evaluation/remote_score_param.py +50 -0
  538. nemo_platform/types/evaluation/response_groundedness_metric.py +89 -0
  539. nemo_platform/types/evaluation/response_groundedness_metric_param.py +66 -0
  540. nemo_platform/types/evaluation/response_groundedness_metric_param_param.py +67 -0
  541. nemo_platform/types/evaluation/response_groundedness_metric_response.py +85 -0
  542. nemo_platform/types/evaluation/response_relevancy_metric.py +95 -0
  543. nemo_platform/types/evaluation/response_relevancy_metric_param.py +74 -0
  544. nemo_platform/types/evaluation/response_relevancy_metric_param_param.py +75 -0
  545. nemo_platform/types/evaluation/response_relevancy_metric_response.py +93 -0
  546. nemo_platform/types/evaluation/retriever_pipeline.py +34 -0
  547. nemo_platform/types/evaluation/retriever_pipeline_param.py +35 -0
  548. nemo_platform/types/evaluation/rouge_metric.py +76 -0
  549. nemo_platform/types/evaluation/rouge_metric_param.py +53 -0
  550. nemo_platform/types/evaluation/rouge_metric_param_param.py +53 -0
  551. nemo_platform/types/evaluation/rouge_metric_response.py +69 -0
  552. nemo_platform/types/evaluation/row_score.py +59 -0
  553. nemo_platform/types/evaluation/rubric.py +40 -0
  554. nemo_platform/types/evaluation/rubric_param.py +40 -0
  555. nemo_platform/types/evaluation/rubric_score.py +54 -0
  556. nemo_platform/types/evaluation/rubric_score_param.py +55 -0
  557. nemo_platform/types/evaluation/rubric_score_stat.py +38 -0
  558. nemo_platform/types/evaluation/run_config.py +39 -0
  559. nemo_platform/types/evaluation/run_config_online.py +51 -0
  560. nemo_platform/types/evaluation/run_config_online_model.py +73 -0
  561. nemo_platform/types/evaluation/run_config_online_model_param.py +75 -0
  562. nemo_platform/types/evaluation/run_config_online_param.py +51 -0
  563. nemo_platform/types/evaluation/run_config_param.py +39 -0
  564. nemo_platform/types/evaluation/string_check_metric.py +82 -0
  565. nemo_platform/types/evaluation/string_check_metric_param.py +59 -0
  566. nemo_platform/types/evaluation/string_check_metric_param_param.py +61 -0
  567. nemo_platform/types/evaluation/string_check_metric_response.py +75 -0
  568. nemo_platform/types/evaluation/system_benchmark.py +71 -0
  569. nemo_platform/types/evaluation/system_benchmark_offline_job.py +58 -0
  570. nemo_platform/types/evaluation/system_benchmark_offline_job_param.py +60 -0
  571. nemo_platform/types/evaluation/system_benchmark_online_job.py +54 -0
  572. nemo_platform/types/evaluation/system_benchmark_online_job_param.py +55 -0
  573. nemo_platform/types/evaluation/system_metric.py +70 -0
  574. nemo_platform/types/evaluation/system_metric_param.py +50 -0
  575. nemo_platform/types/evaluation/system_metric_param_param.py +51 -0
  576. nemo_platform/types/evaluation/system_metric_response.py +66 -0
  577. nemo_platform/types/evaluation/tool_call_accuracy_metric.py +70 -0
  578. nemo_platform/types/evaluation/tool_call_accuracy_metric_param.py +44 -0
  579. nemo_platform/types/evaluation/tool_call_accuracy_metric_param_param.py +44 -0
  580. nemo_platform/types/evaluation/tool_call_accuracy_metric_response.py +63 -0
  581. nemo_platform/types/evaluation/tool_calling_metric.py +70 -0
  582. nemo_platform/types/evaluation/tool_calling_metric_param.py +47 -0
  583. nemo_platform/types/evaluation/tool_calling_metric_param_param.py +47 -0
  584. nemo_platform/types/evaluation/tool_calling_metric_response.py +63 -0
  585. nemo_platform/types/evaluation/topic_adherence_metric.py +92 -0
  586. nemo_platform/types/evaluation/topic_adherence_metric_param.py +69 -0
  587. nemo_platform/types/evaluation/topic_adherence_metric_param_param.py +70 -0
  588. nemo_platform/types/evaluation/topic_adherence_metric_response.py +88 -0
  589. nemo_platform/types/files/__init__.py +45 -0
  590. nemo_platform/types/files/cache_status.py +22 -0
  591. nemo_platform/types/files/dataset_metadata_content.py +46 -0
  592. nemo_platform/types/files/dataset_metadata_content_param.py +45 -0
  593. nemo_platform/types/files/file_list_files_params.py +35 -0
  594. nemo_platform/types/files/file_upload_file_params.py +28 -0
  595. nemo_platform/types/files/fileset.py +62 -0
  596. nemo_platform/types/files/fileset_create_params.py +74 -0
  597. nemo_platform/types/files/fileset_file.py +36 -0
  598. nemo_platform/types/files/fileset_filter_param.py +54 -0
  599. nemo_platform/types/files/fileset_list_params.py +47 -0
  600. nemo_platform/types/files/fileset_metadata_param.py +46 -0
  601. nemo_platform/types/files/fileset_metadata_param_param.py +47 -0
  602. nemo_platform/types/files/fileset_outputs_page.py +37 -0
  603. nemo_platform/types/files/fileset_purpose.py +22 -0
  604. nemo_platform/types/files/fileset_update_params.py +49 -0
  605. nemo_platform/types/files/huggingface_storage_config.py +60 -0
  606. nemo_platform/types/files/huggingface_storage_config_param.py +60 -0
  607. nemo_platform/types/files/list_fileset_files_response.py +27 -0
  608. nemo_platform/types/files/local_storage_config.py +39 -0
  609. nemo_platform/types/files/local_storage_config_param.py +38 -0
  610. nemo_platform/types/files/ngc_storage_config.py +66 -0
  611. nemo_platform/types/files/ngc_storage_config_param.py +66 -0
  612. nemo_platform/types/files/otlp/__init__.py +22 -0
  613. nemo_platform/types/files/otlp/log_query_params.py +36 -0
  614. nemo_platform/types/files/otlp/otel_export_logs_partial_success.py +34 -0
  615. nemo_platform/types/files/otlp/otel_export_logs_service_response.py +35 -0
  616. nemo_platform/types/files/s3_storage_config.py +85 -0
  617. nemo_platform/types/files/s3_storage_config_param.py +85 -0
  618. nemo_platform/types/files/secret_ref.py +22 -0
  619. nemo_platform/types/files/storage_config_type.py +22 -0
  620. nemo_platform/types/guardrail/__init__.py +165 -0
  621. nemo_platform/types/guardrail/action_rails.py +36 -0
  622. nemo_platform/types/guardrail/action_rails_param.py +38 -0
  623. nemo_platform/types/guardrail/activated_rail.py +61 -0
  624. nemo_platform/types/guardrail/ai_defense_rail_config.py +36 -0
  625. nemo_platform/types/guardrail/ai_defense_rail_config_param.py +36 -0
  626. nemo_platform/types/guardrail/auto_align_options.py +29 -0
  627. nemo_platform/types/guardrail/auto_align_options_param.py +30 -0
  628. nemo_platform/types/guardrail/auto_align_rail_config.py +35 -0
  629. nemo_platform/types/guardrail/auto_align_rail_config_param.py +37 -0
  630. nemo_platform/types/guardrail/cache_stats_config.py +32 -0
  631. nemo_platform/types/guardrail/cache_stats_config_param.py +32 -0
  632. nemo_platform/types/guardrail/chat_completion_assistant_message_param.py +45 -0
  633. nemo_platform/types/guardrail/chat_completion_content_part_image_param.py +34 -0
  634. nemo_platform/types/guardrail/chat_completion_content_part_text_param.py +32 -0
  635. nemo_platform/types/guardrail/chat_completion_function_message_param.py +35 -0
  636. nemo_platform/types/guardrail/chat_completion_message_tool_call_param.py +37 -0
  637. nemo_platform/types/guardrail/chat_completion_system_message_param.py +35 -0
  638. nemo_platform/types/guardrail/chat_completion_tool_message_param.py +35 -0
  639. nemo_platform/types/guardrail/chat_completion_user_message_param.py +41 -0
  640. nemo_platform/types/guardrail/clavata_rail_config.py +47 -0
  641. nemo_platform/types/guardrail/clavata_rail_config_param.py +48 -0
  642. nemo_platform/types/guardrail/clavata_rail_options.py +36 -0
  643. nemo_platform/types/guardrail/clavata_rail_options_param.py +38 -0
  644. nemo_platform/types/guardrail/config_create_params.py +36 -0
  645. nemo_platform/types/guardrail/config_list_params.py +47 -0
  646. nemo_platform/types/guardrail/config_update_params.py +33 -0
  647. nemo_platform/types/guardrail/content_safety_config.py +34 -0
  648. nemo_platform/types/guardrail/content_safety_config_param.py +35 -0
  649. nemo_platform/types/guardrail/crowd_strike_aidr_rail_config.py +29 -0
  650. nemo_platform/types/guardrail/crowd_strike_aidr_rail_config_param.py +29 -0
  651. nemo_platform/types/guardrail/dialog_rails.py +34 -0
  652. nemo_platform/types/guardrail/dialog_rails_param.py +35 -0
  653. nemo_platform/types/guardrail/executed_action.py +48 -0
  654. nemo_platform/types/guardrail/fact_checking_rail_config.py +31 -0
  655. nemo_platform/types/guardrail/fact_checking_rail_config_param.py +32 -0
  656. nemo_platform/types/guardrail/fiddler_guardrails.py +35 -0
  657. nemo_platform/types/guardrail/fiddler_guardrails_param.py +35 -0
  658. nemo_platform/types/guardrail/function_call_param.py +35 -0
  659. nemo_platform/types/guardrail/function_param.py +35 -0
  660. nemo_platform/types/guardrail/g_li_ner_detection.py +51 -0
  661. nemo_platform/types/guardrail/g_li_ner_detection_options.py +29 -0
  662. nemo_platform/types/guardrail/g_li_ner_detection_options_param.py +31 -0
  663. nemo_platform/types/guardrail/g_li_ner_detection_param.py +52 -0
  664. nemo_platform/types/guardrail/generation_log.py +44 -0
  665. nemo_platform/types/guardrail/generation_log_options_param.py +50 -0
  666. nemo_platform/types/guardrail/generation_options_param.py +55 -0
  667. nemo_platform/types/guardrail/generation_rails_options_param.py +53 -0
  668. nemo_platform/types/guardrail/generation_stats.py +56 -0
  669. nemo_platform/types/guardrail/guardrail_check_params.py +164 -0
  670. nemo_platform/types/guardrail/guardrail_check_response.py +36 -0
  671. nemo_platform/types/guardrail/guardrail_config.py +59 -0
  672. nemo_platform/types/guardrail/guardrail_config_filter_param.py +49 -0
  673. nemo_platform/types/guardrail/guardrail_configs_page.py +37 -0
  674. nemo_platform/types/guardrail/guardrails_ai_rail_config.py +33 -0
  675. nemo_platform/types/guardrail/guardrails_ai_rail_config_param.py +35 -0
  676. nemo_platform/types/guardrail/guardrails_ai_validator_config.py +44 -0
  677. nemo_platform/types/guardrail/guardrails_ai_validator_config_param.py +45 -0
  678. nemo_platform/types/guardrail/guardrails_data.py +40 -0
  679. nemo_platform/types/guardrail/guardrails_data_param.py +67 -0
  680. nemo_platform/types/guardrail/image_u_rl_param.py +32 -0
  681. nemo_platform/types/guardrail/injection_detection.py +49 -0
  682. nemo_platform/types/guardrail/injection_detection_param.py +52 -0
  683. nemo_platform/types/guardrail/input_rails.py +32 -0
  684. nemo_platform/types/guardrail/input_rails_param.py +34 -0
  685. nemo_platform/types/guardrail/instruction.py +30 -0
  686. nemo_platform/types/guardrail/instruction_param.py +32 -0
  687. nemo_platform/types/guardrail/jailbreak_detection_config.py +52 -0
  688. nemo_platform/types/guardrail/jailbreak_detection_config_param.py +58 -0
  689. nemo_platform/types/guardrail/llm_call_info.py +63 -0
  690. nemo_platform/types/guardrail/log_adapter_config.py +41 -0
  691. nemo_platform/types/guardrail/log_adapter_config_param.py +27 -0
  692. nemo_platform/types/guardrail/message_template.py +30 -0
  693. nemo_platform/types/guardrail/message_template_param.py +32 -0
  694. nemo_platform/types/guardrail/model.py +55 -0
  695. nemo_platform/types/guardrail/model_cache_config.py +36 -0
  696. nemo_platform/types/guardrail/model_cache_config_param.py +37 -0
  697. nemo_platform/types/guardrail/model_param.py +55 -0
  698. nemo_platform/types/guardrail/model_parameters.py +51 -0
  699. nemo_platform/types/guardrail/model_parameters_param.py +38 -0
  700. nemo_platform/types/guardrail/multilingual_config.py +40 -0
  701. nemo_platform/types/guardrail/multilingual_config_param.py +41 -0
  702. nemo_platform/types/guardrail/output_rails.py +44 -0
  703. nemo_platform/types/guardrail/output_rails_param.py +46 -0
  704. nemo_platform/types/guardrail/output_rails_streaming_config.py +44 -0
  705. nemo_platform/types/guardrail/output_rails_streaming_config_param.py +44 -0
  706. nemo_platform/types/guardrail/pangea_rail_config.py +33 -0
  707. nemo_platform/types/guardrail/pangea_rail_config_param.py +34 -0
  708. nemo_platform/types/guardrail/pangea_rail_options.py +31 -0
  709. nemo_platform/types/guardrail/pangea_rail_options_param.py +33 -0
  710. nemo_platform/types/guardrail/patronus_evaluate_api_params.py +38 -0
  711. nemo_platform/types/guardrail/patronus_evaluate_api_params_param.py +40 -0
  712. nemo_platform/types/guardrail/patronus_evaluate_config.py +30 -0
  713. nemo_platform/types/guardrail/patronus_evaluate_config_param.py +31 -0
  714. nemo_platform/types/guardrail/patronus_evaluation_success_strategy.py +22 -0
  715. nemo_platform/types/guardrail/patronus_rail_config.py +33 -0
  716. nemo_platform/types/guardrail/patronus_rail_config_param.py +34 -0
  717. nemo_platform/types/guardrail/private_ai_detection.py +39 -0
  718. nemo_platform/types/guardrail/private_ai_detection_options.py +29 -0
  719. nemo_platform/types/guardrail/private_ai_detection_options_param.py +31 -0
  720. nemo_platform/types/guardrail/private_ai_detection_param.py +40 -0
  721. nemo_platform/types/guardrail/rail_status.py +26 -0
  722. nemo_platform/types/guardrail/rails.py +73 -0
  723. nemo_platform/types/guardrail/rails_config.py +79 -0
  724. nemo_platform/types/guardrail/rails_config_data.py +94 -0
  725. nemo_platform/types/guardrail/rails_config_data_param.py +95 -0
  726. nemo_platform/types/guardrail/rails_config_param.py +81 -0
  727. nemo_platform/types/guardrail/rails_param.py +74 -0
  728. nemo_platform/types/guardrail/reasoning_config.py +32 -0
  729. nemo_platform/types/guardrail/reasoning_config_param.py +32 -0
  730. nemo_platform/types/guardrail/regex_detection.py +36 -0
  731. nemo_platform/types/guardrail/regex_detection_options.py +32 -0
  732. nemo_platform/types/guardrail/regex_detection_options_param.py +34 -0
  733. nemo_platform/types/guardrail/regex_detection_param.py +37 -0
  734. nemo_platform/types/guardrail/retrieval_rails.py +29 -0
  735. nemo_platform/types/guardrail/retrieval_rails_param.py +31 -0
  736. nemo_platform/types/guardrail/sensitive_data_detection.py +43 -0
  737. nemo_platform/types/guardrail/sensitive_data_detection_options.py +37 -0
  738. nemo_platform/types/guardrail/sensitive_data_detection_options_param.py +39 -0
  739. nemo_platform/types/guardrail/sensitive_data_detection_param.py +45 -0
  740. nemo_platform/types/guardrail/single_call_config.py +31 -0
  741. nemo_platform/types/guardrail/single_call_config_param.py +31 -0
  742. nemo_platform/types/guardrail/status_enum.py +22 -0
  743. nemo_platform/types/guardrail/task_prompt.py +63 -0
  744. nemo_platform/types/guardrail/task_prompt_param.py +65 -0
  745. nemo_platform/types/guardrail/tool_input_rails.py +36 -0
  746. nemo_platform/types/guardrail/tool_input_rails_param.py +38 -0
  747. nemo_platform/types/guardrail/tool_output_rails.py +36 -0
  748. nemo_platform/types/guardrail/tool_output_rails_param.py +38 -0
  749. nemo_platform/types/guardrail/tracing_config.py +48 -0
  750. nemo_platform/types/guardrail/tracing_config_param.py +50 -0
  751. nemo_platform/types/guardrail/trend_micro_rail_config.py +51 -0
  752. nemo_platform/types/guardrail/trend_micro_rail_config_param.py +51 -0
  753. nemo_platform/types/guardrail/user_messages_config.py +42 -0
  754. nemo_platform/types/guardrail/user_messages_config_param.py +42 -0
  755. nemo_platform/types/iam/__init__.py +26 -0
  756. nemo_platform/types/iam/date_range_filter_param.py +36 -0
  757. nemo_platform/types/iam/role_binding.py +42 -0
  758. nemo_platform/types/iam/role_binding_create_params.py +39 -0
  759. nemo_platform/types/iam/role_binding_delete_params.py +30 -0
  760. nemo_platform/types/iam/role_binding_filter_param.py +49 -0
  761. nemo_platform/types/iam/role_binding_list_params.py +44 -0
  762. nemo_platform/types/iam/role_bindings_page.py +37 -0
  763. nemo_platform/types/inference/__init__.py +60 -0
  764. nemo_platform/types/inference/deployment_config_create_params.py +47 -0
  765. nemo_platform/types/inference/deployment_config_list_params.py +46 -0
  766. nemo_platform/types/inference/deployment_config_update_params.py +37 -0
  767. nemo_platform/types/inference/deployment_configs/__init__.py +20 -0
  768. nemo_platform/types/inference/deployment_configs/version_list_response.py +25 -0
  769. nemo_platform/types/inference/deployment_create_params.py +45 -0
  770. nemo_platform/types/inference/deployment_list_models_response.py +23 -0
  771. nemo_platform/types/inference/deployment_list_params.py +52 -0
  772. nemo_platform/types/inference/deployment_update_params.py +35 -0
  773. nemo_platform/types/inference/deployment_update_status_params.py +42 -0
  774. nemo_platform/types/inference/deployments/__init__.py +20 -0
  775. nemo_platform/types/inference/deployments/version_list_response.py +25 -0
  776. nemo_platform/types/inference/gateway/__init__.py +38 -0
  777. nemo_platform/types/inference/gateway/model_patch_params.py +31 -0
  778. nemo_platform/types/inference/gateway/model_patch_response.py +23 -0
  779. nemo_platform/types/inference/gateway/model_post_params.py +31 -0
  780. nemo_platform/types/inference/gateway/model_post_response.py +23 -0
  781. nemo_platform/types/inference/gateway/model_put_params.py +31 -0
  782. nemo_platform/types/inference/gateway/model_put_response.py +23 -0
  783. nemo_platform/types/inference/gateway/openai/__init__.py +18 -0
  784. nemo_platform/types/inference/gateway/openai/v1/__init__.py +21 -0
  785. nemo_platform/types/inference/gateway/openai/v1/openai_list_models_resp.py +31 -0
  786. nemo_platform/types/inference/gateway/openai/v1/openai_model_resp.py +34 -0
  787. nemo_platform/types/inference/gateway/openai_patch_params.py +29 -0
  788. nemo_platform/types/inference/gateway/openai_patch_response.py +23 -0
  789. nemo_platform/types/inference/gateway/openai_post_params.py +29 -0
  790. nemo_platform/types/inference/gateway/openai_post_response.py +23 -0
  791. nemo_platform/types/inference/gateway/openai_put_params.py +29 -0
  792. nemo_platform/types/inference/gateway/openai_put_response.py +23 -0
  793. nemo_platform/types/inference/gateway/provider_patch_params.py +31 -0
  794. nemo_platform/types/inference/gateway/provider_patch_response.py +23 -0
  795. nemo_platform/types/inference/gateway/provider_post_params.py +31 -0
  796. nemo_platform/types/inference/gateway/provider_post_response.py +23 -0
  797. nemo_platform/types/inference/gateway/provider_put_params.py +31 -0
  798. nemo_platform/types/inference/gateway/provider_put_response.py +23 -0
  799. nemo_platform/types/inference/gateway/provider_ready_response.py +23 -0
  800. nemo_platform/types/inference/k8s_nim_operator_config.py +57 -0
  801. nemo_platform/types/inference/k8s_nim_operator_config_param.py +58 -0
  802. nemo_platform/types/inference/middleware_call.py +55 -0
  803. nemo_platform/types/inference/middleware_call_param.py +56 -0
  804. nemo_platform/types/inference/model_deployment.py +97 -0
  805. nemo_platform/types/inference/model_deployment_config.py +76 -0
  806. nemo_platform/types/inference/model_deployment_config_filter_param.py +49 -0
  807. nemo_platform/types/inference/model_deployment_configs_page.py +37 -0
  808. nemo_platform/types/inference/model_deployment_filter_param.py +56 -0
  809. nemo_platform/types/inference/model_deployment_status.py +24 -0
  810. nemo_platform/types/inference/model_deployment_status_history_item.py +37 -0
  811. nemo_platform/types/inference/model_deployments_page.py +37 -0
  812. nemo_platform/types/inference/model_provider.py +134 -0
  813. nemo_platform/types/inference/model_provider_filter_param.py +56 -0
  814. nemo_platform/types/inference/model_provider_sort.py +24 -0
  815. nemo_platform/types/inference/model_provider_status.py +24 -0
  816. nemo_platform/types/inference/model_providers_page.py +37 -0
  817. nemo_platform/types/inference/model_type.py +22 -0
  818. nemo_platform/types/inference/nim_deployment.py +96 -0
  819. nemo_platform/types/inference/nim_deployment_param.py +93 -0
  820. nemo_platform/types/inference/provider_create_params.py +94 -0
  821. nemo_platform/types/inference/provider_list_params.py +47 -0
  822. nemo_platform/types/inference/provider_update_params.py +87 -0
  823. nemo_platform/types/inference/provider_update_status_params.py +48 -0
  824. nemo_platform/types/inference/served_model_mapping.py +35 -0
  825. nemo_platform/types/inference/served_model_mapping_param.py +32 -0
  826. nemo_platform/types/inference/virtual_model.py +91 -0
  827. nemo_platform/types/inference/virtual_model_create_params.py +83 -0
  828. nemo_platform/types/inference/virtual_model_inference_config.py +32 -0
  829. nemo_platform/types/inference/virtual_model_inference_config_param.py +34 -0
  830. nemo_platform/types/inference/virtual_model_list_params.py +35 -0
  831. nemo_platform/types/inference/virtual_model_patch_params.py +80 -0
  832. nemo_platform/types/inference/virtual_models_page.py +37 -0
  833. nemo_platform/types/intake/__init__.py +86 -0
  834. nemo_platform/types/intake/app.py +51 -0
  835. nemo_platform/types/intake/app_create_params.py +38 -0
  836. nemo_platform/types/intake/app_filter_param.py +46 -0
  837. nemo_platform/types/intake/app_list_params.py +44 -0
  838. nemo_platform/types/intake/app_patch_params.py +35 -0
  839. nemo_platform/types/intake/app_sort_field.py +22 -0
  840. nemo_platform/types/intake/apps/__init__.py +26 -0
  841. nemo_platform/types/intake/apps/task.py +54 -0
  842. nemo_platform/types/intake/apps/task_create_params.py +40 -0
  843. nemo_platform/types/intake/apps/task_filter_param.py +49 -0
  844. nemo_platform/types/intake/apps/task_list_params.py +44 -0
  845. nemo_platform/types/intake/apps/task_patch_params.py +37 -0
  846. nemo_platform/types/intake/apps/task_sort_field.py +22 -0
  847. nemo_platform/types/intake/apps/tasks_page.py +37 -0
  848. nemo_platform/types/intake/apps_page.py +37 -0
  849. nemo_platform/types/intake/entries/__init__.py +20 -0
  850. nemo_platform/types/intake/entries/event_create_params.py +40 -0
  851. nemo_platform/types/intake/entry.py +98 -0
  852. nemo_platform/types/intake/entry_context.py +79 -0
  853. nemo_platform/types/intake/entry_context_filter_param.py +41 -0
  854. nemo_platform/types/intake/entry_context_param.py +82 -0
  855. nemo_platform/types/intake/entry_create_params.py +85 -0
  856. nemo_platform/types/intake/entry_data.py +48 -0
  857. nemo_platform/types/intake/entry_data_param.py +51 -0
  858. nemo_platform/types/intake/entry_filter_param.py +85 -0
  859. nemo_platform/types/intake/entry_list_params.py +47 -0
  860. nemo_platform/types/intake/entry_patch_params.py +79 -0
  861. nemo_platform/types/intake/entry_sort_field.py +22 -0
  862. nemo_platform/types/intake/entry_user_rating_filter_param.py +31 -0
  863. nemo_platform/types/intake/entrys_page.py +37 -0
  864. nemo_platform/types/intake/evaluation_context_param.py +41 -0
  865. nemo_platform/types/intake/evaluator_result.py +52 -0
  866. nemo_platform/types/intake/evaluator_result_create_params.py +52 -0
  867. nemo_platform/types/intake/evaluator_result_data_type.py +22 -0
  868. nemo_platform/types/intake/evaluator_result_event.py +67 -0
  869. nemo_platform/types/intake/evaluator_result_event_param.py +69 -0
  870. nemo_platform/types/intake/evaluator_result_filter_param.py +49 -0
  871. nemo_platform/types/intake/evaluator_result_list_params.py +43 -0
  872. nemo_platform/types/intake/evaluator_result_sort_field.py +22 -0
  873. nemo_platform/types/intake/evaluator_results_page.py +37 -0
  874. nemo_platform/types/intake/export_config_param.py +44 -0
  875. nemo_platform/types/intake/export_config_param_param.py +45 -0
  876. nemo_platform/types/intake/export_preview_params.py +34 -0
  877. nemo_platform/types/intake/export_preview_response.py +39 -0
  878. nemo_platform/types/intake/exports/__init__.py +28 -0
  879. nemo_platform/types/intake/exports/export_config.py +44 -0
  880. nemo_platform/types/intake/exports/export_job.py +76 -0
  881. nemo_platform/types/intake/exports/export_job_filter_param.py +50 -0
  882. nemo_platform/types/intake/exports/export_job_sort_field.py +22 -0
  883. nemo_platform/types/intake/exports/export_jobs_page.py +37 -0
  884. nemo_platform/types/intake/exports/export_status_details.py +35 -0
  885. nemo_platform/types/intake/exports/job_create_params.py +40 -0
  886. nemo_platform/types/intake/exports/job_list_params.py +46 -0
  887. nemo_platform/types/intake/exports/job_status.py +22 -0
  888. nemo_platform/types/intake/flexible_entry_request.py +63 -0
  889. nemo_platform/types/intake/flexible_entry_request_param.py +51 -0
  890. nemo_platform/types/intake/flexible_entry_response.py +62 -0
  891. nemo_platform/types/intake/flexible_entry_response_param.py +49 -0
  892. nemo_platform/types/intake/flexible_message.py +56 -0
  893. nemo_platform/types/intake/flexible_message_param.py +43 -0
  894. nemo_platform/types/intake/float_filter_param.py +32 -0
  895. nemo_platform/types/intake/ingest/__init__.py +37 -0
  896. nemo_platform/types/intake/ingest/atif_agent_param.py +35 -0
  897. nemo_platform/types/intake/ingest/atif_content_part_image_param.py +30 -0
  898. nemo_platform/types/intake/ingest/atif_content_part_param.py +28 -0
  899. nemo_platform/types/intake/ingest/atif_content_part_text_param.py +28 -0
  900. nemo_platform/types/intake/ingest/atif_create_params.py +52 -0
  901. nemo_platform/types/intake/ingest/atif_final_metrics_param.py +37 -0
  902. nemo_platform/types/intake/ingest/atif_image_source_param.py +28 -0
  903. nemo_platform/types/intake/ingest/atif_metrics_param.py +41 -0
  904. nemo_platform/types/intake/ingest/atif_observation_param.py +29 -0
  905. nemo_platform/types/intake/ingest/atif_observation_result_param.py +36 -0
  906. nemo_platform/types/intake/ingest/atif_step_agent_param.py +58 -0
  907. nemo_platform/types/intake/ingest/atif_step_param.py +29 -0
  908. nemo_platform/types/intake/ingest/atif_step_system_param.py +43 -0
  909. nemo_platform/types/intake/ingest/atif_step_user_param.py +43 -0
  910. nemo_platform/types/intake/ingest/atif_subagent_trajectory_ref_param.py +33 -0
  911. nemo_platform/types/intake/ingest/atif_tool_call_param.py +31 -0
  912. nemo_platform/types/intake/ingest/chat_completion_create_params.py +66 -0
  913. nemo_platform/types/intake/ingest/chat_completions_ingest_response.py +26 -0
  914. nemo_platform/types/intake/ingest/otlp/__init__.py +18 -0
  915. nemo_platform/types/intake/ingest/otlp/v1/__init__.py +20 -0
  916. nemo_platform/types/intake/ingest/otlp/v1/ingest_response.py +26 -0
  917. nemo_platform/types/intake/message_role.py +22 -0
  918. nemo_platform/types/intake/reviewer_annotation_event.py +95 -0
  919. nemo_platform/types/intake/reviewer_annotation_event_param.py +97 -0
  920. nemo_platform/types/intake/span.py +100 -0
  921. nemo_platform/types/intake/span_evaluation_context.py +40 -0
  922. nemo_platform/types/intake/span_filter_param.py +95 -0
  923. nemo_platform/types/intake/span_kind.py +24 -0
  924. nemo_platform/types/intake/span_list_params.py +46 -0
  925. nemo_platform/types/intake/span_sort_field.py +22 -0
  926. nemo_platform/types/intake/span_status.py +22 -0
  927. nemo_platform/types/intake/spans/__init__.py +20 -0
  928. nemo_platform/types/intake/spans/evaluator_result_list_response.py +25 -0
  929. nemo_platform/types/intake/spans_page.py +37 -0
  930. nemo_platform/types/intake/thumb_direction.py +22 -0
  931. nemo_platform/types/intake/trace.py +65 -0
  932. nemo_platform/types/intake/trace_filter_param.py +60 -0
  933. nemo_platform/types/intake/trace_list_params.py +49 -0
  934. nemo_platform/types/intake/trace_retrieve_params.py +32 -0
  935. nemo_platform/types/intake/trace_sort_field.py +22 -0
  936. nemo_platform/types/intake/traces_page.py +37 -0
  937. nemo_platform/types/intake/usage.py +65 -0
  938. nemo_platform/types/intake/usage_param.py +68 -0
  939. nemo_platform/types/intake/user_action_event.py +65 -0
  940. nemo_platform/types/intake/user_action_event_param.py +68 -0
  941. nemo_platform/types/intake/user_feedback_event.py +84 -0
  942. nemo_platform/types/intake/user_feedback_event_param.py +86 -0
  943. nemo_platform/types/intake/user_rating.py +68 -0
  944. nemo_platform/types/intake/user_rating_param.py +70 -0
  945. nemo_platform/types/jobs/__init__.py +95 -0
  946. nemo_platform/types/jobs/compute_resource_spec.py +32 -0
  947. nemo_platform/types/jobs/compute_resource_spec_param.py +32 -0
  948. nemo_platform/types/jobs/compute_resources.py +46 -0
  949. nemo_platform/types/jobs/compute_resources_param.py +47 -0
  950. nemo_platform/types/jobs/container_spec.py +35 -0
  951. nemo_platform/types/jobs/container_spec_param.py +37 -0
  952. nemo_platform/types/jobs/cpu_execution_provider.py +46 -0
  953. nemo_platform/types/jobs/cpu_execution_provider_param.py +46 -0
  954. nemo_platform/types/jobs/distributed_gpu_execution_provider.py +46 -0
  955. nemo_platform/types/jobs/distributed_gpu_execution_provider_param.py +46 -0
  956. nemo_platform/types/jobs/docker_job_execution_profile.py +43 -0
  957. nemo_platform/types/jobs/docker_job_execution_profile_config.py +52 -0
  958. nemo_platform/types/jobs/docker_job_network_config.py +27 -0
  959. nemo_platform/types/jobs/docker_job_storage_config.py +36 -0
  960. nemo_platform/types/jobs/docker_volume_mount.py +47 -0
  961. nemo_platform/types/jobs/e2e_job_execution_profile.py +43 -0
  962. nemo_platform/types/jobs/gpu_execution_provider.py +46 -0
  963. nemo_platform/types/jobs/gpu_execution_provider_param.py +46 -0
  964. nemo_platform/types/jobs/image_pull_secret.py +27 -0
  965. nemo_platform/types/jobs/job_create_params.py +46 -0
  966. nemo_platform/types/jobs/job_execution_profile_config.py +42 -0
  967. nemo_platform/types/jobs/job_get_logs_params.py +41 -0
  968. nemo_platform/types/jobs/job_list_execution_profiles_response.py +37 -0
  969. nemo_platform/types/jobs/job_list_params.py +47 -0
  970. nemo_platform/types/jobs/job_update_status_details_params.py +29 -0
  971. nemo_platform/types/jobs/kubernetes_empty_dir_volume.py +32 -0
  972. nemo_platform/types/jobs/kubernetes_job_execution_profile.py +43 -0
  973. nemo_platform/types/jobs/kubernetes_job_execution_profile_config.py +101 -0
  974. nemo_platform/types/jobs/kubernetes_job_storage_config.py +40 -0
  975. nemo_platform/types/jobs/kubernetes_object_metadata.py +28 -0
  976. nemo_platform/types/jobs/kubernetes_persistent_volume_claim.py +32 -0
  977. nemo_platform/types/jobs/kubernetes_volume.py +37 -0
  978. nemo_platform/types/jobs/kubernetes_volume_mount.py +38 -0
  979. nemo_platform/types/jobs/platform_job_environment_variable.py +36 -0
  980. nemo_platform/types/jobs/platform_job_environment_variable_param.py +37 -0
  981. nemo_platform/types/jobs/platform_job_list_task_response.py +29 -0
  982. nemo_platform/types/jobs/platform_job_response.py +75 -0
  983. nemo_platform/types/jobs/platform_job_responses_page.py +37 -0
  984. nemo_platform/types/jobs/platform_job_secret_environment_variable_ref.py +27 -0
  985. nemo_platform/types/jobs/platform_job_secret_environment_variable_ref_param.py +29 -0
  986. nemo_platform/types/jobs/platform_job_sort_field.py +22 -0
  987. nemo_platform/types/jobs/platform_job_spec.py +30 -0
  988. nemo_platform/types/jobs/platform_job_spec_param.py +32 -0
  989. nemo_platform/types/jobs/platform_job_step.py +75 -0
  990. nemo_platform/types/jobs/platform_job_step_spec.py +63 -0
  991. nemo_platform/types/jobs/platform_job_step_spec_param.py +65 -0
  992. nemo_platform/types/jobs/platform_job_step_with_context.py +67 -0
  993. nemo_platform/types/jobs/platform_job_step_with_contexts_page.py +37 -0
  994. nemo_platform/types/jobs/platform_job_steps_list_filter_param.py +38 -0
  995. nemo_platform/types/jobs/platform_job_task.py +75 -0
  996. nemo_platform/types/jobs/platform_jobs_list_filter_param.py +51 -0
  997. nemo_platform/types/jobs/result_create_params.py +34 -0
  998. nemo_platform/types/jobs/result_list_params.py +34 -0
  999. nemo_platform/types/jobs/step_lifecycle.py +37 -0
  1000. nemo_platform/types/jobs/step_lifecycle_param.py +37 -0
  1001. nemo_platform/types/jobs/step_list_params.py +44 -0
  1002. nemo_platform/types/jobs/step_update_status_params.py +44 -0
  1003. nemo_platform/types/jobs/subprocess_execution_provider.py +33 -0
  1004. nemo_platform/types/jobs/subprocess_execution_provider_param.py +34 -0
  1005. nemo_platform/types/jobs/subprocess_job_execution_profile.py +36 -0
  1006. nemo_platform/types/jobs/subprocess_job_execution_profile_config.py +49 -0
  1007. nemo_platform/types/jobs/task_create_or_update_params.py +46 -0
  1008. nemo_platform/types/jobs/volcano_job_execution_profile.py +39 -0
  1009. nemo_platform/types/jobs/volcano_job_execution_profile_config.py +114 -0
  1010. nemo_platform/types/members/__init__.py +24 -0
  1011. nemo_platform/types/members/member_create_params.py +40 -0
  1012. nemo_platform/types/members/member_delete_params.py +32 -0
  1013. nemo_platform/types/members/member_update_params.py +37 -0
  1014. nemo_platform/types/members/workspace_member.py +39 -0
  1015. nemo_platform/types/members/workspace_member_list_response.py +29 -0
  1016. nemo_platform/types/models/__init__.py +34 -0
  1017. nemo_platform/types/models/adapter.py +73 -0
  1018. nemo_platform/types/models/adapter_create_params.py +54 -0
  1019. nemo_platform/types/models/adapter_update_params.py +37 -0
  1020. nemo_platform/types/models/base_model_filter_param.py +29 -0
  1021. nemo_platform/types/models/finetuning_type_filter_param.py +31 -0
  1022. nemo_platform/types/models/lora.py +30 -0
  1023. nemo_platform/types/models/lora_param.py +30 -0
  1024. nemo_platform/types/models/model_create_params.py +93 -0
  1025. nemo_platform/types/models/model_entity.py +112 -0
  1026. nemo_platform/types/models/model_entity_filter_param.py +72 -0
  1027. nemo_platform/types/models/model_entity_sort_field.py +22 -0
  1028. nemo_platform/types/models/model_entitys_page.py +37 -0
  1029. nemo_platform/types/models/model_list_params.py +50 -0
  1030. nemo_platform/types/models/model_retrieve_params.py +29 -0
  1031. nemo_platform/types/models/model_update_params.py +86 -0
  1032. nemo_platform/types/projects/__init__.py +25 -0
  1033. nemo_platform/types/projects/project.py +45 -0
  1034. nemo_platform/types/projects/project_create_params.py +37 -0
  1035. nemo_platform/types/projects/project_list_params.py +49 -0
  1036. nemo_platform/types/projects/project_sort_field.py +22 -0
  1037. nemo_platform/types/projects/project_update_params.py +29 -0
  1038. nemo_platform/types/projects/projects_page.py +37 -0
  1039. nemo_platform/types/safe_synthesizer/__init__.py +68 -0
  1040. nemo_platform/types/safe_synthesizer/classify_config.py +41 -0
  1041. nemo_platform/types/safe_synthesizer/classify_config_param.py +43 -0
  1042. nemo_platform/types/safe_synthesizer/column.py +46 -0
  1043. nemo_platform/types/safe_synthesizer/column_actions.py +36 -0
  1044. nemo_platform/types/safe_synthesizer/column_actions_param.py +38 -0
  1045. nemo_platform/types/safe_synthesizer/column_param.py +49 -0
  1046. nemo_platform/types/safe_synthesizer/data_parameters.py +69 -0
  1047. nemo_platform/types/safe_synthesizer/data_parameters_param.py +69 -0
  1048. nemo_platform/types/safe_synthesizer/differential_privacy_hyperparams.py +48 -0
  1049. nemo_platform/types/safe_synthesizer/differential_privacy_hyperparams_param.py +48 -0
  1050. nemo_platform/types/safe_synthesizer/evaluation_parameters.py +64 -0
  1051. nemo_platform/types/safe_synthesizer/evaluation_parameters_param.py +66 -0
  1052. nemo_platform/types/safe_synthesizer/generate_parameters.py +104 -0
  1053. nemo_platform/types/safe_synthesizer/generate_parameters_param.py +102 -0
  1054. nemo_platform/types/safe_synthesizer/gliner_config.py +41 -0
  1055. nemo_platform/types/safe_synthesizer/gliner_config_param.py +41 -0
  1056. nemo_platform/types/safe_synthesizer/globals.py +45 -0
  1057. nemo_platform/types/safe_synthesizer/globals_param.py +47 -0
  1058. nemo_platform/types/safe_synthesizer/job_create_params.py +46 -0
  1059. nemo_platform/types/safe_synthesizer/job_get_logs_params.py +30 -0
  1060. nemo_platform/types/safe_synthesizer/job_list_params.py +44 -0
  1061. nemo_platform/types/safe_synthesizer/jobs/__init__.py +21 -0
  1062. nemo_platform/types/safe_synthesizer/jobs/safe_synthesizer_summary.py +95 -0
  1063. nemo_platform/types/safe_synthesizer/jobs/safe_synthesizer_timing.py +41 -0
  1064. nemo_platform/types/safe_synthesizer/ner_config.py +42 -0
  1065. nemo_platform/types/safe_synthesizer/ner_config_param.py +44 -0
  1066. nemo_platform/types/safe_synthesizer/pii_replacer_config.py +40 -0
  1067. nemo_platform/types/safe_synthesizer/pii_replacer_config_param.py +42 -0
  1068. nemo_platform/types/safe_synthesizer/row.py +50 -0
  1069. nemo_platform/types/safe_synthesizer/row_actions.py +33 -0
  1070. nemo_platform/types/safe_synthesizer/row_actions_param.py +35 -0
  1071. nemo_platform/types/safe_synthesizer/row_param.py +53 -0
  1072. nemo_platform/types/safe_synthesizer/safe_synthesizer_job.py +63 -0
  1073. nemo_platform/types/safe_synthesizer/safe_synthesizer_job_config.py +55 -0
  1074. nemo_platform/types/safe_synthesizer/safe_synthesizer_job_config_param.py +56 -0
  1075. nemo_platform/types/safe_synthesizer/safe_synthesizer_jobs_list_filter_param.py +49 -0
  1076. nemo_platform/types/safe_synthesizer/safe_synthesizer_jobs_page.py +37 -0
  1077. nemo_platform/types/safe_synthesizer/safe_synthesizer_jobs_sort_field.py +22 -0
  1078. nemo_platform/types/safe_synthesizer/safe_synthesizer_parameters.py +91 -0
  1079. nemo_platform/types/safe_synthesizer/safe_synthesizer_parameters_param.py +92 -0
  1080. nemo_platform/types/safe_synthesizer/step_definition.py +39 -0
  1081. nemo_platform/types/safe_synthesizer/step_definition_param.py +41 -0
  1082. nemo_platform/types/safe_synthesizer/time_series_parameters.py +73 -0
  1083. nemo_platform/types/safe_synthesizer/time_series_parameters_param.py +74 -0
  1084. nemo_platform/types/safe_synthesizer/training_hyperparams.py +165 -0
  1085. nemo_platform/types/safe_synthesizer/training_hyperparams_param.py +167 -0
  1086. nemo_platform/types/safe_synthesizer/validation_parameters.py +54 -0
  1087. nemo_platform/types/safe_synthesizer/validation_parameters_param.py +54 -0
  1088. nemo_platform/types/secrets/__init__.py +28 -0
  1089. nemo_platform/types/secrets/platform_secret_access_response.py +33 -0
  1090. nemo_platform/types/secrets/platform_secret_admin_rotation_response.py +28 -0
  1091. nemo_platform/types/secrets/platform_secret_response.py +40 -0
  1092. nemo_platform/types/secrets/platform_secret_responses_page.py +37 -0
  1093. nemo_platform/types/secrets/secret_create_params.py +39 -0
  1094. nemo_platform/types/secrets/secret_list_params.py +32 -0
  1095. nemo_platform/types/secrets/secret_update_params.py +32 -0
  1096. nemo_platform/types/shared/__init__.py +50 -0
  1097. nemo_platform/types/shared/api_endpoint_data.py +43 -0
  1098. nemo_platform/types/shared/auth_context.py +48 -0
  1099. nemo_platform/types/shared/auth_discovery_response.py +32 -0
  1100. nemo_platform/types/shared/backend_format.py +22 -0
  1101. nemo_platform/types/shared/datetime_filter.py +33 -0
  1102. nemo_platform/types/shared/delete_response.py +33 -0
  1103. nemo_platform/types/shared/error_response.py +46 -0
  1104. nemo_platform/types/shared/field_error.py +28 -0
  1105. nemo_platform/types/shared/file_storage_type.py +22 -0
  1106. nemo_platform/types/shared/fileset_metadata.py +46 -0
  1107. nemo_platform/types/shared/finetuning_type.py +48 -0
  1108. nemo_platform/types/shared/generic_sort_field.py +22 -0
  1109. nemo_platform/types/shared/http_validation_error.py +27 -0
  1110. nemo_platform/types/shared/linear_layer_spec.py +33 -0
  1111. nemo_platform/types/shared/mamba_config.py +44 -0
  1112. nemo_platform/types/shared/mo_e_config.py +41 -0
  1113. nemo_platform/types/shared/model_metadata_content.py +38 -0
  1114. nemo_platform/types/shared/model_spec.py +111 -0
  1115. nemo_platform/types/shared/oidc_discovery_response.py +42 -0
  1116. nemo_platform/types/shared/pagination_data.py +37 -0
  1117. nemo_platform/types/shared/platform_job_list_result_response.py +27 -0
  1118. nemo_platform/types/shared/platform_job_log.py +34 -0
  1119. nemo_platform/types/shared/platform_job_log_page.py +33 -0
  1120. nemo_platform/types/shared/platform_job_result_response.py +44 -0
  1121. nemo_platform/types/shared/platform_job_status.py +24 -0
  1122. nemo_platform/types/shared/platform_job_status_response.py +48 -0
  1123. nemo_platform/types/shared/platform_job_step_status_response.py +48 -0
  1124. nemo_platform/types/shared/platform_job_task_status_response.py +47 -0
  1125. nemo_platform/types/shared/prompt_data.py +47 -0
  1126. nemo_platform/types/shared/sliding_window_config.py +27 -0
  1127. nemo_platform/types/shared/tool_call_config.py +46 -0
  1128. nemo_platform/types/shared/tool_calling_metadata_content.py +48 -0
  1129. nemo_platform/types/shared/validation_error.py +34 -0
  1130. nemo_platform/types/shared_params/__init__.py +33 -0
  1131. nemo_platform/types/shared_params/api_endpoint_data.py +38 -0
  1132. nemo_platform/types/shared_params/backend_format.py +24 -0
  1133. nemo_platform/types/shared_params/datetime_filter.py +34 -0
  1134. nemo_platform/types/shared_params/file_storage_type.py +24 -0
  1135. nemo_platform/types/shared_params/finetuning_type.py +50 -0
  1136. nemo_platform/types/shared_params/generic_sort_field.py +24 -0
  1137. nemo_platform/types/shared_params/linear_layer_spec.py +35 -0
  1138. nemo_platform/types/shared_params/mamba_config.py +44 -0
  1139. nemo_platform/types/shared_params/mo_e_config.py +41 -0
  1140. nemo_platform/types/shared_params/model_metadata_content.py +39 -0
  1141. nemo_platform/types/shared_params/model_spec.py +113 -0
  1142. nemo_platform/types/shared_params/platform_job_status.py +26 -0
  1143. nemo_platform/types/shared_params/prompt_data.py +48 -0
  1144. nemo_platform/types/shared_params/sliding_window_config.py +29 -0
  1145. nemo_platform/types/shared_params/tool_call_config.py +46 -0
  1146. nemo_platform/types/shared_params/tool_calling_metadata_content.py +48 -0
  1147. nemo_platform/types/workspaces/__init__.py +24 -0
  1148. nemo_platform/types/workspaces/workspace.py +48 -0
  1149. nemo_platform/types/workspaces/workspace_create_params.py +41 -0
  1150. nemo_platform/types/workspaces/workspace_list_params.py +47 -0
  1151. nemo_platform/types/workspaces/workspace_update_params.py +27 -0
  1152. nemo_platform/types/workspaces/workspaces_page.py +37 -0
  1153. nemo_platform/ui/__init__.py +15 -0
  1154. nemo_platform/ui/output.py +109 -0
  1155. nemo_platform/ui/prompts.py +678 -0
  1156. nemo_platform_plugin/.agents/skills/creating-a-plugin/SKILL.md +275 -0
  1157. nemo_platform_plugin/.agents/skills/plugin-config/SKILL.md +168 -0
  1158. nemo_platform_plugin/.agents/skills/plugin-controller/SKILL.md +320 -0
  1159. nemo_platform_plugin/.agents/skills/plugin-entities/SKILL.md +290 -0
  1160. nemo_platform_plugin/.agents/skills/plugin-function/SKILL.md +292 -0
  1161. nemo_platform_plugin/.agents/skills/plugin-inference-middleware/SKILL.md +346 -0
  1162. nemo_platform_plugin/.agents/skills/plugin-job/SKILL.md +247 -0
  1163. nemo_platform_plugin/.agents/skills/plugin-platform-services/SKILL.md +239 -0
  1164. nemo_platform_plugin/.agents/skills/plugin-platform-services/services-reference.md +192 -0
  1165. nemo_platform_plugin/.agents/skills/plugin-service/SKILL.md +181 -0
  1166. nemo_platform_plugin/.agents/skills/plugin-service/crud-example.md +353 -0
  1167. nemo_platform_plugin/.agents/skills/plugin-testing/SKILL.md +206 -0
  1168. nemo_platform_plugin/README.md +43 -0
  1169. nemo_platform_plugin/_base.py +53 -0
  1170. nemo_platform_plugin/_spec_flags.py +573 -0
  1171. nemo_platform_plugin/api/filter.py +189 -0
  1172. nemo_platform_plugin/api/parsed_filter.py +288 -0
  1173. nemo_platform_plugin/api/text_filter.py +291 -0
  1174. nemo_platform_plugin/cli.py +152 -0
  1175. nemo_platform_plugin/cli_errors.py +232 -0
  1176. nemo_platform_plugin/cli_renderer.py +92 -0
  1177. nemo_platform_plugin/commands.py +1433 -0
  1178. nemo_platform_plugin/config.py +844 -0
  1179. nemo_platform_plugin/controller.py +148 -0
  1180. nemo_platform_plugin/dependencies.py +64 -0
  1181. nemo_platform_plugin/discovery.py +484 -0
  1182. nemo_platform_plugin/docs/ARCHITECTURE.md +160 -0
  1183. nemo_platform_plugin/docs/CONFIG.md +151 -0
  1184. nemo_platform_plugin/docs/CONTROLLER.md +209 -0
  1185. nemo_platform_plugin/docs/ENTITY.md +186 -0
  1186. nemo_platform_plugin/docs/INFERENCE_MIDDLEWARE.md +408 -0
  1187. nemo_platform_plugin/docs/JOB.md +237 -0
  1188. nemo_platform_plugin/docs/QUICKSTART.md +306 -0
  1189. nemo_platform_plugin/docs/SERVICE.md +302 -0
  1190. nemo_platform_plugin/entities.py +793 -0
  1191. nemo_platform_plugin/entity.py +79 -0
  1192. nemo_platform_plugin/entity_client.py +54 -0
  1193. nemo_platform_plugin/filter_ops.py +169 -0
  1194. nemo_platform_plugin/function.py +299 -0
  1195. nemo_platform_plugin/function_context.py +61 -0
  1196. nemo_platform_plugin/functions/frames.py +69 -0
  1197. nemo_platform_plugin/functions/routes.py +454 -0
  1198. nemo_platform_plugin/inference_middleware.py +1191 -0
  1199. nemo_platform_plugin/interface.py +28 -0
  1200. nemo_platform_plugin/job.py +370 -0
  1201. nemo_platform_plugin/job_context.py +86 -0
  1202. nemo_platform_plugin/job_results.py +209 -0
  1203. nemo_platform_plugin/jobs/_cli_options.py +204 -0
  1204. nemo_platform_plugin/jobs/api_factory.py +1178 -0
  1205. nemo_platform_plugin/jobs/constants.py +27 -0
  1206. nemo_platform_plugin/jobs/docker.py +76 -0
  1207. nemo_platform_plugin/jobs/exceptions.py +8 -0
  1208. nemo_platform_plugin/jobs/file_manager.py +238 -0
  1209. nemo_platform_plugin/jobs/openapi_utils.py +174 -0
  1210. nemo_platform_plugin/jobs/profile.py +110 -0
  1211. nemo_platform_plugin/jobs/result_manager.py +291 -0
  1212. nemo_platform_plugin/jobs/routes.py +297 -0
  1213. nemo_platform_plugin/jobs/schemas.py +174 -0
  1214. nemo_platform_plugin/refs.py +154 -0
  1215. nemo_platform_plugin/run_dependencies.py +137 -0
  1216. nemo_platform_plugin/scheduler.py +537 -0
  1217. nemo_platform_plugin/schema.py +216 -0
  1218. nemo_platform_plugin/sdk.py +34 -0
  1219. nemo_platform_plugin/seed.py +71 -0
  1220. nemo_platform_plugin/service.py +130 -0
  1221. nemo_platform_plugin/tasks/dispatcher.py +226 -0
  1222. nemo_platform_plugin-0.1.0.dist-info/METADATA +88 -0
  1223. nemo_platform_plugin-0.1.0.dist-info/RECORD +1224 -0
  1224. nemo_platform_plugin-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,1120 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Extended FilesResource classes with FilesetFileSystem support.
5
+
6
+ These classes extend the SDK's generated FilesResource classes to add
7
+ high-level file operations (upload, download, list, delete) and fsspec
8
+ filesystem access.
9
+ """
10
+
11
+ import uuid
12
+ from collections.abc import AsyncIterator, Iterator
13
+ from dataclasses import dataclass
14
+ from pathlib import PurePath
15
+ from typing import Protocol, runtime_checkable
16
+
17
+ from fsspec.callbacks import Callback
18
+ from fsspec.core import has_magic
19
+ from nemo_platform import ConflictError
20
+ from nemo_platform._compat import cached_property
21
+ from nemo_platform.resources.files import AsyncFilesResource as BaseAsyncFilesResource
22
+ from nemo_platform.resources.files import FilesResource as BaseFilesResource
23
+ from nemo_platform.types.files import CacheStatus, FilesetFile
24
+ from nemo_platform.types.files.fileset import Fileset
25
+
26
+ from nemo_platform.filesets.filesystem.filesystem import (
27
+ FilesetFileSystem,
28
+ build_fileset_ref,
29
+ parse_fileset_path,
30
+ )
31
+
32
+
33
+ @dataclass
34
+ class ListFilesResponse:
35
+ """Response from listing files in a fileset.
36
+
37
+ Attributes:
38
+ data: List of files in the fileset.
39
+
40
+ Properties:
41
+ cache_status: Aggregate cache status of all files.
42
+ - "caching" if any file is actively being cached
43
+ - "not_cached" if any file is not cached (and none are caching)
44
+ - "cached" if all files are fully cached
45
+ - "not_cacheable" if all files cannot be cached
46
+ - None if no cache information is available
47
+ """
48
+
49
+ data: list[FilesetFile]
50
+
51
+ @property
52
+ def cache_status(self) -> CacheStatus | None:
53
+ """Get aggregate cache status of all files.
54
+
55
+ Returns the most relevant status based on priority:
56
+ - "caching" if any file is actively being cached
57
+ - "not_cached" if any file is not cached (and none are caching)
58
+ - "cached" if all files are fully cached
59
+ - "not_cacheable" if all files cannot be cached
60
+ - None if no cache information is available
61
+ """
62
+ if not self.data:
63
+ return None
64
+
65
+ statuses = [f.cache_status for f in self.data if f.cache_status is not None]
66
+ if not statuses:
67
+ return None
68
+
69
+ # Priority: caching > not_cached > cached > not_cacheable
70
+ if "caching" in statuses:
71
+ return "caching"
72
+ if "not_cached" in statuses:
73
+ return "not_cached"
74
+ if all(s == "cached" for s in statuses):
75
+ return "cached"
76
+ if all(s == "not_cacheable" for s in statuses):
77
+ return "not_cacheable"
78
+
79
+ # Mixed cached/not_cacheable - return cached since some files are cached
80
+ return "cached"
81
+
82
+
83
+ @runtime_checkable
84
+ class Readable(Protocol):
85
+ """Protocol for file-like objects."""
86
+
87
+ def read(self, size: int = -1) -> bytes: ...
88
+
89
+
90
+ @runtime_checkable
91
+ class AsyncReadable(Protocol):
92
+ """Protocol for async file-like objects (e.g., anyio.open_file(), aiofiles)."""
93
+
94
+ async def read(self, size: int = -1) -> bytes: ...
95
+
96
+
97
+ SyncContent = bytes | str | Readable | Iterator[bytes]
98
+ AsyncContent = bytes | str | AsyncReadable | AsyncIterator[bytes]
99
+
100
+
101
+ def _generate_fileset_name() -> str:
102
+ """Generate a unique fileset name using UUID."""
103
+ return f"fileset-{uuid.uuid4().hex[:8]}"
104
+
105
+
106
+ def _matches_glob(filepath: str, pattern: str) -> bool:
107
+ """Match filepath against a glob pattern using pathlib.
108
+
109
+ Simple patterns (no /) only match top-level files.
110
+ Path patterns (with /) match the full relative path from the right.
111
+
112
+ Examples:
113
+ _matches_glob("train.json", "*.json") -> True
114
+ _matches_glob("subdir/nested.json", "*.json") -> False (nested file)
115
+ _matches_glob("subdir/nested.json", "subdir/*.json") -> True
116
+ _matches_glob("subdir/nested.json", "*/*.json") -> True
117
+
118
+ Args:
119
+ filepath: The file path to check (relative path within fileset).
120
+ pattern: Glob pattern to match against.
121
+
122
+ Returns:
123
+ True if the filepath matches the pattern.
124
+ """
125
+ if "/" not in pattern:
126
+ # Simple pattern - only matches top-level files
127
+ return "/" not in filepath and PurePath(filepath).match(pattern)
128
+ # Path pattern - match from the right
129
+ return PurePath(filepath).match(pattern)
130
+
131
+
132
+ class FilesResource(BaseFilesResource):
133
+ """Extended FilesResource with high-level file operations.
134
+
135
+ Provides convenient methods for uploading, downloading, and listing files.
136
+ For fsspec filesystem access, use `sdk.files.fsspec`.
137
+ """
138
+
139
+ @cached_property
140
+ def fsspec(self) -> FilesetFileSystem:
141
+ """Access the underlying fsspec filesystem."""
142
+ return FilesetFileSystem(sdk=self._client)
143
+
144
+ def _ensure_fileset_exists(self, workspace: str, fileset: str) -> None:
145
+ """Create fileset if it doesn't exist (idempotent)."""
146
+ try:
147
+ self.filesets.create(name=fileset, workspace=workspace)
148
+ except ConflictError:
149
+ pass # Already exists
150
+
151
+ def download(
152
+ self,
153
+ *,
154
+ remote_path: str | list[str] = "",
155
+ local_path: str,
156
+ fileset: str | None = None,
157
+ workspace: str | None = None,
158
+ callback: Callback | None = None,
159
+ max_workers: int | None = None,
160
+ ) -> None:
161
+ """Download files from a fileset to a local path.
162
+
163
+ Args:
164
+ remote_path: Path(s) within the fileset to download. Can be:
165
+ - A single path (str): Full path (e.g., "workspace/fileset#data/"),
166
+ relative path (e.g., "data/"), or glob pattern (e.g., "*.json").
167
+ - A list of paths (list[str]): Multiple specific file paths to download.
168
+ When using a list, fileset and workspace must be provided explicitly.
169
+ Defaults to "" (root of fileset).
170
+ local_path: Local destination path (directory).
171
+ fileset: Fileset name. If not provided, inferred from remote_path (str only).
172
+ workspace: Workspace name. If not provided, inferred from remote_path
173
+ or uses the SDK's default workspace.
174
+ callback: Optional progress callback (e.g., RichProgressCallback).
175
+ max_workers: Maximum number of concurrent file transfers.
176
+
177
+ Examples:
178
+ # Explicit fileset/workspace
179
+ >>> sdk.files.download(
180
+ ... fileset="my-fileset",
181
+ ... workspace="default",
182
+ ... remote_path="data/",
183
+ ... local_path="./downloads/"
184
+ ... )
185
+
186
+ # Inferred from path (with workspace)
187
+ >>> sdk.files.download(
188
+ ... remote_path="default/my-fileset#data/",
189
+ ... local_path="./downloads/"
190
+ ... )
191
+
192
+ # Inferred from path (workspace from SDK default)
193
+ >>> sdk.files.download(
194
+ ... remote_path="my-fileset#data/",
195
+ ... local_path="./downloads/"
196
+ ... )
197
+
198
+ # Download files matching a glob pattern
199
+ >>> sdk.files.download(
200
+ ... fileset="my-fileset",
201
+ ... remote_path="*.json",
202
+ ... local_path="./downloads/"
203
+ ... )
204
+
205
+ # Download files matching a pattern in a subdirectory
206
+ >>> sdk.files.download(
207
+ ... fileset="my-fileset",
208
+ ... remote_path="data/*.jsonl",
209
+ ... local_path="./downloads/"
210
+ ... )
211
+
212
+ # Download a list of specific files
213
+ >>> sdk.files.download(
214
+ ... fileset="my-fileset",
215
+ ... remote_path=["config.json", "tokenizer.json", "vocab.txt"],
216
+ ... local_path="./downloads/"
217
+ ... )
218
+
219
+ # With progress callback
220
+ >>> from nemo_platform.filesets import RichProgressCallback
221
+ >>> with RichProgressCallback(description="Downloading") as cb:
222
+ ... sdk.files.download(
223
+ ... remote_path="my-fileset#",
224
+ ... local_path="./",
225
+ ... callback=cb
226
+ ... )
227
+ """
228
+ # Handle list of paths
229
+ if isinstance(remote_path, list):
230
+ if not remote_path:
231
+ return
232
+ ws = workspace or self._client.workspace
233
+ if fileset is None:
234
+ raise ValueError("fileset must be provided when remote_path is a list.")
235
+ if ws is None:
236
+ raise ValueError("workspace must be provided when remote_path is a list.")
237
+ # Build list of (remote, local) path pairs preserving directory structure
238
+ rpaths = [build_fileset_ref(p, workspace=ws, fileset=fileset) for p in remote_path]
239
+ lpaths = [str(PurePath(local_path) / p) for p in remote_path]
240
+ kwargs: dict = {"rpath": rpaths, "lpath": lpaths, "batch_size": max_workers}
241
+ if callback is not None:
242
+ kwargs["callback"] = callback
243
+ self.fsspec.get(**kwargs)
244
+ return
245
+
246
+ ws, path_fileset, path = parse_fileset_path(
247
+ remote_path,
248
+ workspace_fallback=workspace or self._client.workspace,
249
+ )
250
+ fileset = fileset or path_fileset
251
+
252
+ if fileset is None:
253
+ raise ValueError("Fileset must be specified either as a parameter or in the remote_path.")
254
+
255
+ # Handle glob patterns by expanding to list of files first
256
+ if has_magic(path):
257
+ matching_files = self.list(remote_path=path, fileset=fileset, workspace=ws)
258
+ if not matching_files.data:
259
+ return
260
+ # Build list of (remote, local) path pairs preserving directory structure
261
+ rpaths = [build_fileset_ref(f.path, workspace=ws, fileset=fileset) for f in matching_files.data]
262
+ lpaths = [str(PurePath(local_path) / f.path) for f in matching_files.data]
263
+ kwargs = {"rpath": rpaths, "lpath": lpaths, "batch_size": max_workers}
264
+ if callback is not None:
265
+ kwargs["callback"] = callback
266
+ self.fsspec.get(**kwargs)
267
+ else:
268
+ fileset_ref = build_fileset_ref(path, workspace=ws, fileset=fileset)
269
+ kwargs = {"rpath": fileset_ref, "lpath": local_path, "recursive": True, "batch_size": max_workers}
270
+ if callback is not None:
271
+ kwargs["callback"] = callback
272
+ self.fsspec.get(**kwargs)
273
+
274
+ def upload(
275
+ self,
276
+ *,
277
+ local_path: str,
278
+ remote_path: str = "",
279
+ fileset: str | None = None,
280
+ workspace: str | None = None,
281
+ callback: Callback | None = None,
282
+ max_workers: int | None = None,
283
+ fileset_auto_create: bool = False,
284
+ ) -> Fileset:
285
+ """Upload files from a local path to a fileset.
286
+
287
+ Args:
288
+ local_path: Local source path (file or directory).
289
+ remote_path: Path within the fileset to upload to. Can be a full path
290
+ (e.g., "workspace/fileset#data/" or "fileset#data/") if fileset is not provided,
291
+ or a relative path (e.g., "data/") if fileset is provided.
292
+ Defaults to "" (root of fileset).
293
+ fileset: Fileset name. If not provided, inferred from remote_path.
294
+ workspace: Workspace name. If not provided, inferred from remote_path
295
+ or uses the SDK's default workspace.
296
+ callback: Optional progress callback (e.g., RichProgressCallback).
297
+ max_workers: Maximum number of concurrent file transfers.
298
+ fileset_auto_create: If True, create the fileset if it doesn't exist.
299
+ When no fileset is specified (neither as param nor in remote_path),
300
+ a unique name is generated (e.g., "fileset-a1b2c3d4").
301
+
302
+ Returns:
303
+ Fileset: The fileset that was uploaded to. Check `fileset.name` to see
304
+ the generated name when using fileset_auto_create without specifying
305
+ a fileset.
306
+
307
+ Examples:
308
+ # Explicit fileset/workspace
309
+ >>> sdk.files.upload(
310
+ ... fileset="my-fileset",
311
+ ... workspace="default",
312
+ ... local_path="./data/",
313
+ ... remote_path="uploads/"
314
+ ... )
315
+
316
+ # Inferred from path
317
+ >>> sdk.files.upload(
318
+ ... local_path="./file.txt",
319
+ ... remote_path="default/my-fileset#file.txt"
320
+ ... )
321
+
322
+ # With workspace from SDK default
323
+ >>> sdk.files.upload(
324
+ ... local_path="./file.txt",
325
+ ... remote_path="my-fileset#file.txt"
326
+ ... )
327
+
328
+ # Auto-create fileset with specified name
329
+ >>> fileset = sdk.files.upload(
330
+ ... local_path="./data/",
331
+ ... fileset="new-fileset",
332
+ ... fileset_auto_create=True
333
+ ... )
334
+ >>> print(f"Uploaded to: {fileset.name}")
335
+
336
+ # Auto-create fileset with generated name
337
+ >>> fileset = sdk.files.upload(
338
+ ... local_path="./data/",
339
+ ... fileset_auto_create=True
340
+ ... )
341
+ >>> print(f"Uploaded to: {fileset.name}") # e.g., "fileset-a1b2c3d4"
342
+ """
343
+ ws, path_fileset, path = parse_fileset_path(
344
+ remote_path,
345
+ workspace_fallback=workspace or self._client.workspace,
346
+ )
347
+ fileset = fileset or path_fileset
348
+
349
+ if fileset is None:
350
+ if fileset_auto_create:
351
+ fileset = _generate_fileset_name()
352
+ else:
353
+ raise ValueError(
354
+ "Fileset must be specified either as a parameter or in the remote_path when fileset_auto_create is False."
355
+ )
356
+
357
+ fileset_ref = build_fileset_ref(path, workspace=ws, fileset=fileset)
358
+ if fileset_auto_create:
359
+ self._ensure_fileset_exists(ws, fileset)
360
+
361
+ kwargs: dict = {"lpath": local_path, "rpath": fileset_ref, "recursive": True, "batch_size": max_workers}
362
+ if callback is not None:
363
+ kwargs["callback"] = callback
364
+ self.fsspec.put(**kwargs)
365
+
366
+ return self.filesets.retrieve(name=fileset, workspace=ws)
367
+
368
+ def upload_content(
369
+ self,
370
+ *,
371
+ content: SyncContent,
372
+ remote_path: str,
373
+ fileset: str | None = None,
374
+ workspace: str | None = None,
375
+ fileset_auto_create: bool = False,
376
+ ) -> Fileset:
377
+ """Upload in-memory content to a fileset.
378
+
379
+ Args:
380
+ content: Content to upload. Can be:
381
+ - bytes: Raw byte content
382
+ - str: Text content (will be UTF-8 encoded)
383
+ - BinaryIO: File-like object (e.g., BytesIO, open file)
384
+ - Iterator[bytes]: Generator or iterator yielding byte chunks
385
+ remote_path: Destination path within the fileset.
386
+ fileset: Fileset name. If not provided, inferred from remote_path.
387
+ workspace: Workspace name. If not provided, uses SDK default.
388
+ fileset_auto_create: If True, create the fileset if it doesn't exist.
389
+ When no fileset is specified (neither as param nor in remote_path),
390
+ a unique name is generated (e.g., "fileset-a1b2c3d4").
391
+
392
+ Returns:
393
+ Fileset: The fileset that was uploaded to. Check `fileset.name` to see
394
+ the generated name when using fileset_auto_create without specifying
395
+ a fileset.
396
+
397
+ Examples:
398
+ # Upload bytes
399
+ >>> sdk.files.upload_content(
400
+ ... content=b"Hello, World!",
401
+ ... remote_path="message.txt",
402
+ ... fileset="my-fileset",
403
+ ... )
404
+
405
+ # Upload string (auto UTF-8 encoded)
406
+ >>> sdk.files.upload_content(
407
+ ... content='{"key": "value"}',
408
+ ... remote_path="config.json",
409
+ ... fileset="my-fileset",
410
+ ... )
411
+
412
+ # Upload from BytesIO
413
+ >>> from io import BytesIO
414
+ >>> sdk.files.upload_content(
415
+ ... content=BytesIO(b"content"),
416
+ ... remote_path="data.bin",
417
+ ... fileset="my-fileset",
418
+ ... )
419
+
420
+ # Auto-create fileset with specified name
421
+ >>> fileset = sdk.files.upload_content(
422
+ ... content=b"content",
423
+ ... remote_path="file.txt",
424
+ ... fileset="new-fileset",
425
+ ... fileset_auto_create=True,
426
+ ... )
427
+ >>> print(f"Uploaded to: {fileset.name}")
428
+
429
+ # Auto-create fileset with generated name
430
+ >>> fileset = sdk.files.upload_content(
431
+ ... content=b"content",
432
+ ... remote_path="file.txt",
433
+ ... fileset_auto_create=True,
434
+ ... )
435
+ >>> print(f"Uploaded to: {fileset.name}") # e.g., "fileset-a1b2c3d4"
436
+ """
437
+ ws, path_fileset, path = parse_fileset_path(
438
+ remote_path,
439
+ workspace_fallback=workspace or self._client.workspace,
440
+ )
441
+ fileset = fileset or path_fileset
442
+
443
+ if fileset is None:
444
+ if fileset_auto_create:
445
+ fileset = _generate_fileset_name()
446
+ else:
447
+ raise ValueError(
448
+ "Fileset must be specified either as a parameter or in the remote_path when fileset_auto_create is False."
449
+ )
450
+
451
+ fileset_ref = build_fileset_ref(path, workspace=ws, fileset=fileset)
452
+ if fileset_auto_create:
453
+ self._ensure_fileset_exists(ws, fileset)
454
+
455
+ match content:
456
+ case str():
457
+ self.fsspec.pipe(fileset_ref, content.encode("utf-8"))
458
+ case bytes():
459
+ self.fsspec.pipe(fileset_ref, content)
460
+ case Readable():
461
+ self.fsspec.pipe(fileset_ref, content.read())
462
+ case content if hasattr(content, "__next__"):
463
+ self.fsspec.pipe_stream(fileset_ref, content)
464
+ case _:
465
+ raise TypeError(f"Unsupported content type: {type(content)}")
466
+
467
+ return self.filesets.retrieve(name=fileset, workspace=ws)
468
+
469
+ def download_content(
470
+ self,
471
+ *,
472
+ remote_path: str,
473
+ fileset: str | None = None,
474
+ workspace: str | None = None,
475
+ ) -> bytes:
476
+ """Download a file's content from a fileset.
477
+
478
+ Args:
479
+ remote_path: Path of the file within the fileset.
480
+ fileset: Fileset name. If not provided, inferred from remote_path.
481
+ workspace: Workspace name. If not provided, uses SDK default.
482
+
483
+ Returns:
484
+ bytes: The file content.
485
+
486
+ Examples:
487
+ # Load JSON (most common use case)
488
+ >>> data = json.loads(sdk.files.download_content(
489
+ ... remote_path="config.json",
490
+ ... fileset="my-fileset",
491
+ ... ))
492
+
493
+ # Get text content
494
+ >>> text = sdk.files.download_content(
495
+ ... remote_path="readme.txt",
496
+ ... fileset="my-fileset",
497
+ ... ).decode("utf-8")
498
+
499
+ # Get binary content
500
+ >>> content = sdk.files.download_content(
501
+ ... remote_path="model.bin",
502
+ ... fileset="my-fileset",
503
+ ... )
504
+ """
505
+ ws, path_fileset, path = parse_fileset_path(
506
+ remote_path,
507
+ workspace_fallback=workspace or self._client.workspace,
508
+ )
509
+ fileset = fileset or path_fileset
510
+
511
+ if fileset is None:
512
+ raise ValueError("Fileset must be specified either as a parameter or in the remote_path.")
513
+
514
+ fileset_ref = build_fileset_ref(path, workspace=ws, fileset=fileset)
515
+ return self.fsspec.cat(fileset_ref)
516
+
517
+ def list(
518
+ self,
519
+ *,
520
+ remote_path: str = "",
521
+ fileset: str | None = None,
522
+ workspace: str | None = None,
523
+ include_cache_status: bool = False,
524
+ ) -> ListFilesResponse:
525
+ """List all files in a fileset path (recursive), with optional glob pattern support.
526
+
527
+ Args:
528
+ remote_path: Path within the fileset to list. Can be a full path
529
+ (e.g., "workspace/fileset#data/" or "fileset#data/") if fileset is not provided,
530
+ or a relative path (e.g., "data/") if fileset is provided.
531
+ Supports glob patterns (*, ?, []) for filtering files.
532
+ Defaults to "" (root of fileset).
533
+ fileset: Fileset name. If not provided, inferred from remote_path.
534
+ workspace: Workspace name. If not provided, inferred from remote_path
535
+ or uses the SDK's default workspace.
536
+ include_cache_status: Check and return cache status for each file.
537
+ When False (default), external storage files return None for cache_status.
538
+
539
+ Returns:
540
+ ListFilesResponse with data (list of FilesetFile) and cache_status property.
541
+
542
+ Examples:
543
+ # List all files in a fileset
544
+ >>> response = sdk.files.list(fileset="my-fileset")
545
+ >>> for f in response.data:
546
+ ... print(f"{f.path}: {f.size} bytes")
547
+
548
+ # List files in a subdirectory
549
+ >>> sdk.files.list(
550
+ ... fileset="my-fileset",
551
+ ... remote_path="data/"
552
+ ... )
553
+
554
+ # List files matching a glob pattern
555
+ >>> sdk.files.list(
556
+ ... fileset="my-fileset",
557
+ ... remote_path="*.json"
558
+ ... )
559
+
560
+ # List files matching a pattern in a subdirectory
561
+ >>> sdk.files.list(
562
+ ... fileset="my-fileset",
563
+ ... remote_path="data/*.jsonl"
564
+ ... )
565
+
566
+ # Inferred from path
567
+ >>> sdk.files.list(remote_path="my-fileset#data/")
568
+
569
+ # Check cache status for external storage
570
+ >>> response = sdk.files.list(fileset="my-fileset", include_cache_status=True)
571
+ >>> print(f"Cache status: {response.cache_status}")
572
+ >>> for f in response.data:
573
+ ... print(f"{f.path}: {f.cache_status}")
574
+ """
575
+ ws, path_fileset, path = parse_fileset_path(
576
+ remote_path,
577
+ workspace_fallback=workspace or self._client.workspace,
578
+ )
579
+ fileset = fileset or path_fileset
580
+
581
+ if fileset is None:
582
+ raise ValueError("Fileset must be specified either as a parameter or in the remote_path.")
583
+
584
+ # For glob patterns, list all files then filter client-side
585
+ # For path prefixes, the API handles filtering server-side
586
+ api_path = None if has_magic(path) else (path or None)
587
+
588
+ response = self._list_files(
589
+ fileset,
590
+ workspace=ws,
591
+ include_cache_status=include_cache_status,
592
+ path=api_path,
593
+ )
594
+ files = list(response.data)
595
+
596
+ # Apply glob filtering if needed
597
+ if has_magic(path):
598
+ files = [f for f in files if _matches_glob(f.path, path)]
599
+ return ListFilesResponse(data=files)
600
+
601
+ def delete(
602
+ self,
603
+ *,
604
+ remote_path: str,
605
+ fileset: str | None = None,
606
+ workspace: str | None = None,
607
+ ) -> None:
608
+ """Delete a file from a fileset.
609
+
610
+ Args:
611
+ remote_path: Path of the file to delete. Can be a full path
612
+ (e.g., "workspace/fileset#data/file.txt") if fileset is not provided,
613
+ or a relative path (e.g., "data/file.txt") if fileset is provided.
614
+ fileset: Fileset name. If not provided, inferred from remote_path.
615
+ workspace: Workspace name. If not provided, inferred from remote_path
616
+ or uses the SDK's default workspace.
617
+
618
+ Examples:
619
+ # Delete a file with explicit fileset
620
+ >>> sdk.files.delete(
621
+ ... fileset="my-fileset",
622
+ ... remote_path="data/old-file.txt"
623
+ ... )
624
+
625
+ # Delete using full path
626
+ >>> sdk.files.delete(remote_path="my-fileset#data/old-file.txt")
627
+ """
628
+ ws, path_fileset, path = parse_fileset_path(
629
+ remote_path,
630
+ workspace_fallback=workspace or self._client.workspace,
631
+ )
632
+ fileset = fileset or path_fileset
633
+
634
+ if fileset is None:
635
+ raise ValueError("Fileset must be specified either as a parameter or in the remote_path.")
636
+
637
+ fileset_ref = build_fileset_ref(path, workspace=ws, fileset=fileset)
638
+ self.fsspec.rm(fileset_ref)
639
+
640
+
641
+ class AsyncFilesResource(BaseAsyncFilesResource):
642
+ """Extended AsyncFilesResource with high-level file operations.
643
+
644
+ Provides convenient methods for uploading, downloading, and listing files.
645
+ For fsspec filesystem access, use `sdk.files.fsspec`.
646
+ """
647
+
648
+ @cached_property
649
+ def fsspec(self) -> FilesetFileSystem:
650
+ """Get a FilesetFileSystem instance pre-configured with this SDK client.
651
+
652
+ This provides fsspec filesystem access. For high-level file
653
+ operations, use `sdk.files` instead.
654
+ """
655
+ return FilesetFileSystem(sdk=self._client)
656
+
657
+ async def _ensure_fileset_exists(self, workspace: str, fileset: str) -> None:
658
+ """Create fileset if it doesn't exist (idempotent)."""
659
+ try:
660
+ await self.filesets.create(name=fileset, workspace=workspace)
661
+ except ConflictError:
662
+ pass # Already exists
663
+
664
+ async def download(
665
+ self,
666
+ *,
667
+ remote_path: str | list[str] = "",
668
+ local_path: str,
669
+ fileset: str | None = None,
670
+ workspace: str | None = None,
671
+ callback: Callback | None = None,
672
+ max_workers: int | None = None,
673
+ ) -> None:
674
+ """Download files from a fileset to a local path (async).
675
+
676
+ Args:
677
+ remote_path: Path(s) within the fileset to download. Can be:
678
+ - A single path (str): Full path (e.g., "workspace/fileset#data/"),
679
+ relative path (e.g., "data/"), or glob pattern (e.g., "*.json").
680
+ - A list of paths (list[str]): Multiple specific file paths to download.
681
+ When using a list, fileset and workspace must be provided explicitly.
682
+ Defaults to "" (root of fileset).
683
+ local_path: Local destination path (directory).
684
+ fileset: Fileset name. If not provided, inferred from remote_path (str only).
685
+ workspace: Workspace name. If not provided, inferred from remote_path
686
+ or uses the SDK's default workspace.
687
+ callback: Optional progress callback (e.g., RichProgressCallback).
688
+ max_workers: Maximum number of concurrent file transfers.
689
+
690
+ Examples:
691
+ # Explicit fileset/workspace
692
+ >>> await sdk.files.download(
693
+ ... fileset="my-fileset",
694
+ ... workspace="default",
695
+ ... remote_path="data/",
696
+ ... local_path="./downloads/"
697
+ ... )
698
+
699
+ # Inferred from path
700
+ >>> await sdk.files.download(
701
+ ... remote_path="default/my-fileset#data/",
702
+ ... local_path="./downloads/"
703
+ ... )
704
+
705
+ # Download files matching a glob pattern
706
+ >>> await sdk.files.download(
707
+ ... fileset="my-fileset",
708
+ ... remote_path="*.json",
709
+ ... local_path="./downloads/"
710
+ ... )
711
+
712
+ # Download files matching a pattern in a subdirectory
713
+ >>> await sdk.files.download(
714
+ ... fileset="my-fileset",
715
+ ... remote_path="data/*.jsonl",
716
+ ... local_path="./downloads/"
717
+ ... )
718
+
719
+ # Download a list of specific files
720
+ >>> await sdk.files.download(
721
+ ... fileset="my-fileset",
722
+ ... remote_path=["config.json", "tokenizer.json", "vocab.txt"],
723
+ ... local_path="./downloads/"
724
+ ... )
725
+ """
726
+ # Handle list of paths
727
+ if isinstance(remote_path, list):
728
+ if not remote_path:
729
+ return
730
+ ws = workspace or self._client.workspace
731
+ if fileset is None:
732
+ raise ValueError("fileset must be provided when remote_path is a list.")
733
+ if ws is None:
734
+ raise ValueError("workspace must be provided when remote_path is a list.")
735
+ # Build list of (remote, local) path pairs preserving directory structure
736
+ rpaths = [build_fileset_ref(p, workspace=ws, fileset=fileset) for p in remote_path]
737
+ lpaths = [str(PurePath(local_path) / p) for p in remote_path]
738
+ kwargs: dict = {"rpath": rpaths, "lpath": lpaths, "batch_size": max_workers}
739
+ if callback is not None:
740
+ kwargs["callback"] = callback
741
+ await self.fsspec._get(**kwargs)
742
+ return
743
+
744
+ ws, path_fileset, path = parse_fileset_path(
745
+ remote_path,
746
+ workspace_fallback=workspace or self._client.workspace,
747
+ )
748
+ fileset = fileset or path_fileset
749
+
750
+ if fileset is None:
751
+ raise ValueError("Fileset must be specified either as a parameter or in the remote_path.")
752
+
753
+ # Handle glob patterns by expanding to list of files first
754
+ if has_magic(path):
755
+ matching_files = await self.list(remote_path=path, fileset=fileset, workspace=ws)
756
+ if not matching_files.data:
757
+ return
758
+ # Build list of (remote, local) path pairs preserving directory structure
759
+ rpaths = [build_fileset_ref(f.path, workspace=ws, fileset=fileset) for f in matching_files.data]
760
+ lpaths = [str(PurePath(local_path) / f.path) for f in matching_files.data]
761
+ kwargs = {"rpath": rpaths, "lpath": lpaths, "batch_size": max_workers}
762
+ if callback is not None:
763
+ kwargs["callback"] = callback
764
+ await self.fsspec._get(**kwargs)
765
+ else:
766
+ fileset_ref = build_fileset_ref(path, workspace=ws, fileset=fileset)
767
+ kwargs = {"rpath": fileset_ref, "lpath": local_path, "recursive": True, "batch_size": max_workers}
768
+ if callback is not None:
769
+ kwargs["callback"] = callback
770
+ await self.fsspec._get(**kwargs)
771
+
772
+ async def upload(
773
+ self,
774
+ *,
775
+ local_path: str,
776
+ remote_path: str = "",
777
+ fileset: str | None = None,
778
+ workspace: str | None = None,
779
+ callback: Callback | None = None,
780
+ max_workers: int | None = None,
781
+ fileset_auto_create: bool = False,
782
+ ) -> Fileset:
783
+ """Upload files from a local path to a fileset (async).
784
+
785
+ Args:
786
+ local_path: Local source path (file or directory).
787
+ remote_path: Path within the fileset to upload to. Can be a full path
788
+ (e.g., "workspace/fileset#data/" or "fileset#data/") if fileset is not provided,
789
+ or a relative path (e.g., "data/") if fileset is provided.
790
+ Defaults to "" (root of fileset).
791
+ fileset: Fileset name. If not provided, inferred from remote_path.
792
+ workspace: Workspace name. If not provided, inferred from remote_path
793
+ or uses the SDK's default workspace.
794
+ callback: Optional progress callback (e.g., RichProgressCallback).
795
+ max_workers: Maximum number of concurrent file transfers.
796
+ fileset_auto_create: If True, create the fileset if it doesn't exist.
797
+ When no fileset is specified (neither as param nor in remote_path),
798
+ a unique name is generated (e.g., "fileset-a1b2c3d4").
799
+
800
+ Returns:
801
+ Fileset: The fileset that was uploaded to. Check `fileset.name` to see
802
+ the generated name when using fileset_auto_create without specifying
803
+ a fileset.
804
+
805
+ Examples:
806
+ # Explicit fileset/workspace
807
+ >>> await sdk.files.upload(
808
+ ... fileset="my-fileset",
809
+ ... workspace="default",
810
+ ... local_path="./data/",
811
+ ... remote_path="uploads/"
812
+ ... )
813
+
814
+ # Inferred from path
815
+ >>> await sdk.files.upload(
816
+ ... local_path="./file.txt",
817
+ ... remote_path="default/my-fileset#file.txt"
818
+ ... )
819
+
820
+ # Auto-create fileset with specified name
821
+ >>> fileset = await sdk.files.upload(
822
+ ... local_path="./data/",
823
+ ... fileset="new-fileset",
824
+ ... fileset_auto_create=True
825
+ ... )
826
+ >>> print(f"Uploaded to: {fileset.name}")
827
+
828
+ # Auto-create fileset with generated name
829
+ >>> fileset = await sdk.files.upload(
830
+ ... local_path="./data/",
831
+ ... fileset_auto_create=True
832
+ ... )
833
+ >>> print(f"Uploaded to: {fileset.name}") # e.g., "fileset-a1b2c3d4"
834
+ """
835
+ ws, path_fileset, path = parse_fileset_path(
836
+ remote_path,
837
+ workspace_fallback=workspace or self._client.workspace,
838
+ )
839
+ fileset = fileset or path_fileset
840
+
841
+ if fileset is None:
842
+ if fileset_auto_create:
843
+ fileset = _generate_fileset_name()
844
+ else:
845
+ raise ValueError(
846
+ "Fileset must be specified either as a parameter or in the remote_path when fileset_auto_create is False."
847
+ )
848
+
849
+ fileset_ref = build_fileset_ref(path, workspace=ws, fileset=fileset)
850
+ if fileset_auto_create:
851
+ await self._ensure_fileset_exists(ws, fileset)
852
+
853
+ kwargs: dict = {"lpath": local_path, "rpath": fileset_ref, "recursive": True, "batch_size": max_workers}
854
+ if callback is not None:
855
+ kwargs["callback"] = callback
856
+ await self.fsspec._put(**kwargs)
857
+
858
+ return await self.filesets.retrieve(name=fileset, workspace=ws)
859
+
860
+ async def upload_content(
861
+ self,
862
+ *,
863
+ content: AsyncContent,
864
+ remote_path: str,
865
+ fileset: str | None = None,
866
+ workspace: str | None = None,
867
+ fileset_auto_create: bool = False,
868
+ ) -> Fileset:
869
+ """Upload in-memory data to a fileset (async).
870
+
871
+ Args:
872
+ content: Content to upload. Can be:
873
+ - bytes: Raw byte content
874
+ - str: Text content (will be UTF-8 encoded)
875
+ - AsyncReadable: Async file-like object (e.g., anyio.open_file(), aiofiles)
876
+ - AsyncIterator[bytes]: Async iterator yielding byte chunks (streamed)
877
+ remote_path: Destination path within the fileset.
878
+ fileset: Fileset name. If not provided, inferred from remote_path.
879
+ workspace: Workspace name. If not provided, uses SDK default.
880
+ fileset_auto_create: If True, create the fileset if it doesn't exist.
881
+ When no fileset is specified (neither as param nor in remote_path),
882
+ a unique name is generated (e.g., "fileset-a1b2c3d4").
883
+
884
+ Returns:
885
+ Fileset: The fileset that was uploaded to. Check `fileset.name` to see
886
+ the generated name when using fileset_auto_create without specifying
887
+ a fileset.
888
+
889
+ Examples:
890
+ # Upload bytes
891
+ >>> await sdk.files.upload_content(
892
+ ... content=b"Hello, World!",
893
+ ... remote_path="message.txt",
894
+ ... fileset="my-fileset",
895
+ ... )
896
+
897
+ # Upload string (auto UTF-8 encoded)
898
+ >>> await sdk.files.upload_content(
899
+ ... content='{"key": "value"}',
900
+ ... remote_path="config.json",
901
+ ... fileset="my-fileset",
902
+ ... )
903
+
904
+ # Upload from async file (anyio/aiofiles)
905
+ >>> async with await anyio.open_file("data.bin", "rb") as f:
906
+ ... await sdk.files.upload_content(
907
+ ... content=f,
908
+ ... remote_path="data.bin",
909
+ ... fileset="my-fileset",
910
+ ... )
911
+
912
+ # Auto-create fileset with specified name
913
+ >>> fileset = await sdk.files.upload_content(
914
+ ... content=b"content",
915
+ ... remote_path="file.txt",
916
+ ... fileset="new-fileset",
917
+ ... fileset_auto_create=True,
918
+ ... )
919
+ >>> print(f"Uploaded to: {fileset.name}")
920
+
921
+ # Auto-create fileset with generated name
922
+ >>> fileset = await sdk.files.upload_content(
923
+ ... content=b"content",
924
+ ... remote_path="file.txt",
925
+ ... fileset_auto_create=True,
926
+ ... )
927
+ >>> print(f"Uploaded to: {fileset.name}") # e.g., "fileset-a1b2c3d4"
928
+ """
929
+ ws, path_fileset, path = parse_fileset_path(remote_path, workspace_fallback=workspace or self._client.workspace)
930
+ fileset = fileset or path_fileset
931
+
932
+ if fileset is None:
933
+ if fileset_auto_create:
934
+ fileset = _generate_fileset_name()
935
+ else:
936
+ raise ValueError(
937
+ "Fileset must be specified either as a parameter or in the remote_path when fileset_auto_create is False."
938
+ )
939
+
940
+ fileset_ref = build_fileset_ref(path, workspace=ws, fileset=fileset)
941
+ if fileset_auto_create:
942
+ await self._ensure_fileset_exists(ws, fileset)
943
+
944
+ async def _read_chunks(f: AsyncReadable, chunk_size: int = 1024 * 1024) -> AsyncIterator[bytes]:
945
+ while True:
946
+ chunk = await f.read(chunk_size)
947
+ if not chunk:
948
+ break
949
+ yield chunk
950
+
951
+ match content:
952
+ case str():
953
+ await self.fsspec._pipe_file(fileset_ref, content.encode("utf-8"))
954
+ case bytes():
955
+ await self.fsspec._pipe_file(fileset_ref, content)
956
+ case AsyncReadable():
957
+ await self.fsspec._pipe_stream(fileset_ref, _read_chunks(content))
958
+ case content if hasattr(content, "__anext__"):
959
+ await self.fsspec._pipe_stream(fileset_ref, content)
960
+ case _:
961
+ raise TypeError(f"Unsupported content type: {type(content)}")
962
+
963
+ return await self.filesets.retrieve(name=fileset, workspace=ws)
964
+
965
+ async def download_content(
966
+ self,
967
+ *,
968
+ remote_path: str,
969
+ fileset: str | None = None,
970
+ workspace: str | None = None,
971
+ ) -> bytes:
972
+ """Download a file's content from a fileset (async).
973
+
974
+ Args:
975
+ remote_path: Path of the file within the fileset.
976
+ fileset: Fileset name. If not provided, inferred from remote_path.
977
+ workspace: Workspace name. If not provided, uses SDK default.
978
+
979
+ Returns:
980
+ bytes: The file content.
981
+
982
+ Examples:
983
+ # Load JSON
984
+ >>> content = await sdk.files.download_content(
985
+ ... remote_path="config.json",
986
+ ... fileset="my-fileset",
987
+ ... )
988
+ >>> data = json.loads(content)
989
+
990
+ # Get text content
991
+ >>> text = (await sdk.files.download_content(
992
+ ... remote_path="readme.txt",
993
+ ... fileset="my-fileset",
994
+ ... )).decode("utf-8")
995
+ """
996
+ ws, path_fileset, path = parse_fileset_path(remote_path, workspace_fallback=workspace or self._client.workspace)
997
+ fileset = fileset or path_fileset
998
+
999
+ if fileset is None:
1000
+ raise ValueError("Fileset must be specified either as a parameter or in the remote_path.")
1001
+
1002
+ fileset_ref = build_fileset_ref(path, workspace=ws, fileset=fileset)
1003
+ return await self.fsspec._cat_file(fileset_ref)
1004
+
1005
+ async def list(
1006
+ self,
1007
+ *,
1008
+ remote_path: str = "",
1009
+ fileset: str | None = None,
1010
+ workspace: str | None = None,
1011
+ include_cache_status: bool = False,
1012
+ ) -> ListFilesResponse:
1013
+ """List all files in a fileset path (recursive, async), with optional glob pattern support.
1014
+
1015
+ Args:
1016
+ remote_path: Path within the fileset to list. Can be a full path
1017
+ (e.g., "workspace/fileset#data/" or "fileset#data/") if fileset is not provided,
1018
+ or a relative path (e.g., "data/") if fileset is provided.
1019
+ Supports glob patterns (*, ?, []) for filtering files.
1020
+ Defaults to "" (root of fileset).
1021
+ fileset: Fileset name. If not provided, inferred from remote_path.
1022
+ workspace: Workspace name. If not provided, inferred from remote_path
1023
+ or uses the SDK's default workspace.
1024
+ include_cache_status: Check and return cache status for each file.
1025
+ When False (default), external storage files return None for cache_status.
1026
+
1027
+ Returns:
1028
+ ListFilesResponse with data (list of FilesetFile) and cache_status property.
1029
+
1030
+ Examples:
1031
+ # List all files in a fileset
1032
+ >>> response = await sdk.files.list(fileset="my-fileset")
1033
+ >>> for f in response.data:
1034
+ ... print(f"{f.path}: {f.size} bytes")
1035
+
1036
+ # List files in a subdirectory
1037
+ >>> await sdk.files.list(
1038
+ ... fileset="my-fileset",
1039
+ ... remote_path="data/"
1040
+ ... )
1041
+
1042
+ # List files matching a glob pattern
1043
+ >>> await sdk.files.list(
1044
+ ... fileset="my-fileset",
1045
+ ... remote_path="*.json"
1046
+ ... )
1047
+
1048
+ # List files matching a pattern in a subdirectory
1049
+ >>> await sdk.files.list(
1050
+ ... fileset="my-fileset",
1051
+ ... remote_path="data/*.jsonl"
1052
+ ... )
1053
+
1054
+ # Inferred from path
1055
+ >>> await sdk.files.list(remote_path="my-fileset#data/")
1056
+
1057
+ # Check cache status for external storage
1058
+ >>> response = await sdk.files.list(fileset="my-fileset", include_cache_status=True)
1059
+ >>> print(f"Cache status: {response.cache_status}")
1060
+ >>> for f in response.data:
1061
+ ... print(f"{f.path}: {f.cache_status}")
1062
+ """
1063
+ ws, path_fileset, path = parse_fileset_path(remote_path, workspace_fallback=workspace or self._client.workspace)
1064
+ fileset = fileset or path_fileset
1065
+
1066
+ if fileset is None:
1067
+ raise ValueError("Fileset must be specified either as a parameter or in the remote_path.")
1068
+
1069
+ # For glob patterns, list all files then filter client-side
1070
+ # For path prefixes, the API handles filtering server-side
1071
+ api_path = None if has_magic(path) else (path or None)
1072
+
1073
+ response = await self._list_files(
1074
+ fileset,
1075
+ workspace=ws,
1076
+ include_cache_status=include_cache_status,
1077
+ path=api_path,
1078
+ )
1079
+ files = list(response.data)
1080
+
1081
+ # Apply glob filtering if needed
1082
+ if has_magic(path):
1083
+ files = [f for f in files if _matches_glob(f.path, path)]
1084
+ return ListFilesResponse(data=files)
1085
+
1086
+ async def delete(
1087
+ self,
1088
+ *,
1089
+ remote_path: str,
1090
+ fileset: str | None = None,
1091
+ workspace: str | None = None,
1092
+ ) -> None:
1093
+ """Delete a file from a fileset (async).
1094
+
1095
+ Args:
1096
+ remote_path: Path of the file to delete. Can be a full path
1097
+ (e.g., "workspace/fileset#data/file.txt") if fileset is not provided,
1098
+ or a relative path (e.g., "data/file.txt") if fileset is provided.
1099
+ fileset: Fileset name. If not provided, inferred from remote_path.
1100
+ workspace: Workspace name. If not provided, inferred from remote_path
1101
+ or uses the SDK's default workspace.
1102
+
1103
+ Examples:
1104
+ # Delete a file with explicit fileset
1105
+ >>> await sdk.files.delete(
1106
+ ... fileset="my-fileset",
1107
+ ... remote_path="data/old-file.txt"
1108
+ ... )
1109
+
1110
+ # Delete using full path
1111
+ >>> await sdk.files.delete(remote_path="my-fileset#data/old-file.txt")
1112
+ """
1113
+ ws, path_fileset, path = parse_fileset_path(remote_path, workspace_fallback=workspace or self._client.workspace)
1114
+ fileset = fileset or path_fileset
1115
+
1116
+ if fileset is None:
1117
+ raise ValueError("Fileset must be specified either as a parameter or in the remote_path.")
1118
+
1119
+ fileset_ref = build_fileset_ref(path, workspace=ws, fileset=fileset)
1120
+ await self.fsspec._rm(fileset_ref)