mistk.model.server.controllers.model_instance_endpoint_controller module¶
-
mistk.model.server.controllers.model_instance_endpoint_controller.build_model(modelPath=None)¶ Build the model
Instructs the container to construct the model # noqa: E501
- Parameters
modelPath (str) – The absolute path to the directory where the model's checkpoint/snapshot file can be found.
- Return type
None
-
mistk.model.server.controllers.model_instance_endpoint_controller.generate()¶ Perform generations with the model
Perform generations with the model # noqa: E501
- Return type
None
-
mistk.model.server.controllers.model_instance_endpoint_controller.get_api_version()¶ Returns the version of the MISTK API
Returns the version of the MISTK API # noqa: E501
- Return type
str
-
mistk.model.server.controllers.model_instance_endpoint_controller.get_status(watch=None, resourceVersion=None)¶ Get the status of the model
Retrieves the current status of the model # noqa: E501
- Parameters
watch (bool) – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
resourceVersion (int) – When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.
- Return type
-
mistk.model.server.controllers.model_instance_endpoint_controller.initialize_model(initializationParameters)¶ Initialize the model
Instructs the model instance to initialize. # noqa: E501
- Parameters
initializationParameters (dict | bytes) – Initialization parameters for the model including the objectives, properties, and hparams. Objectives are a list of objectives for this model instance from the following options {train, predict, stream_predict, generate, transfer_learning}. Properties are a dictionary of properties for this model instance. Hparams are a dictionary of hyperparameters for this model instance.
- Return type
None
-
mistk.model.server.controllers.model_instance_endpoint_controller.load_data(datasets)¶ Loads data for the model
Loads data onto a staging area for use by the model # noqa: E501
- Parameters
datasets – A dictionary mapping objectives to MistkDataset objects. Dictionary keys must be one of the following {train, test, generate}
- Return type
None
-
mistk.model.server.controllers.model_instance_endpoint_controller.pause()¶ Pause the model
Instructs the container to pause the current training or prediction activity # noqa: E501
- Return type
None
-
mistk.model.server.controllers.model_instance_endpoint_controller.predict()¶ Perform predictions with the model
Perform predictions with the test dataset previously loaded # noqa: E501
- Return type
None
-
mistk.model.server.controllers.model_instance_endpoint_controller.reset()¶ Resets the model
Resets the model # noqa: E501
- Return type
None
-
mistk.model.server.controllers.model_instance_endpoint_controller.resume_predict()¶ Resume predicitons on a paused model
Resumes the training activity # noqa: E501
- Return type
None
-
mistk.model.server.controllers.model_instance_endpoint_controller.resume_training()¶ Resume training on a paused model
Resumes the training activity # noqa: E501
- Return type
None
-
mistk.model.server.controllers.model_instance_endpoint_controller.save_generations(dataPath)¶ Save the generations made by the model
Instructs the container to save the generations to the specified path # noqa: E501
- Parameters
dataPath (str) – A path pointing to the directory where the generations are to be saved.
- Return type
None
-
mistk.model.server.controllers.model_instance_endpoint_controller.save_model(modelPath)¶ Save the model snapshot
Instructs the container to serialize the model to the specified path # noqa: E501
- Parameters
modelPath (str) – A path pointing to the directory where the model is to be saved.
- Return type
None
-
mistk.model.server.controllers.model_instance_endpoint_controller.save_predictions(dataPath)¶ Save the predictions made by the model
Instructs the container to save the predictions to the specified path # noqa: E501
- Parameters
dataPath (str) – A path pointing to the directory where the predictions are to be saved.
- Return type
None
-
mistk.model.server.controllers.model_instance_endpoint_controller.stream_predict(dataMap, details=None)¶ Perform streaming predictions with the model
Perform predictions with the test dataset previously loaded # noqa: E501
- Parameters
dataMap – Dictionary of IDs to b64 encoded data
details (bool) – Boolean flag to indicate whether prediction details (markdown) should be included in predictions dictionary.
- Return type
Dict[str, object]
-
mistk.model.server.controllers.model_instance_endpoint_controller.terminate()¶ Shut down the model
Shuts down the model # noqa: E501
- Return type
None
-
mistk.model.server.controllers.model_instance_endpoint_controller.train()¶ Train the model
Trains the model with the training dataset previously loaded # noqa: E501
- Return type
None
-
mistk.model.server.controllers.model_instance_endpoint_controller.update_stream_properties(props)¶ Updates streaming properties with the model
Update streaming properties # noqa: E501
- Parameters
props – Dictionary of metadata properties to be used by the model
- Return type
None