Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
bd33fc1
adding .vscode to .gitignore
Mirkazemi Mar 3, 2021
4145ff9
Adding delete_dataset() to datasets/functions.py
Mirkazemi Mar 3, 2021
4320c89
Adding delete_dataset() to datasets/__init__.py
Mirkazemi Mar 3, 2021
06e4a03
Adding delete_flow() to flows/functions.py
Mirkazemi Mar 3, 2021
5ad6af6
Adding delete_flow to flows/__init__.py
Mirkazemi Mar 3, 2021
83b1bf1
Adding delete_task() to task/functions.py
Mirkazemi Mar 3, 2021
9567927
Adding delete_task() to tasks/__init__.py
Mirkazemi Mar 3, 2021
f8c0f7d
Adding delete_run() to runs/functions.py
Mirkazemi Mar 3, 2021
9308a5e
Adding delete_run() to runs/__init__.py
Mirkazemi Mar 3, 2021
a3b1688
Adding 'test_delete_run()' to the unit test
Mirkazemi Apr 1, 2021
33f0f37
adding test_delete_flow to the unit tests
Mirkazemi Apr 1, 2021
c2cfeaa
Correction of test_delete_flow unit test
Mirkazemi Apr 1, 2021
e9ade63
Add test_delete_dataset() unit test for deleting database
Mirkazemi Apr 20, 2021
993b12a
pre-commit changes
Mirkazemi Apr 20, 2021
2030127
adding delete functions for run, task, flow and database to the api.rst
Mirkazemi Apr 20, 2021
bb922a5
Adding delete_task() to task/functions.py
Mirkazemi Mar 3, 2021
0c18ab9
pre-commit changes
Mirkazemi Apr 20, 2021
ebcd522
[no ci] Update docstring to specify when the entity can be deleted
PGijsbers Feb 23, 2023
7d0ce66
Add responses from OpenML Server for task delete
PGijsbers Feb 24, 2023
1210f11
Add OpenMLUnauthorizedError for fail on authenticated request
PGijsbers Feb 24, 2023
09db140
Improve error messaging for expected errors
PGijsbers Feb 24, 2023
5e061d3
Add tests for task delete
PGijsbers Feb 24, 2023
bba3cdf
Improve documentation and test for forwarding server errors
PGijsbers Mar 3, 2023
926f146
Document unwrapped error codes and add explicit 455 error
PGijsbers Mar 3, 2023
f4fc886
Add test for attempting to delete a task that doesnt exist
PGijsbers Mar 3, 2023
ebc5630
Move cached server responses to dedicated directory
PGijsbers Mar 3, 2023
7efb78c
Move exception wrapping down one level
PGijsbers Mar 3, 2023
7ab3d26
Centralize error wrapping for delete calls
PGijsbers Mar 6, 2023
610b0a3
Switch to Pytest style for new tests
PGijsbers Mar 6, 2023
96869c4
Add dataset delete tests
PGijsbers Mar 6, 2023
0d387b3
Add flow delete tests
PGijsbers Mar 6, 2023
230035b
Extract response creation
PGijsbers Mar 6, 2023
cff3c46
HTTP status code should always be 412, openml code is in xml
PGijsbers Mar 14, 2023
382d1eb
HTTP status code should always be 412, openml code is in xml
PGijsbers Mar 14, 2023
b007127
Rename mock_get to mock_delete
PGijsbers Mar 17, 2023
fef5cbe
Add test server api key as fixture
PGijsbers Mar 17, 2023
8a33619
Merge branch 'issue_1028' of https://github.com/Mirkazemi/openml-pyth…
PGijsbers Mar 17, 2023
d387216
Add run delete tests
PGijsbers Mar 17, 2023
7dc3cdf
Merge branch 'develop' into issue_1028
PGijsbers Mar 20, 2023
54cfcda
Remove one of duplicate pytest import statement
PGijsbers Mar 20, 2023
d725c1a
[no ci] Deleting tasks, runs, datasets, and flows
PGijsbers Mar 21, 2023
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
Prev Previous commit
Next Next commit
Adding 'test_delete_run()' to the unit test
  • Loading branch information
Mirkazemi authored and PGijsbers committed Feb 23, 2023
commit a3b1688bdcc7fc67281526660bad66b5e86efb41
27 changes: 26 additions & 1 deletion tests/test_runs/test_run_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import openml.extensions.sklearn
from openml.testing import TestBase, SimpleImputer, CustomImputer
from openml.extensions.sklearn import cat, cont
from openml.runs.functions import _run_task_get_arffcontent, run_exists, format_prediction
from openml.runs.functions import _run_task_get_arffcontent, run_exists, format_prediction, delete_run
from openml.runs.trace import OpenMLRunTrace
from openml.tasks import TaskType
from openml.testing import check_task_existence
Expand Down Expand Up @@ -1741,3 +1741,28 @@ def test_joblib_backends(self, parallel_mock):
self.assertEqual(len(res[2]["predictive_accuracy"][0]), 10)
self.assertEqual(len(res[3]["predictive_accuracy"][0]), 10)
self.assertEqual(parallel_mock.call_count, call_count)

@unittest.skipIf(
LooseVersion(sklearn.__version__) < "0.20",
reason="SimpleImputer doesn't handle mixed type DataFrame as input",
)
def test_delete_run(self):
rs = 1
clf = sklearn.pipeline.Pipeline(
steps=[
('imputer', SimpleImputer()),
('estimator', DecisionTreeClassifier()),
]
)
task = openml.tasks.get_task(32) # diabetes; crossvalidation

run = openml.runs.run_model_on_task(
model=clf, task=task, seed=rs
)
run.publish()
TestBase._mark_entity_for_removal("run", run.run_id)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we want to mark the entities in other tests for removal as well - even though the tests should remove them. In case we introduce some error in the delete functions the entities will still be cleaned from the test server.

TestBase.logger.info("collected from test_run_functions: {}".format(run.run_id))


_run_id = run.run_id
self.assertTrue(delete_run(_run_id))