- API_HOST
setup(
model_path: str,
model_id: int,
desc: str,
model_desc: str,
input_data: str,
debug: Optional[bool],
size: JobSize = <JobSize.S: 'S'>
) → None
This function executes the setup of the model and creates the outputs, handled by Giza. It first checks if the input data is provided. If not, it prints an error message and exits the program. If the model ID is not provided, it checks if the model exists and uses it if it does, or creates a new one if it doesn't. It then retrieves the model, creates a version, sends the model for setup, and creates a setup job. It keeps checking the status of the job until it is completed or fails. If the job validation fails or there is an HTTP error, it prints an error message and exits the program.
prove(
model_id: Optional[int],
version_id: Optional[int],
input_data: str,
output_path: str,
debug: Optional[bool],
size: JobSize = <JobSize.S: 'S'>
) → None
verify(
proof_id: Optional[int],
model_id: Optional[int],
version_id: Optional[int],
proof: Optional[str] = None,
debug: Optional[bool] = False,
size: JobSize = <JobSize.S: 'S'>
)
Create a verification job. This command will create a verification job with the provided proof id. The job size, model id, and version id can be optionally specified.
deploy(
model_id: int,
version_id: int,
size: ServiceSize = <ServiceSize.S: 'S'>,
debug: Optional[bool] = DEBUG_OPTION,
) → None
Command to deploy a specific version of a model. This will create a endpoint for the specified version and check the status, once it finishes if COMPLETED the endpoint is ready to be used.
Args:
model_id
: model id to deployversion_id
: version id to deploysize
: Size of the service, allowed values are S, M, L and XL. Defaults to S.debug
(Optional[bool], optional): Whether to add debug information, will show requests, extra logs and traceback if there is an Exception. Defaults to DEBUG_OPTION (False).
Raises:
ValidationError
: input fields are validated, if these are not suitable the exception is raisedHTTPError
: request error to the API, 4XX or 5XX