Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Adding warnings to all examples switching to a test server
  • Loading branch information
Neeratyoy committed Apr 21, 2021
commit 1b172c676b7d2a69a6bbaec904d8d88586a46f60
11 changes: 7 additions & 4 deletions examples/20_basic/introduction_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@
#
# Alternatively, by running the code below and replacing 'YOURKEY' with your API key,
# you authenticate for the duration of the python process.
#
# .. warning:: This example uploads data. For that reason, this example
# connects to the test server instead. This prevents the live server from
# crowding with example datasets, tasks, studies, and so on.


############################################################################

Expand All @@ -65,6 +62,12 @@
import openml
from sklearn import neighbors

############################################################################
# .. warning:: This example uploads data. For that reason, this example
# connects to the test server at test.openml.org. This prevents the main
# server from crowding with example datasets, tasks, runs, and so on. The
# use of this test server can affect behaviour and performance of the
# OpenML-Python API.
openml.config.start_using_configuration_for_example()

############################################################################
Expand Down
4 changes: 3 additions & 1 deletion examples/20_basic/simple_flows_and_runs_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
#
# .. warning:: This example uploads data. For that reason, this example
# connects to the test server at test.openml.org. This prevents the main
# server from crowding with example datasets, tasks, runs, and so on.
# server from crowding with example datasets, tasks, runs, and so on. The
# use of this test server can affect behaviour and performance of the
# OpenML-Python API.
Comment thread
Neeratyoy marked this conversation as resolved.
Outdated

openml.config.start_using_configuration_for_example()

Expand Down
4 changes: 3 additions & 1 deletion examples/30_extended/create_upload_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
############################################################################
# .. warning:: This example uploads data. For that reason, this example
# connects to the test server at test.openml.org. This prevents the main
# server from crowding with example datasets, tasks, runs, and so on.
# server from crowding with example datasets, tasks, runs, and so on. The
# use of this test server can affect behaviour and performance of the
# OpenML-Python API.

openml.config.start_using_configuration_for_example()
############################################################################
Expand Down
12 changes: 7 additions & 5 deletions examples/30_extended/custom_flow_.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,21 @@
and also show how to link runs to the custom flow.
"""

####################################################################################################

# License: BSD 3-Clause
# .. warning:: This example uploads data. For that reason, this example
# connects to the test server at test.openml.org. This prevents the main
# server from crowding with example datasets, tasks, runs, and so on.

from collections import OrderedDict
import numpy as np

import openml
from openml import OpenMLClassificationTask
from openml.runs.functions import format_prediction

####################################################################################################
# .. warning:: This example uploads data. For that reason, this example
# connects to the test server at test.openml.org. This prevents the main
# server from crowding with example datasets, tasks, runs, and so on. The
# use of this test server can affect behaviour and performance of the
# OpenML-Python API.
openml.config.start_using_configuration_for_example()

####################################################################################################
Expand Down
6 changes: 6 additions & 0 deletions examples/30_extended/datasets_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@
# Edit a created dataset
# ======================
# This example uses the test server, to avoid editing a dataset on the main server.
#
# .. warning:: This example uploads data. For that reason, this example
# connects to the test server at test.openml.org. This prevents the main
# server from crowding with example datasets, tasks, runs, and so on. The
# use of this test server can affect behaviour and performance of the
# OpenML-Python API.
openml.config.start_using_configuration_for_example()
############################################################################
# Edit non-critical fields, allowed for all authorized users:
Expand Down
7 changes: 7 additions & 0 deletions examples/30_extended/flow_id_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@
import openml


############################################################################
# Activating test server
#
# .. warning:: This example uploads data. For that reason, this example
# connects to the test server at test.openml.org. This prevents the main
# server from crowding with example datasets, tasks, runs, and so on. The
# use of this test server can affect behaviour and performance of the
# OpenML-Python API.
Comment thread
Neeratyoy marked this conversation as resolved.
Outdated
openml.config.start_using_configuration_for_example()


Expand Down
4 changes: 3 additions & 1 deletion examples/30_extended/flows_and_runs_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#
# .. warning:: This example uploads data. For that reason, this example
# connects to the test server at test.openml.org. This prevents the main
# server from crowding with example datasets, tasks, runs, and so on.
# server from crowding with example datasets, tasks, runs, and so on. The
# use of this test server can affect behaviour and performance of the
# OpenML-Python API.
Comment thread
Neeratyoy marked this conversation as resolved.
Outdated

openml.config.start_using_configuration_for_example()
# NOTE: We are using dataset 68 from the test server: https://test.openml.org/d/68
Expand Down
7 changes: 6 additions & 1 deletion examples/30_extended/run_setup_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@
from sklearn.ensemble import RandomForestClassifier
from sklearn.decomposition import TruncatedSVD


############################################################################
# .. warning:: This example uploads data. For that reason, this example
# connects to the test server at test.openml.org. This prevents the main
# server from crowding with example datasets, tasks, runs, and so on. The
# use of this test server can affect behaviour and performance of the
# OpenML-Python API.
openml.config.start_using_configuration_for_example()

###############################################################################
Expand Down
7 changes: 7 additions & 0 deletions examples/30_extended/study_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@
# Creating a study is as simple as creating any kind of other OpenML entity.
# In this examples we'll create a few runs for the OpenML-100 benchmark
# suite which is available on the OpenML test server.
#
# .. warning:: This example uploads data. For that reason, this example
Comment thread
Neeratyoy marked this conversation as resolved.
Outdated
# connects to the test server at test.openml.org. This prevents the main
# server from crowding with example datasets, tasks, runs, and so on. The
# use of this test server can affect behaviour and performance of the
# OpenML-Python API.

openml.config.start_using_configuration_for_example()

# Model to be used
Expand Down
6 changes: 6 additions & 0 deletions examples/30_extended/suites_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@
# Uploading suites is as simple as uploading any kind of other OpenML
# entity - the only reason why we need so much code in this example is
# because we upload some random data.
#
# .. warning:: This example uploads data. For that reason, this example
# connects to the test server at test.openml.org. This prevents the main
# server from crowding with example datasets, tasks, runs, and so on. The
# use of this test server can affect behaviour and performance of the
# OpenML-Python API.
Comment thread
Neeratyoy marked this conversation as resolved.
Outdated

openml.config.start_using_configuration_for_example()

Expand Down
7 changes: 6 additions & 1 deletion examples/30_extended/tasks_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,12 @@
# If a task with these parameters exists, we will get an appropriate exception.
# If such a task doesn't exist, a task will be created and the corresponding task_id
# will be returned.

#
# .. warning:: This example uploads data. For that reason, this example
# connects to the test server at test.openml.org. This prevents the main
# server from crowding with example datasets, tasks, runs, and so on. The
# use of this test server can affect behaviour and performance of the
# OpenML-Python API.
Comment thread
Neeratyoy marked this conversation as resolved.
Outdated

# using test server for example uploads
openml.config.start_using_configuration_for_example()
Expand Down