@@ -835,9 +835,9 @@ def test_what_if_analysis(operator_setup, model):
835
835
historical_data = pd .read_csv (historical_data_path , parse_dates = ["Date" ])
836
836
historical_filtered = historical_data [historical_data ["Date" ] > "2013-03-01" ]
837
837
additional_data = pd .read_csv (additional_data_path , parse_dates = ["Date" ])
838
- add_filtered = additional_data [additional_data [' Date' ] > "2013-03-01" ]
839
- add_filtered .to_csv (f' { additional_test_path } ' , index = False )
840
- historical_filtered .to_csv (f' { historical_test_path } ' , index = False )
838
+ add_filtered = additional_data [additional_data [" Date" ] > "2013-03-01" ]
839
+ add_filtered .to_csv (f" { additional_test_path } " , index = False )
840
+ historical_filtered .to_csv (f" { historical_test_path } " , index = False )
841
841
842
842
yaml_i , output_data_path = populate_yaml (
843
843
tmpdirname = tmpdirname ,
@@ -893,5 +893,33 @@ def test_auto_select(operator_setup):
893
893
report_path = f"{ output_data_path } /report.html"
894
894
assert os .path .exists (report_path ), f"Report file not found at { report_path } "
895
895
896
+
897
+ @pytest .mark .parametrize ("model" , ["prophet" ])
898
+ def test_report_title (operator_setup , model ):
899
+ from ads .opctl .operator .lowcode .forecast .__main__ import operate
900
+ from ads .opctl .operator .lowcode .forecast .operator_config import (
901
+ ForecastOperatorConfig ,
902
+ )
903
+
904
+ yaml_i = TEMPLATE_YAML .copy ()
905
+ yaml_i ["spec" ]["horizon" ] = 10
906
+ yaml_i ["spec" ]["model" ] = model
907
+ yaml_i ["spec" ]["historical_data" ] = {"format" : "pandas" }
908
+ yaml_i ["spec" ]["target_column" ] = TARGET_COL .name
909
+ yaml_i ["spec" ]["datetime_column" ]["name" ] = HISTORICAL_DATETIME_COL .name
910
+ yaml_i ["spec" ]["report_title" ] = "Skibidi ADS Skibidi"
911
+ yaml_i ["spec" ]["output_directory" ]["url" ] = operator_setup
912
+
913
+ df = pd .concat ([HISTORICAL_DATETIME_COL [:15 ], TARGET_COL [:15 ]], axis = 1 )
914
+ yaml_i ["spec" ]["historical_data" ]["data" ] = df
915
+ operator_config = ForecastOperatorConfig .from_dict (yaml_i )
916
+ results = operate (operator_config )
917
+ with open (os .path .join (operator_setup , "report.html" )) as f :
918
+ for line in f :
919
+ if "Skibidi ADS Skibidi" in line :
920
+ return True
921
+ assert False , "Report Title was not set"
922
+
923
+
896
924
if __name__ == "__main__" :
897
925
pass
0 commit comments