Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions tests/test_runs/test_run_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ def _assert_predictions_equal(self, predictions, predictions_prime):
def _rerun_model_and_compare_predictions(self, run_id, model_prime, seed, create_task_obj):
run = openml.runs.get_run(run_id)

# TODO: assert holdout task
task = openml.tasks.get_task(run.task_id)
assert task.task_type == "holdout"

# downloads the predictions of the old task
file_id = run.output_files["predictions"]
Expand Down Expand Up @@ -339,14 +340,14 @@ def _remove_random_state(flow):
TestBase.logger.info(f"collected from test_run_functions: {run.run_id}")
assert run_ == run
assert isinstance(run.dataset_id, int)
assert len(run.parameters) > 0

xml = run._to_xml()
assert xml is not None

# This is only a smoke check right now
# TODO add a few asserts here
run._to_xml()
if run.trace is not None:
# This is only a smoke check right now
# TODO add a few asserts here
run.trace.trace_to_arff()
trace_arff = run.trace.trace_to_arff()
assert trace_arff is not None

# check arff output
assert len(run.data_content) == num_instances
Expand Down Expand Up @@ -609,7 +610,7 @@ def determine_grid_size(param_grid):
create_task_obj=False,
)

# todo: check if runtime is present
assert "runtime" in run.attributes
self._check_fold_timing_evaluations(
fold_evaluations=run.fold_evaluations,
num_repeats=1,
Expand Down