﻿# DVC exp apply: restoring an experiment does not create a clean isolated workspace

Use DVC exp apply with an explicit workspace contract, checking retained extra files, overwritten changes, cached model outputs and the separate Git persistence step.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-dvc-exp-apply-workspace-extra-files/
Language: en

## Inspect the workspace that receives the experiment

An engineer applies a selected DVC experiment and runs a model-validation script. The script picks up an old configuration file that was never part of that experiment. The [exp apply reference](https://doc.dvc.org/command-reference/exp/apply) explains restoration of recorded files while preexisting files absent from the experiment remain. Applying a result is therefore different from creating a clean environment containing only that result. Identify the files the consumer actually reads before describing the validation as isolated replay.

## Preserve local work before an intentional application

The apply operation can overwrite conflicting workspace changes. Prepare an isolated checkout or preserve relevant local work through an explicit process before using it in a review workflow. A reference to an experiment name is a selection, not a guarantee that applying it is harmless to every current file. Review the resulting workspace changes and distinguish the selected experiment's content from unrelated files that remain available to scripts or import resolution.

## Separate tracked references from available data objects

The [checkout reference](https://doc.dvc.org/command-reference/checkout) describes restoring DVC-tracked data from the cache according to current metadata. A recorded model hash does not by itself supply missing cached bytes. Confirm that required outputs can be materialized before evaluating or packaging the selected model. A partial restoration should be visible as incomplete evidence rather than accepted because the parameter file and metrics summary successfully changed to the experiment's recorded values.

## Retrieve remote data through the appropriate boundary

The [pull reference](https://doc.dvc.org/command-reference/pull) distinguishes data transfer from retrieving Git-managed code and metadata. Ensure the intended code revision and the required data objects are both present. A remote data operation does not resolve every source-code dependency or silently select the correct experiment on behalf of a caller. Keep those selection and retrieval actions explicit in a repeatable review procedure, with the actual artifact identities recorded for the consumer.

## Verify application and persistence separately

Inspect the selected parameters, code and model outputs, then execute a meaningful fixture without undeclared workspace inputs. Commit the intended result to Git when the workflow requires a persistent project revision; applying alone does not complete that persistence decision. The guides on [DVC pipeline locks](/journal/data-guide-dvc-data-pipeline-lock/) and [logical feature schemas](/journal/data-guide-frictionless-table-schema/) provide related context. Successful experiment restoration is useful when its workspace coverage and materialized data are understood, rather than mistaken for a universal clean snapshot of the entire execution environment.
