> This page is for version 0.7.0.
> For other versions, use one of these documentation indexes:
> - Main (default): https://docs.nvidia.com/nemo/gym/main/llms.txt
> - 0.7.0: https://docs.nvidia.com/nemo/gym/v0.7.0/llms.txt
> - 0.6.0: https://docs.nvidia.com/nemo/gym/v0.6.0/llms.txt
> - 0.5.1: https://docs.nvidia.com/nemo/gym/v0.5.1/llms.txt
> - 0.5.0: https://docs.nvidia.com/nemo/gym/v0.5.0/llms.txt
> - 0.4.0: https://docs.nvidia.com/nemo/gym/v0.4.0/llms.txt
> - 0.3.0: https://docs.nvidia.com/nemo/gym/v0.3.0/llms.txt
> - 0.2.1: https://docs.nvidia.com/nemo/gym/v0.2.1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/gym/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/gym/_mcp/server.

# nemo_gym.sandbox.providers.opensandbox.resource_telemetry

Translate OpenSandbox resource quantities and inspection into shared Gym types.

## Module Contents

### Functions

| Name                                                                                              | Description                                                                  |
| ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [`_quantity`](#nemo_gym-sandbox-providers-opensandbox-resource_telemetry-_quantity)               | Decode Kubernetes decimal, binary and exponent quantities to base units.     |
| [`parse_allocation`](#nemo_gym-sandbox-providers-opensandbox-resource_telemetry-parse_allocation) | Parse explicit inspection resources; never infer allocation from submission. |
| [`resource_amounts`](#nemo_gym-sandbox-providers-opensandbox-resource_telemetry-resource_amounts) | Normalize known OSB/Kubernetes resources; vendor resources are not guessed.  |

### Data

[`_BINARY_EXPONENTS`](#nemo_gym-sandbox-providers-opensandbox-resource_telemetry-_BINARY_EXPONENTS)

[`_DECIMAL_EXPONENTS`](#nemo_gym-sandbox-providers-opensandbox-resource_telemetry-_DECIMAL_EXPONENTS)

### API

```python
nemo_gym.sandbox.providers.opensandbox.resource_telemetry._quantity(
    value: object
) -> decimal.Decimal
```

Decode Kubernetes decimal, binary and exponent quantities to base units.

```python
nemo_gym.sandbox.providers.opensandbox.resource_telemetry.parse_allocation(
    text: str,
    scope: str | None = None
) -> nemo_gym.sandbox.resource_telemetry.ResourceAllocation
```

Parse explicit inspection resources; never infer allocation from submission.

Scope can be the OSB control-plane deployment when a cluster ID is unavailable.
Only emit a pod designator when both namespace and pod are present.

```python
nemo_gym.sandbox.providers.opensandbox.resource_telemetry.resource_amounts(
    resources: collections.abc.Mapping[str, object]
) -> nemo_gym.sandbox.providers.base.SandboxResourceAmounts
```

Normalize known OSB/Kubernetes resources; vendor resources are not guessed.

```python
nemo_gym.sandbox.providers.opensandbox.resource_telemetry._BINARY_EXPONENTS = {'Ki': 10, 'Mi': 20, 'Gi': 30, 'Ti': 40, 'Pi': 50, 'Ei': 60}
```

```python
nemo_gym.sandbox.providers.opensandbox.resource_telemetry._DECIMAL_EXPONENTS = {'n': -9, 'u': -6, 'm': -3, '': 0, 'k': 3, 'K': 3, 'M': 6, 'G': 9, 'T': 12, 'P':...
```