mock_prediction ¶
check_api_credits ¶
Decorator that first runs the decorated function in mock mode to simulate its credit usage. If user has enough credits, function is then executed for real.
mock_predict ¶
mock_predict(
X_test,
task: Literal["classification", "regression"],
train_set_uid: str,
X_train,
y_train,
config=None,
predict_params=None,
)
Mock function for prediction, which can be called instead of the real prediction function. Outputs random results in the expacted format and keeps track of the simulated cost and time.