Skip to content

ICLEstimator.score()

Submits an ICL scoring job and returns a JobMonitor. Runs the same pipeline as predict() but on the validation split, then computes every metric available for the task type against known labels — not just the one named in task.evaluation_metric. Since there is no training loop to justify tracking a single metric, and the rest are nearly free to compute once predictions exist, score() returns the full set.

NameTypeDescriptionOptional
datasetRelationalDataset | TabularDatasetDataset to score.No
val_batch_sizeintNumber of rows per inference chunk. Defaults to 256 (see predict()’s test_batch_size for why).Yes
val_tablestrFile/table path for the validation split. Optional — falls back to the task’s own validation_table when not provided.Yes

A JobMonitor. Once the job completes, retrieve the computed metrics via score_job.get_status()["result"], which contains:

  • metric_name — the task’s configured evaluation_metric.
  • metrics — a dict of every metric computed for the task type (e.g. for binary_classification: roc_auc, plus the other classification metrics valid for that task type), keyed by metric name. Look up metrics[metric_name] for the value of the configured metric.

Same as predict():

  • task.label_column must be set.
  • task.context_table must be set.
  • The task’s validation_table (or the val_table argument) must exist and contain the required label/entity/time columns.
  • If ICLConfig.sampling_strategy is "most_recent" or "mixed", the task must have a time_column set.
from relationalai_predictive import ICLEstimator, ICLConfig
model = ICLEstimator(connector=connector, config=ICLConfig())
score_job = model.score(relational_dataset)
result = score_job.get_status()["result"]
print(result["metric_name"], result["metrics"][result["metric_name"]])
print(result["metrics"]) # every metric for this task_type
from relationalai_predictive import ICLEstimator, TabularTask, TabularDataset, TaskType
task = TabularTask(
name="sales_forecast",
task_type=TaskType.FORECASTING,
label_column="sales",
context_table="DATABASE.SCHEMA.SALES_CONTEXT",
validation_table="DATABASE.SCHEMA.SALES_VALIDATION",
time_column="date",
prediction_length=12,
max_context_length=64,
)
dataset = TabularDataset(connector=connector, name="sales", task=task)
model = ICLEstimator(connector=connector)
score_job = model.score(dataset)

See predict()score() shares the same label_column/context_table/sampling_strategy validation, but checks the validation split’s columns instead of the test split’s.

  • “Task ’…’ has no ‘validation’ split” / “TabularTask ’…’ has no ‘validation’ split” — set validation_table= on the task, or pass val_table= to score().