0Pricing
MLOps Academy · Lezione

Memorizzare nella cache e saltare i passaggi invariati

Ripeta solo ciò che è effettivamente cambiato, per lavorare più rapidamente.

Memorizzare nella cache e saltare i passaggi invariati è una lezione MLOps Academy gratuita su CoddyKit. Questa è la lezione 3 di 4. Puoi leggere la lezione completa qui gratuitamente — poi esercitati direttamente nel browser con un editor di codice integrato e un tutor IA disponibile 24/7. Fa parte del percorso di apprendimento MLOps Academy, e i tuoi progressi si sincronizzano tra il web e l'app CoddyKit. Il corso MLOps Academy include 4 lezioni in totale.

Parti di questa lezione non sono ancora state tradotte e vengono mostrate in inglese.

Why Re-Run Everything?

If you only tweak the eval script, re-running ingest and train wastes time. DVC caches stage results so unchanged work is skipped. ⏱️

DVC Hashes Your Inputs

For each stage, DVC computes a hash of its dependencies and command. The hash is a fingerprint that changes the moment any input changes.

Same Hash Means Skip

When you run dvc repro, DVC compares each stage's current hash to the one in dvc.lock. If they match, it skips the stage.

See the Skip in the Output

DVC tells you plainly when nothing changed. A message like didn't change, skipping means the cached output was reused.

$ dvc repro
Stage 'prep' didn't change, skipping
Running stage 'train'...

Changes Cascade Downstream

Change a prep input and DVC re-runs prep, then every downstream stage that depends on it. Upstream stages stay cached.

Outputs Are Stored in the Cache

Stage outputs are saved in DVC's cache directory, keyed by hash. Skipping a stage means DVC just restores that cached file.

Force a Full Re-Run

Need to ignore the cache? Pass --force to dvc repro and every stage runs again, even if nothing changed.

dvc repro --force

Re-Run a Single Stage

You can target one stage by name with dvc repro -s. Handy when you want to rerun just train without touching the rest.

dvc repro -s train

Check Status Before Running

Run dvc status to see which stages are out of date without executing anything. It is a safe dry run of what repro would do.

dvc status

The Speed Payoff

On big datasets, caching turns a thirty-minute pipeline into seconds when only one stage changed. That fast feedback loop is the whole point. ⚡

Commit dvc.lock to Share Cache State

Because dvc.lock holds the hashes, committing it lets teammates reuse the same cache decisions and skip work you already did.

Quick Check

Think about what triggers a re-run.

Recap: Cache and Skip

You saw how DVC hashes inputs to skip unchanged stages, cascade changes downstream, and force reruns when needed. Fast, smart pipelines. 🎯

Domande Frequenti

La lezione «Memorizzare nella cache e saltare i passaggi invariati» è gratuita?

Sì — il testo completo di «Memorizzare nella cache e saltare i passaggi invariati» è gratuito qui sul web. Per esercitarvi in modo interattivo (un editor di codice integrato e un tutor IA 24/7) e sbloccare il resto del corso MLOps Academy, passa a CoddyKit PRO. Il corso MLOps Academy include 4 lezioni in totale.

Cosa imparerò in «Memorizzare nella cache e saltare i passaggi invariati»?

Ripeta solo ciò che è effettivamente cambiato, per lavorare più rapidamente. Eserciti MLOps Academy con codice pratico che esegui direttamente nel browser, e un tutor IA 24/7 risponde alle tue domande mentre lavori sulla lezione.

Ho bisogno di esperienza per iniziare MLOps Academy?

Non è richiesta alcuna esperienza precedente. MLOps Academy su CoddyKit è strutturato per principianti e studenti avanzati, quindi puoi iniziare da qui o dall'inizio e procedere al tuo ritmo. Questa è la lezione 3 di 4.

Quanto tempo richiede la lezione «Memorizzare nella cache e saltare i passaggi invariati»?

La maggior parte delle lezioni CoddyKit richiede circa 5–10 minuti. Ogni lezione è breve e interattiva, quindi fai progressi costanti e riprendi esattamente da dove hai lasciato su web e app.

Posso scrivere ed eseguire codice in questa lezione MLOps Academy?

Sì. Ogni lezione MLOps Academy include un editor di codice integrato, quindi scrivi ed esegui codice reale direttamente nel tuo browser e ricevi feedback istantaneo dall'IA — nessuna configurazione locale necessaria.

Tutte le lezioni di questo corso

  1. Stadi: Ingest, Prep, Train, Eval
  2. Definire una pipeline con gli stadi DVC
  3. Memorizzare nella cache e saltare i passaggi invariati
  4. Parametrizzare le esecuzioni con params.yaml
← Torna a MLOps Academy