WeltPython SDK
Products: switch from Welt to another product
Open console

GuidesSelecting and swapping foundation models

Selecting and swapping foundation models

Check that each model is ready for your task, then compare several models on the same held-out rows. Each model you try needs its own fit.

You'll need

Check readiness, then compare#

You select an exact model family and task through the service catalogue. Readiness is per task: a listed family can have a classifier ready while its regressor is unavailable. Before fitting, check the requested task's task_profiles entry for status, execution_available, version, configuration and limits.

The example below has two parts. The first stops if any requested classifier is not available. The second fits each model on the same training rows and scores it on the same test rows.

This comparison is optional and uses hosted resources

Four fits and predictions use hosted resources. Each fit retains a new predictor.

python
from welt import Client, Classifier

with Client() as client:  # WELT_BASE_URL and WELT_API_KEY configured locally
    entries = {entry["id"]: entry for entry in client.models()}
    for model_id in ("tabicl-v2", "kumo-medium", "tabdpt-1.3", "mitra-v2"):
        profile = next((p for p in entries[model_id]["task_profiles"]
                        if p["task"] == "classification"), None)
        if not profile or profile["status"] != "available" or not profile["execution_available"]:
            raise RuntimeError(f"Requested classifier unavailable: {model_id}")

# Continue with Start's Iris train/test split. Each fit retains a new predictor.
from sklearn.metrics import accuracy_score
for model_id in ("tabicl-v2", "kumo-medium", "tabdpt-1.3", "mitra-v2"):
    model = Classifier(model=model_id, random_state=9)
    model.fit(train, target=target)
    predictions = model.predict(query)
    print(model_id, "test accuracy:", accuracy_score(y_test, predictions))

Readiness can change

Worker availability can change after you inspect it. Typed service errors at submission time remain authoritative.

For a numeric outcome, use Regressor with the same pattern, and inspect the regression profiles first.

What stays fixed when you swap models#

Compare models fairly#

These are small teaching holdout comparisons, not publisher benchmark results. When you compare models for real:

Compare models runs this for you: client.evaluate() cross-validates several models on the same folds and reports a leaderboard against a baseline.

Scores are not calibrated confidence

Native classifier probabilities and regression mean points do not promise calibrated confidence.

Automatic search, enrichment, conformal coverage and larger workloads remain separate capabilities.

How does Mitra-v2 predict?

Mitra-v2 uses an explicit zero-shot recipe without prediction-time fine-tuning. Its native regression histogram mean is a point in the original target units. It does not provide a calibrated interval or publisher benchmark guarantee.

Next steps#

Documentation

Search SDK 0.13.1

Search this SDK version by task, method or error.