Retraining mit Airflow orchestrieren
Erstellen Sie einen DAG, der ein Modell erneut trainiert und validiert.
Retraining mit Airflow orchestrieren ist eine kostenlose MLOps Academy-Lektion auf CoddyKit. Dies ist Lektion 2 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des MLOps Academy-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der MLOps Academy-Kurs umfasst insgesamt 4 Lektionen.
Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.
Why an Orchestrator
Retraining has many steps that must run in order and recover from failures. An orchestrator like Airflow runs them reliably so you do not babysit scripts.
Airflow in One Line
Apache Airflow schedules and runs workflows defined as code in Python. You describe what to do, and Airflow handles when and in what order.
The DAG
An Airflow workflow is a DAG, a directed acyclic graph of tasks. Acyclic means it never loops back, so the run always has a clear end.
Tasks Are the Nodes
Each step, like ingest, train, or validate, is a task in the DAG. Tasks are the units Airflow runs, retries, and tracks.
Define a DAG in Code
You declare a DAG and its schedule right in Python. Here the @dag decorator sets a daily retraining cadence.
from airflow.decorators import dag
@dag(schedule="@daily", catchup=False)
def retrain_pipeline():
...Wire Up Dependencies
The arrow operator sets order between tasks. This says ingest must finish before train, and train before validate.
ingest() >> train() >> validate()Operators Do the Work
An operator is a template for one kind of task, like running Python or a Bash command. PythonOperator runs your training function.
Retries Built In
Set retries on a task and Airflow re-runs it automatically if it fails. A flaky data fetch no longer breaks the whole pipeline.
train_task = PythonOperator(
task_id="train",
retries=3,
)Watch It in the UI
Airflow ships a web UI showing each run as a colored grid. Green means success, red means failure, so you spot a broken task instantly.
Schedule or Trigger
A DAG can run on its schedule or be kicked off on demand. That lets the same pipeline serve both cron and drift-triggered retraining.
Idempotent Tasks
Design each task to be safe to re-run, producing the same result. Idempotent tasks make retries and backfills painless.
Quick Check
What does the >> operator do between two Airflow tasks?
Recap
You met Airflow: workflows are DAGs of tasks wired with >>, given retries, and watched in the UI. It turns retraining scripts into a reliable pipeline. ✅
Häufig gestellte Fragen
Ist die Lektion „Retraining mit Airflow orchestrieren“ kostenlos?
Ja — der vollständige Text von „Retraining mit Airflow orchestrieren“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des MLOps Academy-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der MLOps Academy-Kurs umfasst insgesamt 4 Lektionen.
Was lerne ich in „Retraining mit Airflow orchestrieren“?
Erstellen Sie einen DAG, der ein Modell erneut trainiert und validiert. Du übst MLOps Academy mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.
Brauche ich Erfahrung, um MLOps Academy zu starten?
Keine Vorkenntnisse erforderlich. MLOps Academy auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 2 von 4.
Wie lange dauert die Lektion „Retraining mit Airflow orchestrieren“?
Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.
Kann ich in dieser MLOps Academy-Lektion Code schreiben und ausführen?
Ja. Jede MLOps Academy-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.
Alle Lektionen in diesem Kurs
- Zeitplan- oder triggerbasiertes Retraining
- Retraining mit Airflow orchestrieren
- Nur bei besserem Ergebnis automatisch überführen
- Den Menschen im Prozess behalten