Skip to content

Commit b576c45

Browse files
mmporongshuchu
andauthored
docs: Fix docstring argument names that do not match the signature (#7098)
Several Args entries named a parameter the function does not have. Rename them to the actual parameter or drop them, and update the DecisionEvaluator example, which passed a DecisionStrategy that the constructor does not accept. Signed-off-by: mmporong <mmporong@gmail.com> Co-authored-by: Shuchu Han <shuchu.han@gmail.com>
1 parent d458393 commit b576c45

7 files changed

Lines changed: 15 additions & 16 deletions

File tree

‎sdk/python/feast/infra/provider.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ def retrieve_online_documents_v2(
491491
config: The config for the current feature store.
492492
table: The feature view whose embeddings should be searched.
493493
requested_features: the requested document feature names.
494-
query: The query embedding to search for (optional).
494+
embedding: The query embedding to search for (optional).
495495
top_k: The number of documents to return.
496496
query_string: The query string to search for using keyword search (bm25) (optional)
497497
filters: Optional metadata filters (ComparisonFilter or CompoundFilter)

‎sdk/python/feast/infra/registry/base_registry.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ def delete_project(
946946
Deletes a project or raises an ProjectNotFoundException exception if not found.
947947
948948
Args:
949-
project: Feast project name that needs to be deleted
949+
name: Feast project name that needs to be deleted
950950
commit: Whether the change should be persisted immediately
951951
"""
952952
raise NotImplementedError

‎sdk/python/feast/permissions/decision.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ class DecisionStrategy(enum.Enum):
2121

2222
class DecisionEvaluator:
2323
"""
24-
A class to implement the decision logic, according to the selected strategy.
24+
A class to implement the decision logic.
25+
Only the `AFFIRMATIVE` strategy is currently supported.
2526
2627
Args:
27-
decision_strategy: The associated `DecisionStrategy`.
2828
num_of_voters: The expected number of votes to complete the decision.
2929
3030
Examples:
31-
Create the instance and specify the strategy and number of decisions:
32-
`evaluator = DecisionEvaluator(DecisionStrategy.UNANIMOUS, 3)
31+
Create the instance and specify the number of voters:
32+
`evaluator = DecisionEvaluator(3)`
3333
34-
For each vote that you receivem, add a decision grant: `evaluator.add_grant(vote, message)`
34+
For each vote that you receive, add a decision grant: `evaluator.add_grant(vote, message)`
3535
and check if the decision process ended: `if evaluator.is_decided():`
3636
Once decided, get the result and the failure explanations using:
3737
`grant, explanations = evaluator.grant()`
@@ -92,8 +92,8 @@ def add_grant(self, grant: bool, explanation: str):
9292
If the evaluation process already ended, additional votes are discarded.
9393
9494
Args:
95-
grant: `True` is the decision is accepted, `False` otherwise.
96-
explanation: Denial reason (not considered when `vote` is `True`).
95+
grant: `True` if the decision is accepted, `False` otherwise.
96+
explanation: Denial reason (not considered when `grant` is `True`).
9797
"""
9898

9999
if self.is_decided():

‎sdk/python/feast/permissions/server/utils.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def init_security_manager(auth_type: AuthManagerType, fs: "feast.FeatureStore"):
7070
7171
Args:
7272
auth_type: The authorization manager type.
73-
registry: The feature store registry.
73+
fs: The feature store.
7474
"""
7575
if auth_type == AuthManagerType.NONE:
7676
logger.warning(

‎sdk/python/feast/project.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,13 @@ def is_valid(self):
123123
@classmethod
124124
def from_proto(cls, project_proto: ProjectProto):
125125
"""
126-
Creates a project from a protobuf representation of an project.
126+
Creates a project from a protobuf representation of a project.
127127
128128
Args:
129-
entity_proto: A protobuf representation of an project.
129+
project_proto: A protobuf representation of a project.
130130
131131
Returns:
132-
An Entity object based on the entity protobuf.
132+
A Project object based on the project protobuf.
133133
"""
134134
project = cls(
135135
name=project_proto.spec.name,

‎sdk/python/feast/ssl_ca_trust_store_setup.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
def configure_ca_trust_store_env_variables():
99
"""
1010
configures the environment variable so that other libraries or servers refer to the TLS ca file path.
11-
:param ca_file_path:
1211
:return:
1312
"""
1413
if (

‎sdk/python/feast/type_map.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,10 +1588,10 @@ def python_values_to_proto_values(
15881588

15891589
def _proto_value_to_value_type(proto_value: ProtoValue) -> ValueType:
15901590
"""
1591-
Returns Feast ValueType given Feast ValueType string.
1591+
Returns Feast ValueType given a Feast proto value.
15921592
15931593
Args:
1594-
proto_str: str
1594+
proto_value: ProtoValue
15951595
15961596
Returns:
15971597
A variant of ValueType.

0 commit comments

Comments
 (0)