From 2f8e0b0bf8e2ee90964c72fd907ea5de00bb59f6 Mon Sep 17 00:00:00 2001 From: Pieter Gijsbers Date: Thu, 3 May 2018 14:50:05 +0200 Subject: [PATCH 1/6] Added installs. Removed test for different bit-version of Python. --- appveyor.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e89e6fc7d..8435bea52 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,18 +1,13 @@ environment: - global: - CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\scikit-learn-contrib\\run_with_env.cmd" +# global: +# CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\scikit-learn-contrib\\run_with_env.cmd" matrix: - PYTHON: "C:\\Python35-x64" PYTHON_VERSION: "3.5" PYTHON_ARCH: "64" MINICONDA: "C:\\Miniconda35-x64" - - - PYTHON: "C:\\Python35" - PYTHON_VERSION: "3.5" - PYTHON_ARCH: "32" - MINICONDA: "C:\\Miniconda35" matrix: fast_finish: true @@ -36,12 +31,14 @@ install: # XXX: setuptools>23 is currently broken on Win+py3 with numpy # (https://github.com/pypa/setuptools/issues/728) - conda update --all --yes setuptools=23 + - conda install --yes nb_conda nb_conda_kernels # Install the build and runtime dependencies of the project. - "cd C:\\projects\\openml-python" - - conda install --quiet --yes mock numpy scipy nose requests scikit-learn nbformat python-dateutil nbconvert + - conda install --quiet --yes scikit-learn=0.18.2 + - conda install --quiet --yes mock numpy scipy nose requests nbformat python-dateutil nbconvert pandas matplotlib seaborn - pip install liac-arff xmltodict oslo.concurrency - - "%CMD_IN_ENV% python setup.py install" + - "python setup.py install" #%CMD_IN_ENV% # Not a .NET project, we build scikit-learn in the install step instead From 1d581a1f81d7307aa825766eb438ecbf2d513efb Mon Sep 17 00:00:00 2001 From: Pieter Gijsbers Date: Thu, 3 May 2018 14:54:07 +0200 Subject: [PATCH 2/6] For Appveyor, the APIKey should also be saved to run notebook tests. --- openml/testing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openml/testing.py b/openml/testing.py index 0b75da06f..b4aee20b5 100644 --- a/openml/testing.py +++ b/openml/testing.py @@ -60,7 +60,7 @@ def setUp(self): # If we're on travis, we save the api key in the config file to allow # the notebook tests to read them. - if os.environ.get('TRAVIS'): + if os.environ.get('TRAVIS') or os.environ.get('APPVEYOR'): with lockutils.external_lock('config', lock_path=self.workdir): with open(openml.config.config_file, 'w') as fh: fh.write('apikey = %s' % openml.config.apikey) From 51daf86481ba906752747e2e6e7a02d48a3a6bf7 Mon Sep 17 00:00:00 2001 From: Pieter Gijsbers Date: Thu, 3 May 2018 14:56:37 +0200 Subject: [PATCH 3/6] Allow a-f only for memory address, but both lower and uppercase. --- tests/test_flows/test_sklearn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_flows/test_sklearn.py b/tests/test_flows/test_sklearn.py index 8be8a2bed..640e6129f 100644 --- a/tests/test_flows/test_sklearn.py +++ b/tests/test_flows/test_sklearn.py @@ -604,7 +604,7 @@ def test_error_on_adding_component_multiple_times_to_flow(self): " n_components=None, random_state=None,\n" \ " svd_solver='auto', tol=0.0, whiten=False\)\), " \ "\('fs', SelectKBest\(k=10, score_func=\)\)\),\n" \ + "f_classif at 0x[a-fA-F0-9]+>\)\)\),\n" \ " transformer_weights=None\)\), \('pca2', " \ "PCA\(copy=True, iterated_power='auto'," \ " n_components=None, random_state=None,\n" \ From babeea7c50879e698b165ba98f1fa8966a7620ed Mon Sep 17 00:00:00 2001 From: Pieter Gijsbers Date: Thu, 3 May 2018 15:00:55 +0200 Subject: [PATCH 4/6] Exclude requirement that evaluation takes longer than 0ms for CI_WINDOWS, as these measurements are (probably) less accurate. This should only be a temporary solution, timing should really be accurate regardless of platform. --- tests/test_runs/test_run_functions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_runs/test_run_functions.py b/tests/test_runs/test_run_functions.py index 341900190..2d260b0ee 100644 --- a/tests/test_runs/test_run_functions.py +++ b/tests/test_runs/test_run_functions.py @@ -240,7 +240,11 @@ def _check_sample_evaluations(self, sample_evaluations, num_repeats, num_folds, for sample in range(num_sample_entrees): evaluation = sample_evaluations[measure][rep][fold][sample] self.assertIsInstance(evaluation, float) - self.assertGreater(evaluation, 0) # should take at least one millisecond (?) + if not os.environ.get('CI_WINDOWS'): + # Either Appveyor is much faster than Travis + # and/or measurements are not as accurate. + # Either way, windows seems to get an eval-time of 0 sometimes. + self.assertGreater(evaluation, 0) self.assertLess(evaluation, max_time_allowed) def test_run_regression_on_classif_task(self): From 9289552d15c48af047661129e923544d0d7314e9 Mon Sep 17 00:00:00 2001 From: Pieter Gijsbers Date: Thu, 3 May 2018 15:15:11 +0200 Subject: [PATCH 5/6] Added clone folder. --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 8435bea52..4b111df4b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,3 +1,4 @@ +clone_folder: C:\\projects\\openml-python environment: # global: From 9142e7055d487e688ef7f7f2bbce997f46539e13 Mon Sep 17 00:00:00 2001 From: Pieter Gijsbers Date: Thu, 3 May 2018 15:42:17 +0200 Subject: [PATCH 6/6] OS import --- tests/test_runs/test_run_functions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_runs/test_run_functions.py b/tests/test_runs/test_run_functions.py index 2d260b0ee..5ea908976 100644 --- a/tests/test_runs/test_run_functions.py +++ b/tests/test_runs/test_run_functions.py @@ -1,6 +1,7 @@ import arff import collections import json +import os import random import time import sys