unisim.backend.isaacsim.raw_usd_cache

Content-addressed cold-path cache for IsaacSim raw MJCF-to-USD artifacts.

Functions

file_sha256(path)

Hash one cold-path input without loading the whole file into memory.

raw_artifact_fingerprint(record)

Fingerprint the immutable converter output associated with a raw entry.

resolve_raw_usd_cache_root()

Resolve the persistent cache root; an explicit disabled value opts out.

resolve_role_usd_cache_root()

Resolve the derived-role cache root; an explicit disabled value opts out.

Classes

RawUSDArtifactRequest

All inputs that distinguish one raw conversion entry.

RawUSDCache

Publish and read complete raw converter output directories atomically.

RawUSDCacheFile

One immutable file in a published raw artifact.

RawUSDCacheRecord

A validated, immutable complete cache entry.

RawUSDCacheResult

Outcome of one cache materialization request.

RoleUSDCache

Publish immutable role-derived USD using the complete-entry protocol.

class unisim.backend.isaacsim.raw_usd_cache.RawUSDArtifactRequest[source]

Bases: object

All inputs that distinguish one raw conversion entry.

Parameters:
identity: str
source_digest: str
parameters: Mapping[str, Any]
runtime_versions: Mapping[str, str]
__init__(identity, source_digest, parameters, runtime_versions)
Parameters:
class unisim.backend.isaacsim.raw_usd_cache.RawUSDCache[source]

Bases: object

Publish and read complete raw converter output directories atomically.

Parameters:

root (Path)

__init__(root)[source]
Parameters:

root (Path)

load(identity)[source]

Return one validated entry, or None for any miss/corruption.

Parameters:

identity (str)

Return type:

RawUSDCacheRecord | None

materialize(request, convert)[source]

Return a validated entry, converting and publishing only on a miss.

Parameters:
Return type:

RawUSDCacheResult

copy_artifact(record, destination)[source]

Copy one validated immutable artifact for mutable downstream baking.

Parameters:
Return type:

Path

class unisim.backend.isaacsim.raw_usd_cache.RawUSDCacheFile[source]

Bases: object

One immutable file in a published raw artifact.

Parameters:
path: str
size_bytes: int
sha256: str
__init__(path, size_bytes, sha256)
Parameters:
class unisim.backend.isaacsim.raw_usd_cache.RawUSDCacheRecord[source]

Bases: object

A validated, immutable complete cache entry.

Parameters:
identity: str
source_digest: str
parameters: dict[str, Any]
runtime_versions: dict[str, str]
usd_relative_path: str
files: tuple[RawUSDCacheFile, ...]
entry_path: Path
artifact_path: Path
usd_path: Path
property size_bytes: int
__init__(identity, source_digest, parameters, runtime_versions, usd_relative_path, files, entry_path, artifact_path, usd_path)
Parameters:
class unisim.backend.isaacsim.raw_usd_cache.RawUSDCacheResult[source]

Bases: object

Outcome of one cache materialization request.

Parameters:
record: RawUSDCacheRecord
hit: bool
materialize_ms: float
__init__(record, hit, materialize_ms)
Parameters:
class unisim.backend.isaacsim.raw_usd_cache.RoleUSDCache[source]

Bases: RawUSDCache

Publish immutable role-derived USD using the complete-entry protocol.

A role request’s identity already includes its raw artifact identity and fingerprint plus collision/visual/mirror/bake parameters. A miss copies and bakes the raw artifact inside staging; a hit is inventory-validated and must never be mutated by native materialization or role inspection.

Parameters:

root (Path)

unisim.backend.isaacsim.raw_usd_cache.file_sha256(path)[source]

Hash one cold-path input without loading the whole file into memory.

Parameters:

path (Path)

Return type:

str

unisim.backend.isaacsim.raw_usd_cache.raw_artifact_fingerprint(record)[source]

Fingerprint the immutable converter output associated with a raw entry.

Parameters:

record (RawUSDCacheRecord)

Return type:

str

unisim.backend.isaacsim.raw_usd_cache.resolve_raw_usd_cache_root()[source]

Resolve the persistent cache root; an explicit disabled value opts out.

Return type:

Path | None

unisim.backend.isaacsim.raw_usd_cache.resolve_role_usd_cache_root()[source]

Resolve the derived-role cache root; an explicit disabled value opts out.

Return type:

Path | None