Skip to content

Commit

Permalink
classification_dataset bool
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokimii authored and wgifford committed Aug 7, 2024
1 parent 4d32960 commit d6310e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tsfm_public/toolkit/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ class values.
has_class_labels_tag = True
class_label_list = [token.strip() for token in tokens[2:]]
metadata_started = True
classification_dataset = True
elif line.startswith("@targetlabel"):
if data_started:
raise IOError("metadata must come before data")
Expand All @@ -647,7 +648,6 @@ class values.
)
has_class_labels_tag = True
metadata_started = True
regression = True
# Check if this line contains the start of data
elif line.startswith("@data"):
if line != "@data":
Expand Down Expand Up @@ -705,7 +705,7 @@ class values.
# Check if we have reached a class label
if line[char_num] != "(" and class_labels:
class_val = line[char_num:].strip()
if not regression:
if classification_dataset:
if class_val not in class_label_list:
raise IOError(
"the class value '"
Expand Down

0 comments on commit d6310e0

Please sign in to comment.