simulo 0.26.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 (55) hide show
  1. simulo/__init__.py +433 -0
  2. simulo/_client/__init__.py +6 -0
  3. simulo/_client/_entrypoint.py +313 -0
  4. simulo/_client/_mounts.py +25 -0
  5. simulo/_client/_runner.py +186 -0
  6. simulo/_client/_secure_downloads.py +1181 -0
  7. simulo/_client/app.py +1308 -0
  8. simulo/_client/asset.py +331 -0
  9. simulo/_client/asset_api.py +517 -0
  10. simulo/_client/asset_package.py +1103 -0
  11. simulo/_client/asset_pins.py +187 -0
  12. simulo/_client/builtin_aliases.py +107 -0
  13. simulo/_client/bundle.py +254 -0
  14. simulo/_client/cancel_api.py +104 -0
  15. simulo/_client/cli.py +9063 -0
  16. simulo/_client/config.py +186 -0
  17. simulo/_client/credentials.py +210 -0
  18. simulo/_client/discovery.py +214 -0
  19. simulo/_client/export_api.py +212 -0
  20. simulo/_client/export_bundle.py +296 -0
  21. simulo/_client/facades.py +581 -0
  22. simulo/_client/http.py +414 -0
  23. simulo/_client/identity_api.py +117 -0
  24. simulo/_client/install_samples.py +267 -0
  25. simulo/_client/jobs_api.py +224 -0
  26. simulo/_client/learning.py +393 -0
  27. simulo/_client/login.py +319 -0
  28. simulo/_client/mode.py +29 -0
  29. simulo/_client/outputs.py +116 -0
  30. simulo/_client/packaging.py +445 -0
  31. simulo/_client/preflight_api.py +186 -0
  32. simulo/_client/preflight_render.py +200 -0
  33. simulo/_client/registry.py +98 -0
  34. simulo/_client/runtime.py +185 -0
  35. simulo/_client/runtime_display.py +90 -0
  36. simulo/_client/seed_ref.py +76 -0
  37. simulo/_client/stub.py +41 -0
  38. simulo/_client/submit_api.py +1057 -0
  39. simulo/_client/templates/__init__.py +21 -0
  40. simulo/_client/templates/inference/app.py.tmpl +316 -0
  41. simulo/_client/templates/inference/simuloignore.tmpl +30 -0
  42. simulo/_client/templates/scenario/app.py.tmpl +93 -0
  43. simulo/_client/templates/scenario/simuloignore.tmpl +27 -0
  44. simulo/_client/templates/training/app.py.tmpl +235 -0
  45. simulo/_client/templates/training/simuloignore.tmpl +29 -0
  46. simulo/_client/view_fragment.py +21 -0
  47. simulo/_client/view_session_api.py +122 -0
  48. simulo/_client/volume.py +71 -0
  49. simulo/callbacks.py +274 -0
  50. simulo/py.typed +0 -0
  51. simulo-0.26.0.dist-info/METADATA +130 -0
  52. simulo-0.26.0.dist-info/RECORD +55 -0
  53. simulo-0.26.0.dist-info/WHEEL +5 -0
  54. simulo-0.26.0.dist-info/entry_points.txt +2 -0
  55. simulo-0.26.0.dist-info/top_level.txt +1 -0
simulo/_client/stub.py ADDED
@@ -0,0 +1,41 @@
1
+ """Inert, torch-free placeholder shared across the discovery (submit) surface.
2
+
3
+ A :class:`Stub` stands in for any symbol a user app might *touch* while it is
4
+ imported in discovery mode. Attribute access, calls, and subscription all yield
5
+ further stubs, so a stub never explodes on access — and because no job body runs
6
+ during discovery, a stub is only ever touched, never used for real computation.
7
+
8
+ Two consumers share it:
9
+
10
+ * ``discovery.py`` — the ``runtime.imports()`` stub modules return stubs for any
11
+ attribute the user reads off a deferred heavy import (e.g. ``torch.Tensor``).
12
+ * ``learning.py`` — the *value/config + in-body-only* learning names
13
+ (``simulo.Scene(...)``, ``simulo.Terrain.plane(...)``, ``simulo.LearningEnv(...)``,
14
+ …) resolve to a stub in discovery so they are harmless even if touched in a
15
+ class or job body that is read (but not executed) at submit.
16
+ """
17
+
18
+ from __future__ import annotations
19
+
20
+
21
+ class Stub:
22
+ """Inert placeholder whose every interaction yields another :class:`Stub`."""
23
+
24
+ __slots__ = ("_name",)
25
+
26
+ def __init__(self, name: str) -> None:
27
+ self._name = name
28
+
29
+ def __call__(self, *args: object, **kwargs: object) -> "Stub":
30
+ return Stub(f"{self._name}()")
31
+
32
+ def __getattr__(self, item: str) -> "Stub":
33
+ if item.startswith("__") and item.endswith("__"):
34
+ raise AttributeError(item)
35
+ return Stub(f"{self._name}.{item}")
36
+
37
+ def __getitem__(self, item: object) -> "Stub":
38
+ return Stub(f"{self._name}[]")
39
+
40
+ def __repr__(self) -> str:
41
+ return f"<simulo discovery stub {self._name!r}>"