Skip to content

Commit a849d1c

Browse files
change: require headers for time series explainability
1 parent 63cd970 commit a849d1c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/sagemaker/clarify.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,12 @@ def __init__(
704704
f" Please check the API documentation for the supported dataset types."
705705
)
706706
# check if any other format other than JSON is provided for time series case
707-
if time_series_data_config and dataset_type != "application/json":
708-
raise ValueError("Currently time series explainability only supports JSON format data")
707+
if time_series_data_config:
708+
if dataset_type != "application/json":
709+
raise ValueError(
710+
"Currently time series explainability only supports JSON format data"
711+
)
712+
assert headers, "Headers are required for time series explainability"
709713
# features JMESPath is required for JSON as we can't derive it ourselves
710714
if dataset_type == "application/json" and features is None and not time_series_data_config:
711715
raise ValueError("features JMESPath is required for application/json dataset_type")

0 commit comments

Comments
 (0)