Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[flake8]
max-line-length = 100
show-source = True
select = C,E,F,W,B
select = C,E,F,W,B,T
ignore = E203, E402, W503
per-file-ignores =
*__init__.py:F401
Expand Down
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ repos:
- id: flake8
name: flake8 openml
files: openml/*
additional_dependencies:
- flake8-print==3.1.4
- id: flake8
name: flake8 tests
files: tests/*
additional_dependencies:
- flake8-print==3.1.4
2 changes: 1 addition & 1 deletion openml/extensions/sklearn/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ def _prevent_optimize_n_jobs(self, model):
"Could not find attribute "
"param_distributions."
)
print(
logger.warning(
"Warning! Using subclass BaseSearchCV other than "
"{GridSearchCV, RandomizedSearchCV}. "
"Should implement param check. "
Expand Down
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
# exploiting the fact that conftest.py always resides in the root directory for tests
static_dir = os.path.dirname(os.path.abspath(__file__))
logger.info("static directory: {}".format(static_dir))
print("static directory: {}".format(static_dir))
while True:
if "openml" in os.listdir(static_dir):
break
Expand Down
4 changes: 3 additions & 1 deletion tests/test_datasets/test_dataset_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,9 @@ def test_publish_fetch_ignore_attribute(self):
except Exception as e:
# returned code 273: Dataset not processed yet
# returned code 362: No qualities found
print("Failed to fetch dataset:{} with '{}'.".format(dataset.id, str(e)))
TestBase.logger.error(
"Failed to fetch dataset:{} with '{}'.".format(dataset.id, str(e))
)
time.sleep(10)
continue
if downloaded_dataset is None:
Expand Down
6 changes: 4 additions & 2 deletions tests/test_study/test_study_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ def test_Figure1a(self):
clf, task, avoid_duplicate_runs=False
) # run classifier on splits (requires API key)
score = run.get_metric_fn(sklearn.metrics.accuracy_score) # print accuracy score
print("Data set: %s; Accuracy: %0.2f" % (task.get_dataset().name, score.mean()))
TestBase.logger.info(
"Data set: %s; Accuracy: %0.2f" % (task.get_dataset().name, score.mean())
)
run.publish() # publish the experiment on OpenML (optional)
TestBase._mark_entity_for_removal("run", run.run_id)
TestBase.logger.info(
"collected from {}: {}".format(__file__.split("/")[-1], run.run_id)
)
print("URL for run: %s/run/%d" % (openml.config.server, run.run_id))
TestBase.logger.info("URL for run: %s/run/%d" % (openml.config.server, run.run_id))