From 54cc43547536581e0c4029c7b8acd89f8089069f Mon Sep 17 00:00:00 2001 From: Vishal Parmar Date: Tue, 18 Apr 2023 19:33:02 +0530 Subject: [PATCH 1/3] Update runs/functions.py Added warning to run_model_on_task to avoid duplicates if no authentication --- openml/runs/functions.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openml/runs/functions.py b/openml/runs/functions.py index d52b43add..2ca92f977 100644 --- a/openml/runs/functions.py +++ b/openml/runs/functions.py @@ -98,7 +98,14 @@ def run_model_on_task( flow : OpenMLFlow (optional, only if `return_flow` is True). Flow generated from the model. """ - + if avoid_duplicate_runs and not config.apikey: + warnings.warn( + "avoid_duplicate_runs is set to True, but no API key is set. " + "Please set your API key in the OpenML configuration file " + "or pass it directly to the function.", + DeprecationWarning + ) + # TODO: At some point in the future do not allow for arguments in old order (6-2018). # Flexibility currently still allowed due to code-snippet in OpenML100 paper (3-2019). # When removing this please also remove the method `is_estimator` from the extension From f7c583b50ff50569cf48b7d9ad84c627c9670c16 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 14:07:55 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- openml/runs/functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openml/runs/functions.py b/openml/runs/functions.py index 2ca92f977..05c894b58 100644 --- a/openml/runs/functions.py +++ b/openml/runs/functions.py @@ -103,9 +103,9 @@ def run_model_on_task( "avoid_duplicate_runs is set to True, but no API key is set. " "Please set your API key in the OpenML configuration file " "or pass it directly to the function.", - DeprecationWarning + DeprecationWarning, ) - + # TODO: At some point in the future do not allow for arguments in old order (6-2018). # Flexibility currently still allowed due to code-snippet in OpenML100 paper (3-2019). # When removing this please also remove the method `is_estimator` from the extension From 995f896cf69456f6b00b93d3c6521cc3f3c6f54e Mon Sep 17 00:00:00 2001 From: Vishal Parmar Date: Tue, 25 Apr 2023 17:17:47 +0530 Subject: [PATCH 3/3] Update functions.py --- openml/runs/functions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openml/runs/functions.py b/openml/runs/functions.py index 05c894b58..61704192e 100644 --- a/openml/runs/functions.py +++ b/openml/runs/functions.py @@ -101,9 +101,9 @@ def run_model_on_task( if avoid_duplicate_runs and not config.apikey: warnings.warn( "avoid_duplicate_runs is set to True, but no API key is set. " - "Please set your API key in the OpenML configuration file " - "or pass it directly to the function.", - DeprecationWarning, + "Please set your API key in the OpenML configuration file, see" + "https://openml.github.io/openml-python/main/examples/20_basic/introduction_tutorial.html#authentication" + "for more information on authentication.", ) # TODO: At some point in the future do not allow for arguments in old order (6-2018).