All docs
lsdtools.integeragent reference
Generated public SDK reference for lsdtools.integeragent.
SDK distribution 1.0.0; API contract 1.0; generator 1.0.0.
Product source digest: 4ea39055732e8883c03ccfecf12af6ccebd2041a12ce1b843e4a769e200f5ef9.
Generated from declared public exports and source syntax. Signatures and annotations are declaration spellings; decorators, factories and annotations are never executed. Class members below are declared members; base classes remain explicit. Source docstrings describe their owning implementation; they do not grant app permissions.
Lazy public facade for LSD integer-agent deployment and inference.
Importing this module does not import NumPy, the private inference engine, a
gym, CUDA, a mine adapter, or the product runtime.
lsdtools.integeragent.Backend#
Kind: value. Source: sdk/src/lsdtools/integeragent.py:18.
Backend: TypeAlias
Backend = Literal['cpu', 'cuda']
lsdtools.integeragent.Candidate#
Kind: class. Source: sdk/src/lsdtools/integeragent.py:134.
lsdtools.integeragent.Candidate.action_id#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:135.
action_id: int
lsdtools.integeragent.Candidate.features#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:136.
features: tuple[int, ...]
features = ()
lsdtools.integeragent.CandidateScore#
Kind: class. Source: sdk/src/lsdtools/integeragent.py:292.
lsdtools.integeragent.CandidateScore.action_id#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:293.
action_id: int
lsdtools.integeragent.CandidateScore.score#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:294.
score: int | None
lsdtools.integeragent.CandidateScore.safe#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:295.
safe: bool
lsdtools.integeragent.CandidateScore.grammar#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:296.
grammar: bool
lsdtools.integeragent.CandidateScore.policy#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:297.
policy: bool
lsdtools.integeragent.DecisionMode#
Kind: value. Source: sdk/src/lsdtools/integeragent.py:19.
DecisionMode: TypeAlias
DecisionMode = Literal['manual', 'trained']
lsdtools.integeragent.DecisionProvenance#
Kind: class. Source: sdk/src/lsdtools/integeragent.py:319.
lsdtools.integeragent.DecisionProvenance.service_version#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:320.
service_version: str
lsdtools.integeragent.DecisionProvenance.mode#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:321.
mode: DecisionMode
lsdtools.integeragent.DecisionProvenance.requested_backend#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:322.
requested_backend: str
lsdtools.integeragent.DecisionProvenance.executed_backend#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:323.
executed_backend: str
lsdtools.integeragent.DecisionProvenance.backend_name#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:324.
backend_name: str | None
lsdtools.integeragent.DecisionProvenance.backend_device#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:325.
backend_device: str | None
lsdtools.integeragent.DecisionProvenance.backend_conformance#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:326.
backend_conformance: str | None
lsdtools.integeragent.DecisionProvenance.backend_source_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:327.
backend_source_sha256: str | None
lsdtools.integeragent.DecisionProvenance.deployment_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:328.
deployment_sha256: str | None
lsdtools.integeragent.DecisionProvenance.checkpoint_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:329.
checkpoint_sha256: str | None
lsdtools.integeragent.DecisionProvenance.model_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:330.
model_sha256: str | None
lsdtools.integeragent.DecisionProvenance.capability#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:331.
capability: str
lsdtools.integeragent.DecisionProvenance.codec_id#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:332.
codec_id: str
lsdtools.integeragent.DecisionProvenance.codec_version#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:333.
codec_version: str
lsdtools.integeragent.DecisionProvenance.codec_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:334.
codec_sha256: str
lsdtools.integeragent.DecisionProvenance.adapter_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:335.
adapter_sha256: str
lsdtools.integeragent.DecisionProvenance.evidence_classification#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:336.
evidence_classification: str | None
lsdtools.integeragent.DecisionProvenance.qualification_eligible#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:337.
qualification_eligible: bool | None
lsdtools.integeragent.DecisionProvenance.source_receipt_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:338.
source_receipt_sha256: str | None
lsdtools.integeragent.DecisionProvenance.representation#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:339.
representation: str
lsdtools.integeragent.DecisionRequest#
Kind: class. Source: sdk/src/lsdtools/integeragent.py:153.
lsdtools.integeragent.DecisionRequest.mode#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:154.
mode: DecisionMode
lsdtools.integeragent.DecisionRequest.capability#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:155.
capability: str
lsdtools.integeragent.DecisionRequest.codec_id#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:156.
codec_id: str
lsdtools.integeragent.DecisionRequest.codec_version#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:157.
codec_version: str
lsdtools.integeragent.DecisionRequest.codec_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:158.
codec_sha256: str
lsdtools.integeragent.DecisionRequest.adapter_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:159.
adapter_sha256: str
lsdtools.integeragent.DecisionRequest.tokens#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:160.
tokens: tuple[int, ...]
lsdtools.integeragent.DecisionRequest.candidates#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:161.
candidates: tuple[Candidate, ...]
lsdtools.integeragent.DecisionRequest.safe_actions#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:162.
safe_actions: tuple[int, ...]
lsdtools.integeragent.DecisionRequest.grammar_actions#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:163.
grammar_actions: tuple[int, ...]
lsdtools.integeragent.DecisionRequest.policy_actions#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:164.
policy_actions: tuple[int, ...]
lsdtools.integeragent.DecisionRequest.offered_action#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:165.
offered_action: int | None
offered_action = None
lsdtools.integeragent.DecisionResult#
Kind: class. Source: sdk/src/lsdtools/integeragent.py:434.
lsdtools.integeragent.DecisionResult.action_id#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:435.
action_id: int
lsdtools.integeragent.DecisionResult.scores#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:436.
scores: tuple[CandidateScore, ...]
lsdtools.integeragent.DecisionResult.frame_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:437.
frame_sha256: str
lsdtools.integeragent.DecisionResult.provenance#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:438.
provenance: DecisionProvenance
lsdtools.integeragent.DeploymentArtifact#
Kind: class. Source: sdk/src/lsdtools/integeragent.py:275.
lsdtools.integeragent.DeploymentArtifact.data#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:276.
data: bytes
lsdtools.integeragent.DeploymentArtifact.sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:277.
sha256: str
lsdtools.integeragent.DeploymentArtifact.manifest#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:278.
manifest: DeploymentManifest
lsdtools.integeragent.DeploymentManifest#
Kind: class. Source: sdk/src/lsdtools/integeragent.py:256.
lsdtools.integeragent.DeploymentManifest.capability#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:257.
capability: str
lsdtools.integeragent.DeploymentManifest.codec_id#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:258.
codec_id: str
lsdtools.integeragent.DeploymentManifest.codec_version#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:259.
codec_version: str
lsdtools.integeragent.DeploymentManifest.codec_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:260.
codec_sha256: str
lsdtools.integeragent.DeploymentManifest.adapter_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:261.
adapter_sha256: str
lsdtools.integeragent.DeploymentManifest.separator_token#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:262.
separator_token: int
lsdtools.integeragent.DeploymentManifest.score_token#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:263.
score_token: int
lsdtools.integeragent.DeploymentManifest.checkpoint_size_bytes#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:264.
checkpoint_size_bytes: int
lsdtools.integeragent.DeploymentManifest.checkpoint_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:265.
checkpoint_sha256: str
lsdtools.integeragent.DeploymentManifest.model_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:266.
model_sha256: str
lsdtools.integeragent.DeploymentManifest.evidence_classification#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:267.
evidence_classification: str
lsdtools.integeragent.DeploymentManifest.qualification_eligible#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:268.
qualification_eligible: bool
lsdtools.integeragent.DeploymentManifest.source_receipt_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:269.
source_receipt_sha256: str
lsdtools.integeragent.DeploymentManifest.engine_version#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:270.
engine_version: str
lsdtools.integeragent.DeploymentManifest.engine_wheel_sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:271.
engine_wheel_sha256: str
lsdtools.integeragent.DeploymentRef#
Kind: class. Source: sdk/src/lsdtools/integeragent.py:246.
lsdtools.integeragent.DeploymentRef.path#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:247.
path: str
lsdtools.integeragent.DeploymentRef.sha256#
Kind: attribute. Source: sdk/src/lsdtools/integeragent.py:248.
sha256: str
lsdtools.integeragent.IntegerAgentBackendUnavailable#
Kind: class. Source: sdk/src/lsdtools/integeragent.py:44.
Source docstring:
The explicitly requested backend cannot execute the deployment.
Declared bases: RuntimeError.
lsdtools.integeragent.IntegerAgentContractError#
Kind: class. Source: sdk/src/lsdtools/integeragent.py:36.
Source docstring:
A public decision request violates the integer-agent contract.
Declared bases: ValueError.
lsdtools.integeragent.IntegerAgentDeploymentError#
Kind: class. Source: sdk/src/lsdtools/integeragent.py:40.
Source docstring:
A deployment is malformed, mismatched, unanchored, or tampered with.
Declared bases: RuntimeError.
lsdtools.integeragent.IntegerAgentInferenceError#
Kind: class. Source: sdk/src/lsdtools/integeragent.py:48.
Source docstring:
A trained model rejected or failed a valid inference request.
Declared bases: RuntimeError.
lsdtools.integeragent.IntegerAgentServiceUnavailable#
Kind: class. Source: sdk/src/lsdtools/integeragent.py:32.
Source docstring:
The installed product lacks a compatible integer-agent service.
Declared bases: RuntimeError.
lsdtools.integeragent.MAX_BATCH_CANDIDATES#
Kind: value. Source: sdk/src/lsdtools/integeragent.py:22.
MAX_BATCH_CANDIDATES = 65536
lsdtools.integeragent.MAX_BATCH_REQUESTS#
Kind: value. Source: sdk/src/lsdtools/integeragent.py:21.
MAX_BATCH_REQUESTS = 256
lsdtools.integeragent.MAX_CANDIDATES_PER_REQUEST#
Kind: value. Source: sdk/src/lsdtools/integeragent.py:23.
MAX_CANDIDATES_PER_REQUEST = 4096
lsdtools.integeragent.MAX_CANDIDATE_FEATURES#
Kind: value. Source: sdk/src/lsdtools/integeragent.py:25.
MAX_CANDIDATE_FEATURES = 4096
lsdtools.integeragent.MAX_CONTEXT_TOKENS#
Kind: value. Source: sdk/src/lsdtools/integeragent.py:24.
MAX_CONTEXT_TOKENS = 65536
lsdtools.integeragent.MAX_REPRESENTATION_TOKEN_CELLS#
Kind: value. Source: sdk/src/lsdtools/integeragent.py:26.
MAX_REPRESENTATION_TOKEN_CELLS = 16777216
lsdtools.integeragent.SERVICE_API_CONTRACT#
Kind: value. Source: sdk/src/lsdtools/integeragent.py:20.
SERVICE_API_CONTRACT = 'lsd-integeragent-service-v1'
lsdtools.integeragent.build_deployment#
Kind: function. Source: sdk/src/lsdtools/integeragent.py:656.
build_deployment(checkpoint: bytes, *, source_receipt: bytes, capability: str, codec_id: str, codec_version: str, codec_sha256: str, adapter_sha256: str, separator_token: int, score_token: int, evidence_classification: str, qualification_eligible: bool, source_receipt_sha256: str, expected_checkpoint_sha256: str | None=None, expected_model_sha256: str | None=None) -> DeploymentArtifact
adapter_sha256: str
capability: str
checkpoint: bytes
codec_id: str
codec_sha256: str
codec_version: str
evidence_classification: str
expected_checkpoint_sha256: str | None
expected_model_sha256: str | None
qualification_eligible: bool
score_token: int
separator_token: int
source_receipt: bytes
source_receipt_sha256: str
lsdtools.integeragent.capabilities#
Kind: function. Source: sdk/src/lsdtools/integeragent.py:811.
capabilities() -> dict[str, object]
lsdtools.integeragent.decide#
Kind: function. Source: sdk/src/lsdtools/integeragent.py:731.
decide(request: DecisionRequest, *, deployment: DeploymentRef | DeploymentArtifact | bytes | None=None, backend: Backend='cpu', device: int=0) -> DecisionResult
backend: Backend
deployment: DeploymentRef | DeploymentArtifact | bytes | None
device: int
request: DecisionRequest
lsdtools.integeragent.decide_many#
Kind: function. Source: sdk/src/lsdtools/integeragent.py:755.
decide_many(requests: Sequence[DecisionRequest], *, deployment: DeploymentRef | DeploymentArtifact | bytes | None=None, backend: Backend='cpu', device: int=0) -> tuple[DecisionResult, ...]
backend: Backend
deployment: DeploymentRef | DeploymentArtifact | bytes | None
device: int
requests: Sequence[DecisionRequest]
lsdtools.integeragent.load_deployment#
Kind: function. Source: sdk/src/lsdtools/integeragent.py:696.
load_deployment(reference: DeploymentRef) -> DeploymentArtifact
reference: DeploymentRef
lsdtools.integeragent.save_deployment#
Kind: function. Source: sdk/src/lsdtools/integeragent.py:705.
save_deployment(path: str, artifact: DeploymentArtifact, *, overwrite: bool=False) -> DeploymentRef
artifact: DeploymentArtifact
overwrite: bool
path: str