Skip to content

mock_prediction

check_api_credits

check_api_credits(func)

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_mode

mock_mode()

Context manager that enables mock mode in the current thread.

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.