Skip to main content
When you upload a model, tracebloc reads the imports in your model file before it accepts the upload. Your model trains inside a training image in the secure environment that holds the use case’s data, and each training image installs only the packages its tasks need. A model that imports a package its image does not have would fail there, after it was already scheduled to train. The upload check catches this up front and refuses the model instead.

How the check decides

Tasks are grouped into three task families, and each family has its own training images. The task your model file declares in its category variable (see Mandatory variables) decides the family. The family decides which packages the model file may import.
  • Only the top-level package counts. import torch.nn as nn and from torch.utils.data import DataLoader are both torch.
  • Your own files are always allowed. In a zipped, multi-file upload, your files may import each other. The rule applies to every other import.

Packages per task family

Every task may also import collections and math. Across all tasks, these are the only packages a model file may import at all: catboost, collections, interpret, lifelines, lightgbm, math, peft, pycox, pytorch_forecasting, sklearn, sksurv, timm, torch, torchvision, transformers, xgboost.

When an upload imports something else

  • A package no task may import (for example tensorflow, requests or os) is refused whatever the task.
  • A package another family allows but yours does not is refused. The message names the task family, the imports its training image does not provide, and every package a model for that task may import. For example, an object detection model that imports scikit-learn is refused with a message that begins:
    To fix it, remove the import, or rewrite that part of the model with a package from your task’s list.
  • A category the check does not recognise is not held to any family. The upload is recorded, not refused by this check, but it may still import only the packages allowed across all tasks.
  • If the check itself cannot run, the upload is refused with “The model’s imports could not be checked against its task family. Please retry the upload; if this persists, contact support.” Nothing is wrong with your model; retry the upload.
The task tabular_classification was once called generic_classification. A model file that still declares category = "generic_classification" is checked as tabular_classification.