Skip to content

Commit

Permalink
Change the feature store plan method to public modifier
Browse files Browse the repository at this point in the history
Signed-off-by: Breno Costa <brenocosta0901@gmail.com>
  • Loading branch information
breno-costa committed Jul 2, 2022
1 parent 2800e37 commit a3ae076
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,8 @@ def _get_features(
return _feature_refs

def _should_use_plan(self):
"""Returns True if _plan and _apply_diffs should be used, False otherwise."""
# Currently only the local provider with sqlite online store supports _plan and _apply_diffs.
"""Returns True if plan and _apply_diffs should be used, False otherwise."""
# Currently only the local provider with sqlite online store supports plan and _apply_diffs.
return self.config.provider == "local" and (
self.config.online_store and self.config.online_store.type == "sqlite"
)
Expand Down Expand Up @@ -636,7 +636,7 @@ def _get_feature_views_to_materialize(
return feature_views_to_materialize

@log_exceptions_and_usage
def _plan(
def plan(
self, desired_repo_contents: RepoContents
) -> Tuple[RegistryDiff, InfraDiff, Infra]:
"""Dry-run registering objects to metadata store.
Expand Down Expand Up @@ -670,7 +670,7 @@ def _plan(
... ttl=timedelta(seconds=86400 * 1),
... batch_source=driver_hourly_stats,
... )
>>> registry_diff, infra_diff, new_infra = fs._plan(RepoContents(
>>> registry_diff, infra_diff, new_infra = fs.plan(RepoContents(
... data_sources=[driver_hourly_stats],
... feature_views=[driver_hourly_stats_view],
... on_demand_feature_views=list(),
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/feast/repo_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def plan(repo_config: RepoConfig, repo_path: Path, skip_source_validation: bool)
for data_source in data_sources:
data_source.validate(store.config)

registry_diff, infra_diff, _ = store._plan(repo)
registry_diff, infra_diff, _ = store.plan(repo)
click.echo(registry_diff.to_string())
click.echo(infra_diff.to_string())

Expand Down Expand Up @@ -262,7 +262,7 @@ def apply_total_with_repo_instance(
for data_source in data_sources:
data_source.validate(store.config)

registry_diff, infra_diff, new_infra = store._plan(repo)
registry_diff, infra_diff, new_infra = store.plan(repo)

# For each object in the registry, determine whether it should be kept or deleted.
(
Expand Down

0 comments on commit a3ae076

Please sign in to comment.