Model
This namespace represents a model in a project. Multiple Model objects can belong to a single project.
__init__(info, user)
- info (str): Information about the current AI model in a project corresponding to the object.
- user (str): User for creating, modifying, deleting the model.
Fields
- id: Model ID.
- url: DS2 API url information.
- user: User information.
- user_token: User token information.
- app_url: Service app url.
Returns the Model ID in a Click AI's project as a printable format.
__repr__()
Return type
- str
Getter for current project's Project object.
get_project(project_id)
- project_id : Project id as an int.
Return type
- Project object
Getter for the current project's data connector.
get_dataconnector(dataconnector_id)
- dataconnector_id : Data connector's id as an int.
Return type
- Dataconnector object
Predict the result using the input data and the model by calling self.utilClass.
predict(data, return_type="info")
- data : Data needed for prediction.
Return type
- requests
Delete the current model.
delete()
- None
Reference
- You can find the corresponding model deleted.
Returns the app_url to predict and analyze outside of DS2.AI.
get_app_url()
Return type
- Link
- URL
Reference
- Link helps you predict and analyze data with the model.
Deploy the model according to the cloud type, region, server type and project name if needed.
deploy(cloud_type="AWS", region="us-west-1", server_type="g4dn.xlarge", project_name=None)
Parmeters
- cloud_type (str): DS2.ai supports AWS, Google Cloud, MS Azure and the default is set as "AWS".
- region (str): Region of the desired server and "us-west-1" is default.
- server_type (str): Type of the server and "g4dn.xlarge" is default.
- project_name (str): Name of the project in deploying process using SKYHUB AI and can be left None.
Return type
- class Opsproject
- Ops project id
Reference
- You can find the deployed model in SKYHUB AI.
Last modified 10mo ago