How to use the a2ml.tasks_queue.celery_app.celeryApp.task function in a2ml

To help you get started, we’ve selected a few a2ml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github augerai / a2ml / a2ml / tasks_queue / tasks_hub_api.py View on Github external
@celeryApp.task(ignore_result=True, after_return=process_task_result)
def count_actuals_by_prediction_id_task(params):
    return ModelReview(params).count_actuals_by_prediction_id()
github augerai / a2ml / a2ml / tasks_queue / tasks_hub_api.py View on Github external
@celeryApp.task(ignore_result=True, after_return=process_task_result)
def score_actuals_by_model_task(params):
    return ModelReview(params).score_actuals(
        actuals_path = params.get('actuals_path'),
        actual_records=params.get('actual_records'),
        prediction_group_id=params.get('prediction_group_id', None),
        primary_prediction_group_id=params.get('primary_prediction_group_id', None),
        primary_model_path=ModelHelper.get_model_path(params.get('primary_pipeline_id', None),
            params.get('hub_info', {}).get('projectPath')),
        actual_date=params.get('actual_date'),
        actuals_id=params.get('actuals_id')
    )
github augerai / a2ml / a2ml / tasks_queue / tasks_api.py View on Github external
@celeryApp.task(after_return=__handle_task_result)
def predict_model_task(params):
    def _predict(ctx):
        return A2MLModel(ctx).predict(*params['args'], **params['kwargs'])

    return with_context(params, _predict)
github augerai / a2ml / a2ml / tasks_queue / tasks_api.py View on Github external
@celeryApp.task
def remove_tmp_file(path):
    fsclient.remove_file(path)
github augerai / a2ml / a2ml / tasks_queue / tasks_api.py View on Github external
@celeryApp.task(after_return=__handle_task_result)
def deploy_task(params):
    return with_context(
        params,
        lambda ctx: A2ML(ctx).deploy(*params['args'], **params['kwargs'])
    )
github augerai / a2ml / a2ml / tasks_queue / tasks_api.py View on Github external
@celeryApp.task(after_return=__handle_task_result)
def evaluate_task(params):
    return with_context(
        params,
        lambda ctx: A2ML(ctx).evaluate(*params['args'], **params['kwargs'])
    )
github augerai / a2ml / a2ml / tasks_queue / tasks_api.py View on Github external
@celeryApp.task(after_return=__handle_task_result)
def list_datasets_task(params):
    def func(ctx):
        res = A2MLDataset(ctx, None).list(*params['args'], **params['kwargs'])
        return __map_collection_to_name(res, 'datasets')

    return with_context(params, func)
github augerai / a2ml / a2ml / tasks_queue / tasks_api.py View on Github external
@celeryApp.task(after_return=__handle_task_result)
def select_project_task(params):
    return with_context(
        params,
        lambda ctx: A2MLProject(ctx, None).select(*params['args'], **params['kwargs'])
    )
github augerai / a2ml / a2ml / tasks_queue / tasks_hub_api.py View on Github external
@celeryApp.task(ignore_result=True, after_return=process_task_result)
def remove_model_task(params):
    return ModelReview(params).remove_model()
github augerai / a2ml / a2ml / tasks_queue / tasks_hub_api.py View on Github external
@celeryApp.task(ignore_result=True, after_return=process_task_result)
def distribution_chart_stats_task(params):
    return ModelReview(params).distribution_chart_stats(
        date_from=params.get('date_from'),
        date_to=params.get('date_to')
    )