def predict(ctx, provider, filename, model_id, threshold, locally, output): """Predict with deployed model.""" A2MLModel(ctx, provider).predict(filename, model_id, threshold=threshold, locally=locally, output=output)
def actual(ctx, provider, filename, model_id): """Predict with deployed model.""" A2MLModel(ctx, provider).actual(filename, model_id)
def deploy(ctx, provider, model_id, locally): """Deploy trained model.""" A2MLModel(ctx, provider).deploy(model_id, locally)
def predict_model_task(params): return with_context( params, lambda ctx: A2MLModel(ctx, None).predict( *params['args'], **params['kwargs']))
def deploy_model_task(params): return with_context( params, lambda ctx: A2MLModel(ctx, None).deploy( *params['args'], **params['kwargs']))
def actual_model_task(params): return with_context( params, lambda ctx: A2MLModel(ctx, None).actual( *params['args'], **params['kwargs']))
def actuals(ctx, provider, filename, model_id, locally): """Predict with deployed model.""" A2MLModel(ctx, provider).actuals(model_id, filename=filename, locally=locally)
def review(ctx, provider, model_id, output): """Predict with deployed model.""" A2MLModel(ctx, provider).review(model_id)
def _predict(ctx): return A2MLModel(ctx).predict(*params['args'], **params['kwargs'])