Service¶
All public members except for intersect_sdk_capability_name and intersect_sdk_events represent the public request API. (If looking at source code, these are the functions decorated with @intersect_message.) You send a request message according to the parameter’s type, DIAL sends a response message according to its return type.
Note that status is meant to represent the status of the DIAL Service as a whole, and will not be representative of a specific workflow.
DIAL may also send events on its own, these will be defined under the intersect_sdk_events object on the Capability class.
For a more in-depth look into how INTERSECT functions, please see the INTERSECT-SDK documentation.
- class dial_service.dial_service.DialCapabilityImplementation(credentials: dict[str, Any])¶
Internal guts for GP usage.
- get_next_point(client_data: Annotated[DialInputSingleConfidenceBound | DialInputSingleOtherStrategy, FieldInfo(annotation=NoneType, required=True, description='This is the input dataclass for Dial for selecting a single new point to measure.', discriminator='strategy')]) DialDataResponse1D¶
Trains a model, and then gets the next point for optimization based on the provided strategy.
- Parameters:
client_data (DialInputSingle) – Input data containing bounds, strategy, and other parameters.
- Returns:
list[float] – The selected point for the next iteration.
- get_next_points(client_data: Annotated[DialInputMultipleOtherStrategy, FieldInfo(annotation=NoneType, required=True, discriminator='strategy')]) DialDataResponse2D¶
Get multiple next points for optimization based on the provided strategy.
- Parameters:
client_data – Input data containing bounds, strategy, and other parameters.
- Returns:
list[list[float]] – A list of selected points for the next iteration.
- get_surrogate_values(client_data: DialInputPredictions) DialDataResponse2D¶
Trains a model then returns 3 lists based on user-supplied points: -Index 0: Predicted values. These are inverse transformed (undoing the preprocessing to put them on the same scale as dataset_y) -Index 1: Inverse-transformed uncertainties. If inverse-transforming is not possible (due to log-preprocessing), this will be all -1 -Index 2: Uncertainties without inverse transformation
- get_workflow_data(uuid: Annotated[ObjectId, _ObjectIdPydanticAnnotation]) DialWorkflowCreationParamsService¶
Returns the current state of the workflow associated with the id
- initialize_workflow(client_data: DialWorkflowCreationParamsService) str¶
Initializes a stateful workflow for DIALED.
Takes in initial data points, and returns the ID of the associated workflow.
- intersect_sdk_capability_name = 'dial'¶
The advertised name of your capability, as provided by the extension of this class.
You MUST override this value per class and set it as a string - it’s ideal to do so on the class itself for static analysis purposes, though as long as this variable has been set before the capability is added to the Service, everything should work fine.
Each capability within a Service MUST have a unique capability name. This value should not be modified once the capability has been added to the Service. This value should ONLY contain alphanumeric characters, hyphens, and underscores. Note case sensitivity; ‘HDF’ and ‘hdf’ are different capability names.
- status() str¶
Basic status function which returns a hard-coded string.
- update_workflow_with_batch_data(update_params: DialWorkflowDatasetUpdates) Annotated[ObjectId, _ObjectIdPydanticAnnotation]¶
- update_workflow_with_data(update_params: DialWorkflowDatasetUpdate) Annotated[ObjectId, _ObjectIdPydanticAnnotation]¶
Updates the DB with the provided params. Success of operation is based off whether or not the INTERSECT response is an error.