Skip to content

ds2ai.Dataconnector

class Dataconnector(object)

This namespace provides python functions for connecting training data for AI modeling.

init()

__init__(info, user)
  • Parameters:
    • info (dict): Information about the training data corresponding to the object
    • user (User): User for making the data connector corresponding to the object
  • Fields:
    • id: The id from the 'info' parameter
    • url: DS2 API url information.
    • user: The User object from the 'user' parameter
    • user_token: The user's appcode as a token

repr(): returns self.id

__repr__()
  • Return type:
    • str

delete(): deletes a data connector that has corresponding id and token

delete()
  • Return type:
    • None

get_magic_code()

Makes a new ipynb file to the designated file path and writes the needed code for data connector

get_magic_code(training_method, value_for_predict, file_path="output.ipynb")
# possible inputs fot training_method: "image", "normal_classification", "normal_regression", "object_detection", "time_series", "time_series_regression", "time_series_classification", "recommender", "image_classification"
  • Parameters:
    • training_method (str): training method for the data connector as a string
    • value_for_predict (str): User for making the data connector corresponding to the object
    • file_path (str): designated file path for saving ipynb file
  • Return type:
    • None