dvc-freeze
Record current DVC project dependencies and versions
TLDR
Freeze one or more specified stages
SYNOPSIS
dvc freeze [-h] [-q | -v] [--allow-missing] [
PARAMETERS
-h, --help
Show this help message and exit.
-q, --quiet
Suppress printing of non-critical information.
-v, --verbose
Increase verbosity. Print debug messages.
--allow-missing
Allow missing dependencies. Will only freeze existing ones.
[
Operate only on DVC-files/directories that match the specified targets.
By default, works on all DVC-files in the repo.
DESCRIPTION
The `dvc freeze` command is used to generate a lock file (`dvc.lock`) that records the exact versions of DVC's dependencies for a specific DVC project. This helps ensure reproducibility by pinning the versions of external tools and libraries used by the DVC pipeline. By default, `dvc freeze` freezes all dependencies. This lock file is then used when running `dvc repro` or other DVC commands to ensure that the same dependency versions are used, regardless of the environment where the commands are executed.
The created `dvc.lock` file contains detailed information about the dependencies, including their names, versions, and locations. This allows DVC to accurately recreate the environment needed to run the pipeline and ensure that the results are consistent across different machines and over time. It's important to commit the `dvc.lock` file to your repository to track changes in dependencies and ensure consistent behavior throughout the project's lifecycle. Use `dvc unfreeze` to revert to automatically resolving all dependencies.
CAVEATS
The command will fail if some of the specified targets don't exist or cannot be found.
Requires an existing DVC project. Ensure that you have initialized DVC using `dvc init` before using `dvc freeze`.
USAGE EXAMPLES
Freezing all Dependencies:
`dvc freeze`
This command will scan all DVC files in the project and create a `dvc.lock` file containing the versions of all dependencies.
Freezing Dependencies for a Specific Target:
`dvc freeze data.dvc`
This command will only freeze the dependencies defined in the `data.dvc` file. This is useful when you want to isolate changes to specific parts of your pipeline.
SEE ALSO
dvc unfreeze(1), dvc lock(1), dvc repro(1)