Skip to content

Commit 5e447e8

Browse files
arviz group warning suppressed (#214)
1 parent 5f7b185 commit 5e447e8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pymc_experimental/model_builder.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import hashlib
1717
import json
18+
import warnings
1819
from abc import abstractmethod
1920
from pathlib import Path
2021
from typing import Any, Dict, List, Optional, Union
@@ -496,7 +497,13 @@ def fit(
496497
X_df = pd.DataFrame(X, columns=X.columns)
497498
combined_data = pd.concat([X_df, y], axis=1)
498499
assert all(combined_data.columns), "All columns must have non-empty names"
499-
self.idata.add_groups(fit_data=combined_data.to_xarray()) # type: ignore
500+
with warnings.catch_warnings():
501+
warnings.filterwarnings(
502+
"ignore",
503+
category=UserWarning,
504+
message="The group fit_data is not defined in the InferenceData scheme",
505+
)
506+
self.idata.add_groups(fit_data=combined_data.to_xarray()) # type: ignore
500507

501508
return self.idata # type: ignore
502509

0 commit comments

Comments
 (0)