Services
The service definitions here are based on the Protobuf files available at https://protos.trustworthy.ai.
TrustworthySearch Services
The main trustworthy search API.
Services
StartJobstarts a job using aJobRequestobject and returns aJobobject (unary RPC)OpenSimStreamtakesJobas an argument and creates a stream with which a client can receive simulations to run until the job is finished (server streaming RPC)UploadSimResultis the way a client uploads aSimReultfrom jobs asynchronously (unary RPC)KillJobtakes aJobas an argument and lets you stop a job before it is finished (unary RPC)GetJobResulttakes aJobobject as an argument and gets analysis from a finished job as aJobResult(server streaming RPC)EstimateRiskBudgetestimates the budget needed for a RISK job based on aBudgetRequestobject and returns aBudget(unary RPC)
Definition
service TrustworthySearch {
rpc StartJob(JobRequest) returns (Job);
rpc OpenSimStream(Job) returns (stream SimParams);
rpc UploadSimResult(SimResult) returns (Empty);
rpc KillJob(Job) returns (Empty);
rpc GetJobResults(Job) returns (stream JobResult);
rpc EstimateRiskBudget(BudgetRequest) returns (Budget);
}
Simulator Services
A simulator worker can run multiple jobs being sent to it by multiple brokers (each of which is uniquely defined by its port). It is not necessary to use the Simulator service for managing your simulation workers. This implementation is provided in order to demonstrate TrustworthySearch on several example problems
Services
Simulatesimulates a rollout using aBrokerSimParamsobject (unary RPC)BatchSimulatesimulates a batch of rollouts using aBatchBrokerSimParamsobject (unary RPC)RegisterBrokerties a worker to a specific broker using theBrokerPort(unary RPC)DeregisterBrokerdecouples a worker from a specific broker using theBrokerPort(unary RPC)
Definition
service Simulator {
rpc Simulate(BrokerSimParams) returns (Empty);
rpc BatchSimulate(BatchBrokerSimParams) returns (Empty);
rpc RegisterBroker(BrokerPort) returns (Empty);
rpc DeregisterBroker(BrokerPort) returns (Empty);
}
Example
See the next section, Simulation, for more details on our example implementation of the broker/worker distributed simulation scheme.