0Pricing
MLOps Academy · Lekcja

Rejestrowanie pierwszej wersji modelu

Prześlij wytrenowany model do rejestru modeli MLflow

Rejestrowanie pierwszej wersji modelu to bezpłatna lekcja MLOps Academy na CoddyKit. To lekcja 1 z 4. Możesz przeczytać całą lekcję poniżej za darmo — a potem ćwiczyć ją interaktywnie w przeglądarce z wbudowanym edytorem kodu i tutorem AI dostępnym 24/7. To część ścieżki edukacyjnej MLOps Academy, a Twój postęp synchronizuje się między webem a aplikacją CoddyKit. Kurs MLOps Academy zawiera 4 lekcji w sumie.

Części tej lekcji nie zostały jeszcze przetłumaczone i są wyświetlane po angielsku.

What a Registry Is

A model registry is a central catalog for your trained models. Instead of files scattered on laptops, every model lives in one place with a version number. 📚

Runs vs Registered Models

An MLflow run records one training attempt. A registered model is a named entry that points at the best run you choose to promote and keep.

Log Before You Register

You always log a model first inside a run. Logging saves the artifact so the registry has something concrete to point back at later.

import mlflow
with mlflow.start_run():
    mlflow.sklearn.log_model(model, "model")

Register in One Call

The fastest path is the registered_model_name argument. Pass it to log_model and MLflow creates the registry entry and a first version for you.

mlflow.sklearn.log_model(
    model, "model",
    registered_model_name="churn-classifier")

Versions Start at 1

Your first registration becomes version 1. Every later registration under the same name bumps the version automatically, so history is never overwritten.

Register From a Past Run

Already logged a model? You can register it after the fact by pointing at its run URI with mlflow.register_model.

mlflow.register_model(
    "runs:/<run_id>/model",
    "churn-classifier")

The runs URI

That runs:/ URI is how MLflow finds the artifact. It combines the run id and the artifact path you used when you logged the model.

The Tracking URI

Set the tracking URI so your code talks to the right server. Without it, MLflow registers everything to a local mlruns folder instead.

mlflow.set_tracking_uri(
    "http://localhost:5000")

See It in the UI

Open the MLflow UI and click the Models tab. Your new model name appears there with version 1 listed under it, ready to inspect.

Names Are Identifiers

Pick a clear, stable name like fraud-detector. Teammates and code load models by that name, so renaming later breaks everything pointing at it.

Confirm With the Client

The MlflowClient lets you verify registration in code. Fetch the model by name and read back the versions that exist.

from mlflow import MlflowClient
c = MlflowClient()
print(c.get_registered_model("churn-classifier"))

Quick Check

Let us check how a first registration is numbered.

Recap

You logged a model, gave it a registry name, and got version 1. Now your best model has a home that anyone on the team can find. 🎉

Często zadawane pytania

Czy lekcja „Rejestrowanie pierwszej wersji modelu” jest bezpłatna?

Tak — pełny tekst „Rejestrowanie pierwszej wersji modelu” jest dostępny za darmo tutaj w sieci. Aby ćwiczyć ją interaktywnie (wbudowany edytor kodu i tutor AI dostępny 24/7) i odblokować resztę kursu MLOps Academy, przejdź na CoddyKit PRO. Kurs MLOps Academy zawiera 4 lekcji w sumie.

Co nauczysz się w „Rejestrowanie pierwszej wersji modelu”?

Prześlij wytrenowany model do rejestru modeli MLflow Ćwiczysz MLOps Academy z praktycznym kodem, który uruchamiasz bezpośrednio w przeglądarce, a tutor AI dostępny 24/7 odpowiada na Twoje pytania podczas pracy nad lekcją.

Czy potrzebuję doświadczenia, aby zacząć MLOps Academy?

Nie wymagamy żadnego doświadczenia. MLOps Academy w CoddyKit jest strukturyzowany dla początkujących i zaawansowanych użytkowników, więc możesz zacząć tutaj lub od początku i uczyć się w swoim tempie. To lekcja 1 z 4.

Ile czasu zajmuje lekcja „Rejestrowanie pierwszej wersji modelu”?

Większość lekcji CoddyKit trwa około 5–10 minut. Każda lekcja to mały, interaktywny krok, dzięki czemu robisz systematyczne postępy i zawsze wracasz dokładnie do tego samego miejsca — na webie i w aplikacji.

Czy mogę pisać i uruchamiać kod w tej lekcji MLOps Academy?

Tak. Każda lekcja MLOps Academy zawiera wbudowany edytor kodu, więc piszesz i uruchamiasz prawdziwy kod bezpośrednio w przeglądarce i od razu otrzymujesz sprzężenie zwrotne od AI — bez konfiguracji na komputerze.

Wszystkie lekcje w tym kursie

  1. Rejestrowanie pierwszej wersji modelu
  2. Etapy: Staging, Production, Archived
  3. Dodawanie tagów i opisów do modeli
  4. Wczytywanie modelu po nazwie i etapie
← Powrót do MLOps Academy