0Pricing
MLOps Academy · Урок

Определение конвейера с этапами DVC

Свяжите этапы зависимостями в dvc.yaml

«Определение конвейера с этапами DVC» — бесплатный урок MLOps Academy на CoddyKit. Это урок 2 из 4. Ты можешь прочитать весь урок бесплатно ниже — а потом практиковать его прямо в браузере с встроенным редактором кода и ИИ-репетитором 24/7. Это часть пути обучения MLOps Academy, и твой прогресс синхронизируется между веб-версией и приложением CoddyKit. Курс MLOps Academy содержит 4 уроков всего.

Части этого урока еще не переведены и отображаются на английском.

Meet dvc.yaml

DVC describes your whole pipeline in one file called dvc.yaml. It lists each stage, the command it runs, and what it depends on. 📄

Add a Stage with dvc stage add

You rarely hand-write the file. The dvc stage add command builds a stage entry for you from flags you pass on the command line.

dvc stage add -n prep \
  -d data/raw.parquet -o data/prepared \
  python prep.py

The -d Flag Means Dependency

The -d flag declares a dependency: a file or script the stage reads. DVC watches these to know when the stage needs to re-run.

The -o Flag Means Output

The -o flag declares an output the stage produces. DVC tracks these files so later stages can depend on them in turn.

Wiring Stages Together

You connect stages by making one stage's output the next stage's dependency. That shared file is the link that forms the pipeline graph.

What a Stage Looks Like in YAML

Each stage in dvc.yaml has a cmd plus its deps and outs. This is the readable record of how your model was built.

stages:
  prep:
    cmd: python prep.py
    deps:
      - data/raw.parquet
    outs:
      - data/prepared

Run the Pipeline with dvc repro

The dvc repro command executes the pipeline in dependency order, running each stage only if its inputs changed.

dvc repro

DVC Builds the DAG for You

From the deps and outs, DVC infers the full DAG automatically. You never specify run order by hand; the graph decides it.

Visualize It with dvc dag

Run dvc dag to print the pipeline as a graph in your terminal. It is a quick way to confirm stages are wired the way you expect.

dvc dag

dvc.lock Records What Ran

After a run, DVC writes dvc.lock with the exact hashes of every input and output. Commit it so teammates reproduce the same result.

The Pipeline Lives in Git

dvc.yaml and dvc.lock are plain text, so they live in Git alongside your code. Your whole pipeline becomes versioned and reviewable.

Quick Check

Test your grasp of DVC stage flags.

Recap: Pipelines in dvc.yaml

You wired stages with deps and outs in dvc.yaml, then ran the graph with dvc repro. DVC tracks order and results for you. 🔗

Часто задаваемые вопросы

Урок «Определение конвейера с этапами DVC» бесплатный?

Да — полный текст урока «Определение конвейера с этапами DVC» бесплатно доступен здесь в веб-версии. Чтобы практиковать его интерактивно (встроенный редактор кода и ИИ-репетитор 24/7) и разблокировать остальной курс MLOps Academy, подпишись на CoddyKit PRO. Курс MLOps Academy содержит 4 уроков всего.

Чему я научусь в уроке «Определение конвейера с этапами DVC»?

Свяжите этапы зависимостями в dvc.yaml Ты практикуешь MLOps Academy с помощью реального кода, который запускаешь прямо в браузере, и ИИ-репетитор 24/7 отвечает на твои вопросы во время урока.

Нужен ли мне опыт, чтобы начать MLOps Academy?

Предыдущий опыт не требуется. MLOps Academy на CoddyKit структурирован для всех уровней — от новичков до продвинутых, поэтому ты можешь начать отсюда или с самого начала и учиться в своем темпе. Это урок 2 из 4.

Сколько времени занимает урок «Определение конвейера с этапами DVC»?

Большинство уроков CoddyKit занимают около 5–10 минут. Каждый из них компактный и интерактивный, поэтому ты постоянно делаешь прогресс и продолжаешь с того же места в веб-версии и приложении.

Можно ли писать и запускать код в этом уроке MLOps Academy?

Да. Каждый урок MLOps Academy включает встроенный редактор кода, поэтому ты пишешь и запускаешь реальный код прямо в браузере и получаешь моментальную обратную связь от AI — локальная установка не требуется.

Все уроки этого курса

  1. Этапы: получение, подготовка, обучение, оценка
  2. Определение конвейера с этапами DVC
  3. Кэширование и пропуск неизменившихся этапов
  4. Настройка параметров запусков с помощью params.yaml
← Назад к MLOps Academy