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.
Parameters
Section titled “Parameters”| Name | Type | Description | Optional |
|---|---|---|---|
dataset | RelationalDataset | TabularDataset | Dataset to score. | No |
val_batch_size | int | Number of rows per inference chunk. Defaults to 256 (see predict()’s test_batch_size for why). | Yes |
val_table | str | File/table path for the validation split. Optional — falls back to the task’s own validation_table when not provided. | Yes |
Returns
Section titled “Returns”A JobMonitor. Once the job completes, retrieve the computed metrics via score_job.get_status()["result"], which contains:
metric_name— the task’s configuredevaluation_metric.metrics— a dict of every metric computed for the task type (e.g. forbinary_classification:roc_auc, plus the other classification metrics valid for that task type), keyed by metric name. Look upmetrics[metric_name]for the value of the configured metric.
Requirements
Section titled “Requirements”Same as predict():
task.label_columnmust be set.task.context_tablemust be set.- The task’s
validation_table(or theval_tableargument) must exist and contain the required label/entity/time columns. - If
ICLConfig.sampling_strategyis"most_recent"or"mixed", the task must have atime_columnset.
Examples
Section titled “Examples”Relational dataset
Section titled “Relational dataset”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_typeFlat / forecasting dataset
Section titled “Flat / forecasting dataset”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)Common Validation Errors
Section titled “Common Validation Errors”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 passval_table=toscore().