roboscope 0.0.1a0__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.
roboscope/__init__.py ADDED
@@ -0,0 +1,6 @@
1
+ """Small utilities for embodied policy evaluation."""
2
+
3
+ from .metrics import SuccessSummary, summarize_successes
4
+
5
+ __version__ = "0.0.1a0"
6
+ __all__ = ["SuccessSummary", "summarize_successes", "__version__"]
roboscope/metrics.py ADDED
@@ -0,0 +1,35 @@
1
+ """Aggregate binary episode outcomes without external dependencies."""
2
+
3
+ from collections.abc import Iterable
4
+ from dataclasses import dataclass
5
+
6
+
7
+ @dataclass(frozen=True)
8
+ class SuccessSummary:
9
+ """Episode counts and success rate; the rate is None for zero episodes."""
10
+
11
+ episodes: int
12
+ successes: int
13
+
14
+ @property
15
+ def failures(self) -> int:
16
+ return self.episodes - self.successes
17
+
18
+ @property
19
+ def success_rate(self) -> float | None:
20
+ return self.successes / self.episodes if self.episodes else None
21
+
22
+
23
+ def summarize_successes(outcomes: Iterable[bool]) -> SuccessSummary:
24
+ """Count episodes and successes in one pass.
25
+
26
+ Accepts actual booleans only, so strings such as "false" cannot silently
27
+ count as successful episodes. An empty iterable yields a None success rate.
28
+ """
29
+ episodes = successes = 0
30
+ for outcome in outcomes:
31
+ if type(outcome) is not bool:
32
+ raise TypeError("Each episode outcome must be a bool (True or False).")
33
+ episodes += 1
34
+ successes += int(outcome)
35
+ return SuccessSummary(episodes=episodes, successes=successes)
@@ -0,0 +1,47 @@
1
+ Metadata-Version: 2.5
2
+ Name: roboscope
3
+ Version: 0.0.1a0
4
+ Summary: Small utilities for embodied policy evaluation — early development release
5
+ Classifier: Development Status :: 2 - Pre-Alpha
6
+ Classifier: Intended Audience :: Developers
7
+ Classifier: Intended Audience :: Science/Research
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+
13
+ # RoboScope
14
+
15
+ Small, dependency-free utilities for embodied policy evaluation.
16
+
17
+ ## Status
18
+
19
+ This is an early development release with a deliberately small API. The project
20
+ name and API are provisional. This release provides episode success statistics;
21
+ it does not include model inference, benchmark runners, or simulator integrations.
22
+
23
+ This is an independent project, unaffiliated with MIT Media Lab's RoboScope,
24
+ vexide's RoboScope simulator, or viadee's RoboScope test management platform.
25
+
26
+ ## Install
27
+
28
+ ```sh
29
+ pip install --pre roboscope
30
+ ```
31
+
32
+ ## Summarize episode outcomes
33
+
34
+ ```python
35
+ from roboscope import summarize_successes
36
+
37
+ summary = summarize_successes([True, False, True, True])
38
+ print(summary.episodes) # 4
39
+ print(summary.successes) # 3
40
+ print(summary.failures) # 1
41
+ print(summary.success_rate) # 0.75
42
+ ```
43
+
44
+ The function consumes any iterable of booleans in one pass. Non-boolean values
45
+ raise `TypeError`, avoiding accidental truthiness of strings such as `"false"`.
46
+ For zero episodes, `success_rate` is `None`, distinguishing missing observations
47
+ from a measured zero success rate.
@@ -0,0 +1,5 @@
1
+ roboscope/__init__.py,sha256=rVcB4xuuGCpo48SrBisw_NWHbFzjdqquj8Jh8bHc3TM,204
2
+ roboscope/metrics.py,sha256=-ksL90xseSfzuhLCIfELTYoILIXS0I52ha5VTEAYDZ4,1120
3
+ roboscope-0.0.1a0.dist-info/METADATA,sha256=UNBZU1zSCM7w53ccqjjRtxEIqT77IRPX-P1B3uqznVI,1564
4
+ roboscope-0.0.1a0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
5
+ roboscope-0.0.1a0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.4
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any