Skip to content

Commit a25a64c

Browse files
author
Fábio Malcher Miranda
committed
Format files with new black version
1 parent 61249ba commit a25a64c

23 files changed

Lines changed: 23 additions & 11 deletions

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ repos:
66
- id: end-of-file-fixer
77
- id: trailing-whitespace
88
- repo: https://github.com/psf/black
9-
rev: 24.2.0
9+
rev: 26.3.0
1010
hooks:
1111
- id: black
1212
- repo: https://github.com/pycqa/flake8

benchmarks/consumer_complaints/scripts/data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
"""Script to share common functions for data manipulation."""
3+
34
import csv
45
from typing import TextIO
56

benchmarks/consumer_complaints/scripts/metrics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
"""Script to compute metrics."""
3+
34
import argparse
45
import sys
56
from argparse import Namespace

benchmarks/consumer_complaints/scripts/predict.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
"""Script to predict with flat approach."""
3+
34
import argparse
45
import pickle
56
import sys

benchmarks/consumer_complaints/scripts/split_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
"""Script to split train and test data."""
3+
34
import argparse
45
import sys
56
from argparse import Namespace

benchmarks/consumer_complaints/scripts/statistics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
"""Script to store basic statistical information."""
3+
34
import argparse
45
import os
56
import sys

benchmarks/consumer_complaints/scripts/train.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
"""Script to train with flat or hierarchical approaches."""
3+
34
import argparse
45
import pickle
56
import sys

benchmarks/consumer_complaints/scripts/tune.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
"""Script to perform hyper-parameter tuning for flat and hierarchical approaches."""
3+
34
import hashlib
45
import json
56
import logging
@@ -170,7 +171,7 @@ def load_trial(cfg: DictConfig) -> List[float]:
170171
md5 = compute_md5(hyperparameters)
171172
filename = f"{cfg.output_dir}/{md5}.sav"
172173
if os.path.exists(filename):
173-
(_, scores) = pickle.load(open(filename, "rb"))
174+
_, scores = pickle.load(open(filename, "rb"))
174175
log.info(f"Loaded trial with F-scores {scores}")
175176
return scores
176177
else:

benchmarks/consumer_complaints/scripts/tune_table.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
"""Script to create table with tuning results for flat and hierarchical approaches."""
3+
34
import argparse
45
import glob
56
import pickle

docs/examples/plot_binary_policies.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
5252
Mathematical definition on the different policies is given at :ref:`Training Policies`.
5353
"""
54+
5455
from sklearn.ensemble import RandomForestClassifier
5556

5657
from hiclass import LocalClassifierPerNode

0 commit comments

Comments
 (0)