Skip to content

Commit

Permalink
Added rainbow
Browse files Browse the repository at this point in the history
  • Loading branch information
Graphite4 authored and swojciechowski committed Aug 16, 2022
1 parent bd7a585 commit c7365c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion weles/evaluation/Evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

VERBOSE_COLUMNS = 80

COLOURS = ["#FF0000", "#FF7F00", "#FFFF00", "#00FF00", "#0000FF", "#4B0082", "#641975"]




class Evaluator():
def __init__(self, datasets, protocol=(1, 5, None), store=None, parallel_jobs=1):
Expand Down Expand Up @@ -47,7 +51,7 @@ def __init__(self, datasets, protocol=(1, 5, None), store=None, parallel_jobs=1)
def process_one_dataset(self, dataset_name, dataset_id, verbose=False):
X, y = self.datasets[dataset_name]
skf = RepeatedStratifiedKFold(n_splits=self.k, n_repeats=self.m, random_state=self.random_state)
bar = tqdm(skf.split(X, y), disable=not verbose, leave=True, position=dataset_id, colour="CYAN")
bar = tqdm(skf.split(X, y), disable=not verbose, leave=True, position=dataset_id, colour=COLOURS[dataset_id % len(COLOURS)])
bar.set_description(dataset_name.ljust(20))
for fold_id, (train, test) in enumerate(bar):
str_gt = self._storage_key_gt(X, y, fold_id)
Expand Down

0 comments on commit c7365c7

Please sign in to comment.