Skip to content

Commit df5e4db

Browse files
committed
* only consider numeric stats
1 parent d73f89c commit df5e4db

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

trinity/cli/launcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def activate_data_module(data_workflow_url: str, config_path: str):
148148
"""Check whether to activate data module and preprocess datasets."""
149149
from trinity.cli.client import request
150150

151-
logger.info("Activating data module...")
151+
logger.info(f"Activating data module of {data_workflow_url}...")
152152
res = request(
153153
url=data_workflow_url,
154154
configPath=config_path,

trinity/data/controllers/active_iterator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import traceback
3+
from numbers import Number
34
from typing import Any, Dict, List
45

56
import ray
@@ -185,7 +186,8 @@ def _group_scores(self, dataset: RftDataset) -> RftDataset:
185186
all_stats = [
186187
sample[Fields.stats][stats] for sample in dataset.data if Fields.stats in sample
187188
]
188-
stats_min_max[stats] = [min(all_stats), max(all_stats)]
189+
if len(all_stats) > 0 and isinstance(all_stats[0], Number):
190+
stats_min_max[stats] = [min(all_stats), max(all_stats)]
189191

190192
def _group_single(sample):
191193
stats = sample[Fields.stats]

0 commit comments

Comments
 (0)