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
Prev Previous commit
type fixes and removing unused code
  • Loading branch information
mfeurer committed Jan 29, 2021
commit 318f72ae39f7160bef97467639c27f2f56358bd6
4 changes: 2 additions & 2 deletions openml/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def get_server_base_url() -> str:
avoid_duplicate_runs = True if _defaults["avoid_duplicate_runs"] == "True" else False

# Number of retries if the connection breaks
connection_n_retries = _defaults["connection_n_retries"]
max_retries = _defaults["max_retries"]
connection_n_retries = int(_defaults["connection_n_retries"])
max_retries = int(_defaults["max_retries"])


class ConfigurationForExamples:
Expand Down
14 changes: 0 additions & 14 deletions openml/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@
import time
from typing import Dict, Union, cast
import unittest
import warnings
import pandas as pd

# Currently, importing oslo raises a lot of warning that it will stop working
# under python3.8; remove this once they disappear
with warnings.catch_warnings():
warnings.simplefilter("ignore")
from oslo_concurrency import lockutils

import openml
from openml.tasks import TaskType
from openml.exceptions import OpenMLServerException
Expand Down Expand Up @@ -100,13 +93,6 @@ def setUp(self, n_levels: int = 1):
openml.config.avoid_duplicate_runs = False
openml.config.cache_directory = self.workdir

# 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") 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)

# Increase the number of retries to avoid spurious server failures
self.connection_n_retries = openml.config.connection_n_retries
openml.config.connection_n_retries = 10
Expand Down