Giter VIP home page Giter VIP logo

odahu-airflow-plugin's Introduction

odahu-airflow-plugins

An apache airflow plugin for the Odahu Platform.

How-To

  1. Start a Odahu Cluster and authenticate using OAuth2. (Hit the cluster's base URL.) Copy the token to line 8 of ./dags/odahu_dag.py
  2. Install, Start and InitDB for Airflow
  3. Install the plugin defined in ./plugin/ to Airflow (or softlink/copy to $AIRFLOW_HOME/plugins)
  4. Copy or import ./dags/odahu_dag.py
  5. Create the Airflow connections:
  • odahu_model
    • id: odahu_model
    • type: http
    • host: edge.cluster-name.ailifecycle.org
    • schema: https
  • odahu_api
    • id: odahu_edi
    • type: http
    • host: odahu.cluster-name.ailifecycle.org
    • schema: https
    • login: ****
    • password: ****
    • extra: {"auth_url": "", "client_id": "", "client_secret": "****", "scope": "openid profile email offline_access groups"}
  1. Invoke

DEV notes

  1. We need a custom Airflow Connection - or maybe this one will work.

odahu-airflow-plugin's People

Contributors

vlad-tokarev avatar mcdoker18 avatar karbyshevds avatar lev-titov avatar owlleg6 avatar dependabot[bot] avatar keshamin avatar

Stargazers

Dmitrii Suslov avatar  avatar Bohdan Pylypenko avatar  avatar Yurii Tykhun avatar dillan teagle avatar

Watchers

Dmitrii Suslov avatar  avatar James Cloos avatar  avatar

odahu-airflow-plugin's Issues

When the user clicks button to delete a DAG, they are redirected to the `404 Not Found` page

Description
When the user clicks the button to delete a DAG, they are redirected to the 404 Not Found page.

Airflow plugin page: https://<-- cluster-url -->/airflow/admin/
Redirectes to: https://<-- cluster-url -->/admin/

Actual behavior
When the user clicks the button to delete a DAG, they are redirected to the 404 Not Found page and the DAG is removed.

Expected behavior
When the user clicks the button to delete a DAG, they stay on the same Airflow plugin page and the DAG is removed.

Attachment
airflow-dag-deletion

ENV
ODAHU version: 1.6.0

Support templating for Operators

Airflow Operators support templating

We should support this feature at least for important spec fields such as data input, image, etc.

So, we need:

  1. Determine a set of spec fields for ModelTraining, ModelPackaging, ModelDeployment, BatchInference that should be templated
  2. Then implement this templating by adding an appropriate feature to our plugin's operators

Use case:

Consider a DAG that runs every day and should train on some set of data that relate to the execution date's day

training_id, training = resource("""
kind: ModelTraining
id: airflow-wine-from-yamls
spec:
  model:
    name: wine
    version: 1.0
  toolchain: mlflow
  entrypoint: main
  workDir: mlflow/sklearn/wine
  hyperParameters:
    alpha: "1.0"
  data:
    - connName: wine
      localPath: mlflow/sklearn/wine/wine-quality-2020-10-10.csv
  resources:
    limits:
      cpu: 4
      memory: 4Gi
    requests:
      cpu: 2
      memory: 2Gi
  vcsName: odahu-flow-examples""")

with dag:
    train = TrainingOperator(
        task_id="training",
        api_connection_id=api_connection_id,
        training=training,
        default_args=default_args
    )

In this example, DAG trains using hardcoded mlflow/sklearn/wine/wine-quality-2020-10-10.csv file but it parameter should depend on DAG execution date such as mlflow/sklearn/wine/wine-quality-{{ execution_date }}.csv

mask odahuflow_api connection sensitive data

As operations engineer I want to move odahuflow_api Airflow connection sensitive data to password field that will mask data in connection edit mode. This will require plugin changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.