Links
Comment on page

Opsproject

Class Opsproject(object)

This namespace represent ops project in DS2.ai's desktop application, specifically CLICK AI, which is for AI deploying.

init()

__init__(info, user)
Parmeters
  • info (str): Information about the current ops project corresponding to the object
  • user (str): User for creating, modifying, deleting the ops project
Fields
  • id: Project ID.
  • url: DS2 API url information.
  • model: AI model in ops project.
  • ops_sever_group: Ops sever groups in ops project
  • user: User information
  • status: Ops project running status
  • dataconnectosList: Dataconnetor list to use in ops project
  • user_token: User token information

repr()

Returns self.id.
__repr__()

Return type

  • Ops project id

get_app_url()

Gets the service application url of the ops project in Skyhub AI corresponding to the user object.
get_app_url()

Return type

  • url

delete()

Deletes the ops project in Skyhub AI corresponding to the user object.
delete()

Return type

  • None

get_server_status()

Gets the detailed server status of the ops project in Skyhub AI corresponding to the user object, such as 'run' or 'stop'.
get_server_status()

Return type:

  • json

refresh()

Refreshes the ops project object in Skyhub AI corresponding to the user object to so that the object can run in the latest server environment.
refresh()

Return type

  • Ops project ID

predict()

Predicts the result using the input data by calling self.utilClass corresponing to the user object.
predict(data, return_type="info")

Parmeters

  • data (str) : Input data to predict the result.
  • return_type (str) : When you prdedict images or videos, if True, returns the detailed information of the predicted value as json format.
  • xai (bool) : When you prdedict image classification, if True, returns the detailed information of the predicted value as XAI.

Return type

  • None

get_dataconnector()

Reads the created dataconnector as a corresponding dataconnector ID to use it in ops project.
get_dataconnector(dataconnector_id)

Parmeters

  • dataconnector_id (int) : Pre-created dataconnector ID.

Return type

  • class Dataconnector
  • Dataconnector ID