File tree Expand file tree Collapse file tree
sdk/python/feast/infra/materialization/contrib/spark Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,6 +47,9 @@ class SparkMaterializationEngineConfig(FeastConfigBaseModel):
4747 partitions: int = 0
4848 """Number of partitions to use when writing data to online store. If 0, no repartitioning is done"""
4949
50+ suppress_warnings: bool = True
51+ """Suppress Pyspark deprecation warnings during materialization"""
52+
5053
5154@dataclass
5255class SparkMaterializationJob(MaterializationJob):
@@ -267,6 +270,25 @@ def _map_by_partition(
267270):
268271 feature_view, online_store, repo_config = spark_serialized_artifacts.unserialize()
269272
273+ if (
274+ hasattr(repo_config.batch_engine, "suppress_warnings")
275+ and repo_config.batch_engine.suppress_warnings
276+ ):
277+ import os
278+ import warnings
279+
280+ os.environ["PYTHONWARNINGS"] = "ignore::DeprecationWarning"
281+ warnings.filterwarnings("ignore", category=DeprecationWarning)
282+ warnings.filterwarnings(
283+ "ignore", message=".*is_categorical_dtype is deprecated.*"
284+ )
285+ warnings.filterwarnings(
286+ "ignore", message=".*is_datetime64tz_dtype is deprecated.*"
287+ )
288+ warnings.filterwarnings(
289+ "ignore", message=".*distutils Version classes are deprecated.*"
290+ )
291+
270292 total_batches = 0
271293 total_time = 0.0
272294 min_time = float("inf")
You can’t perform that action at this time.
0 commit comments