Skip to content

Commit

Permalink
Merge pull request #185 from francois-drielsma/develop
Browse files Browse the repository at this point in the history
Make sure cluster_label_adapted values cannot be invalid
  • Loading branch information
francois-drielsma authored Apr 19, 2024
2 parents 3ddc941 + adf6d8e commit f7d908a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mlreco/models/full_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def full_chain_cnn(self, input):
if self.enable_cnn_clust or self.enable_dbscan:
cnn_result.update({'segment_label_tmp': [semantic_labels] })
if label_clustering is not None:
if 'input_rescaled' in cnn_result:
if len(label_clustering[0]) == len(input[0]):
label_clustering[0][:, VALUE_COL] = input[0][:, VALUE_COL]
cnn_result.update({'cluster_label_adapted': label_clustering })

Expand Down
2 changes: 1 addition & 1 deletion mlreco/utils/unwrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def input_unwrap_rules(schemas):
for name, schema in schemas.items():
parser = schema['parser']
assert parser in INPUT_RULES, f'Unable to unwrap data from {parser}'
rules[name] = deepcopy(RULES[parser])
rules[name] = deepcopy(INPUT_RULES[parser])
if rules[name][0] == 'tensor':
rules[name][1] = name

Expand Down

0 comments on commit f7d908a

Please sign in to comment.