|
40 | 40 | from google.protobuf.timestamp_pb2 import Timestamp |
41 | 41 | from tqdm import tqdm |
42 | 42 |
|
43 | | -from feast import feature_server, ui_server, utils |
| 43 | +from feast import feature_server, flags_helper, ui_server, utils |
44 | 44 | from feast.base_feature_view import BaseFeatureView |
45 | 45 | from feast.batch_feature_view import BatchFeatureView |
46 | 46 | from feast.data_source import DataSource, PushMode |
@@ -533,7 +533,7 @@ def _validate_all_feature_views( |
533 | 533 | sfvs_to_update: List[StreamFeatureView], |
534 | 534 | ): |
535 | 535 | """Validates all feature views.""" |
536 | | - if len(odfvs_to_update) > 0: |
| 536 | + if len(odfvs_to_update) > 0 and not flags_helper.is_test(): |
537 | 537 | warnings.warn( |
538 | 538 | "On demand feature view is an experimental feature. " |
539 | 539 | "This API is stable, but the functionality does not scale well for offline retrieval", |
@@ -1123,12 +1123,13 @@ def create_saved_dataset( |
1123 | 1123 | Raises: |
1124 | 1124 | ValueError if given retrieval job doesn't have metadata |
1125 | 1125 | """ |
1126 | | - warnings.warn( |
1127 | | - "Saving dataset is an experimental feature. " |
1128 | | - "This API is unstable and it could and most probably will be changed in the future. " |
1129 | | - "We do not guarantee that future changes will maintain backward compatibility.", |
1130 | | - RuntimeWarning, |
1131 | | - ) |
| 1126 | + if not flags_helper.is_test(): |
| 1127 | + warnings.warn( |
| 1128 | + "Saving dataset is an experimental feature. " |
| 1129 | + "This API is unstable and it could and most probably will be changed in the future. " |
| 1130 | + "We do not guarantee that future changes will maintain backward compatibility.", |
| 1131 | + RuntimeWarning, |
| 1132 | + ) |
1132 | 1133 |
|
1133 | 1134 | if not from_.metadata: |
1134 | 1135 | raise ValueError( |
@@ -1175,12 +1176,13 @@ def get_saved_dataset(self, name: str) -> SavedDataset: |
1175 | 1176 | Raises: |
1176 | 1177 | SavedDatasetNotFound |
1177 | 1178 | """ |
1178 | | - warnings.warn( |
1179 | | - "Retrieving datasets is an experimental feature. " |
1180 | | - "This API is unstable and it could and most probably will be changed in the future. " |
1181 | | - "We do not guarantee that future changes will maintain backward compatibility.", |
1182 | | - RuntimeWarning, |
1183 | | - ) |
| 1179 | + if not flags_helper.is_test(): |
| 1180 | + warnings.warn( |
| 1181 | + "Retrieving datasets is an experimental feature. " |
| 1182 | + "This API is unstable and it could and most probably will be changed in the future. " |
| 1183 | + "We do not guarantee that future changes will maintain backward compatibility.", |
| 1184 | + RuntimeWarning, |
| 1185 | + ) |
1184 | 1186 |
|
1185 | 1187 | dataset = self._registry.get_saved_dataset(name, self.project) |
1186 | 1188 | provider = self._get_provider() |
@@ -1374,12 +1376,13 @@ def push( |
1374 | 1376 | allow_registry_cache: Whether to allow cached versions of the registry. |
1375 | 1377 | to: Whether to push to online or offline store. Defaults to online store only. |
1376 | 1378 | """ |
1377 | | - warnings.warn( |
1378 | | - "Push source is an experimental feature. " |
1379 | | - "This API is unstable and it could and might change in the future. " |
1380 | | - "We do not guarantee that future changes will maintain backward compatibility.", |
1381 | | - RuntimeWarning, |
1382 | | - ) |
| 1379 | + if not flags_helper.is_test(): |
| 1380 | + warnings.warn( |
| 1381 | + "Push source is an experimental feature. " |
| 1382 | + "This API is unstable and it could and might change in the future. " |
| 1383 | + "We do not guarantee that future changes will maintain backward compatibility.", |
| 1384 | + RuntimeWarning, |
| 1385 | + ) |
1383 | 1386 | from feast.data_source import PushSource |
1384 | 1387 |
|
1385 | 1388 | all_fvs = self.list_feature_views(allow_cache=allow_registry_cache) |
@@ -2268,11 +2271,12 @@ def serve_ui( |
2268 | 2271 | self, host: str, port: int, get_registry_dump: Callable, registry_ttl_sec: int |
2269 | 2272 | ) -> None: |
2270 | 2273 | """Start the UI server locally""" |
2271 | | - warnings.warn( |
2272 | | - "The Feast UI is an experimental feature. " |
2273 | | - "We do not guarantee that future changes will maintain backward compatibility.", |
2274 | | - RuntimeWarning, |
2275 | | - ) |
| 2274 | + if flags_helper.is_test(): |
| 2275 | + warnings.warn( |
| 2276 | + "The Feast UI is an experimental feature. " |
| 2277 | + "We do not guarantee that future changes will maintain backward compatibility.", |
| 2278 | + RuntimeWarning, |
| 2279 | + ) |
2276 | 2280 | ui_server.start_server( |
2277 | 2281 | self, |
2278 | 2282 | host=host, |
@@ -2352,12 +2356,13 @@ def validate_logged_features( |
2352 | 2356 | or None if successful. |
2353 | 2357 |
|
2354 | 2358 | """ |
2355 | | - warnings.warn( |
2356 | | - "Logged features validation is an experimental feature. " |
2357 | | - "This API is unstable and it could and most probably will be changed in the future. " |
2358 | | - "We do not guarantee that future changes will maintain backward compatibility.", |
2359 | | - RuntimeWarning, |
2360 | | - ) |
| 2359 | + if not flags_helper.is_test(): |
| 2360 | + warnings.warn( |
| 2361 | + "Logged features validation is an experimental feature. " |
| 2362 | + "This API is unstable and it could and most probably will be changed in the future. " |
| 2363 | + "We do not guarantee that future changes will maintain backward compatibility.", |
| 2364 | + RuntimeWarning, |
| 2365 | + ) |
2361 | 2366 |
|
2362 | 2367 | if not isinstance(source, FeatureService): |
2363 | 2368 | raise ValueError("Only feature service is currently supported as a source") |
|
0 commit comments