Log models
from vectice import Model
model = Model(name, library, technique, metrics, predictor, attachments)iteration.log(model)Example
import vectice
from vectice import Model, Metric
from sklearn import ...
# Connect to Vectice
connect = vectice.connect(
api_token = 'your-api-key', # Paste your api key
host = 'https://app.vectice.com', # Paste your host
)
# Retrieve the project phase to begin the model development
phase = connect.phase("PHA-XXX")
# Initialize iteration
iteration = phase.create_or_get_current_iteration()
# Model artifacts
model_name = "your-model-name"
model_library = "sklearn"
model_technique = "clustering"
model_metrics = [Metric("RMSE", 153), Metric("Clusters number", 5)]
model_predictor = my_sklearn_predictor
model_attachments = ["attachment1.png", "attachment2.png" ]
# Declaring your model and its artifacts
model = Model(name=model_name, library=model_library, technique=model_technique, metrics=model_metrics, predictor=model_predictor, attachments=model_attachments)
# Log the model to Vectice
iteration.log(model)Last updated
Was this helpful?