Skip to content


class Model(object)

This namespace represents a model in a project. Multiple Model objects can belong to a single project.


__init__(info, user)
  • Parmeters:
    • 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.

  • Return type:
    • str


Getter for current project's Project object.

  • Parmeters:
    • project_id : project id as an int
  • Return type:
    • Project object


Getter for the current project's data connector.

  • Parmeters:
    • 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")
  • Parmeters:
    • data : data needed for prediction
  • Return type:
    • requests


Delete the current model.

  • Return type:
    • None
  • Reference:
    • You can find the corresponding model deleted.


Returns the app_url to predict and analyze outside of DS2.AI.

  • 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): 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.