-
Notifications
You must be signed in to change notification settings - Fork 24
Description
The error message
ValidationError: 3 validation errors for EvaluateTimeToEvent
horizons.list[float]
Input should be a valid list [type=list_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.6/v/list_type
horizons.list[int]
Input should be a valid list [type=list_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.6/v/list_type
horizons.list[is-instance[Timestamp]]
Input should be a valid list [type=list_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.6/v/list_type
- I have checked that this issue has not already been reported.
the code is as following
from tempor.benchmarks import benchmark_models
from tempor import plugin_loader
from IPython.display import display
PBCDataSource = plugin_loader.get_class("time_to_event.pbc", plugin_type="datasource")
dataset = PBCDataSource(random_state=42).load()
results_readable, results = benchmark_models(
task_type="time_to_event",
tests=[
("model_1", plugin_loader.get("time_to_event.dynamic_deephit", n_iter=100)),
("model_2", plugin_loader.get("time_to_event.ts_coxph", n_iter=100)),
],
data=dataset,
n_splits=3,
)
print("Results in easily-readable format:")
display(results_readable)
print("Full results:\n")
for model, value in results.items():
print(f"{model}:")
display(value)