LinuxCommandLibrary

dvc-unfreeze

Unlock tracked files for modifications

TLDR

Unfreeze one or more specified stages

$ dvc unfreeze [stage_name1 stage_name2 ...]
copy

SYNOPSIS

dvc unfreeze [STAGE ...] [-h|--help] [-q|--quiet] [-v|--verbose]

PARAMETERS

STAGE ...
    One or more pipeline stages to unfreeze (from dvc.yaml). Defaults to all stages in current directory and subdirs.

-h, --help
    Show help and exit.

-q, --quiet
    Suppress non-error messages.

-v, --verbose
    Display more log messages.

DESCRIPTION

The dvc unfreeze command is part of the Data Version Control (DVC) tool, designed for versioning data, ML models, and experiments in data science projects.

DVC pipelines are directed acyclic graphs (DAGs) of stages, where each stage represents a step like data processing or model training. Stages can be frozen with dvc freeze to lock them as up-to-date, preventing automatic re-execution during dvc repro. This optimizes workflows by skipping unchanged steps.

dvc unfreeze reverses this, marking specified stages (or all stages if none provided) as needing re-execution. Outputs become invalid in the DVC cache, prompting re-runs on next dvc repro or dvc push. It's essential for iterative development: freeze stable stages, unfreeze for tweaks to code, params, or deps.

Common use: After editing a stage's dvc.yaml, run dvc unfreeze then dvc repro to update. Works recursively on dependencies if needed, but specify targets precisely to avoid full pipeline rebuilds.

CAVEATS

Unfreezing invalidates cache for affected stages and deps; expect re-execution on dvc repro. No effect on frozen remote deps. Use dvc status to verify before/after. In team settings, commit dvc.lock changes post-repro.

EXAMPLES

dvc unfreeze # unfreeze all stages
dvc unfreeze train eval # specific stages
dvc unfreeze --quiet # suppress output

EXIT CODES

0: success
1: stage not found or other errors.

HISTORY

Introduced in DVC v0.74 (2019) with pipeline support. Enhanced in v1.0+ for better DAG handling. Core to DVC's reproducible pipelines, now at v3.x with cloud integrations.

SEE ALSO

dvc freeze(1), dvc repro(1), dvc pipeline(1), dvc status(1)

Copied to clipboard