You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We are getting the following error in our pipeline test: FAILED tests/test_event_utils.py::test_multiple_countries - AssertionError: assert 'Erster Weihnachtstag' not in {'Christi Himmelfahrt', 'Christi Himmelfahrt; Erster Mai', 'Christmas Day', 'Columbus Day', 'Erster Mai', 'Erster Weihnachtstag', ...}
This is mainly due to the fact that we are getting the holidays names for the US in English and the ones for Germany in German. As a result, we would have duplicated holidays having names in different languages.
Expected behavior
We would expect at the end to get a unique list of holidays(no matter what the language is). The assertion shouldn't fail.
Additional context
This only happens for the specific case of python 3.12. We tried solving this issue by creating a holiday name as a combination of both its occurrences and make sure to have at the end the holiday appearing only one time in the list.
We should find a cleaner way to do it without adding more complexity to the code.
deftest_multiple_countries():
# test if multiple countries are addeddf=pd.read_csv(PEYTON_FILE, nrows=NROWS)
m=NeuralProphet(
epochs=EPOCHS,
batch_size=BATCH_SIZE,
learning_rate=LR,
)
m.add_country_holidays(country_name=["US", "Germany"])
m.fit(df, freq="D")
m.predict(df)
# get the name of holidays and compare that no holiday is repeatedholiday_names=m.model.config_holidays.holiday_namesassert"Independence Day"inholiday_namesassert"Christmas Day"inholiday_namesassert"Erster Weihnachtstag"notinholiday_namesassert"Neujahr"notinholiday_names
The text was updated successfully, but these errors were encountered:
Prerequisites
Python 3.12
Describe the bug
We are getting the following error in our pipeline test:
FAILED tests/test_event_utils.py::test_multiple_countries - AssertionError: assert 'Erster Weihnachtstag' not in {'Christi Himmelfahrt', 'Christi Himmelfahrt; Erster Mai', 'Christmas Day', 'Columbus Day', 'Erster Mai', 'Erster Weihnachtstag', ...}
This is mainly due to the fact that we are getting the holidays names for the US in English and the ones for Germany in German. As a result, we would have duplicated holidays having names in different languages.
Expected behavior
We would expect at the end to get a unique list of holidays(no matter what the language is). The assertion shouldn't fail.
Additional context
This only happens for the specific case of python 3.12. We tried solving this issue by creating a holiday name as a combination of both its occurrences and make sure to have at the end the holiday appearing only one time in the list.
We should find a cleaner way to do it without adding more complexity to the code.
Add any other context about the problem here.
Pytest to re-add to tests/test_event_utils.py
The text was updated successfully, but these errors were encountered: