Skip to content

Commit

Permalink
update max features to prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
rpreen committed Jul 4, 2024
1 parent 2a3cdb9 commit 5cab4f2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions aisdc/config/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
arrays_proba = ["proba_train", "proba_test"]
encodings = ["onehot", "str", "int", "float"]

MAX_FEATURES = 64 # maximum features to prompt


def _get_arrays(target: Target, arrays: list[str]) -> None:
"""Prompt user for the paths to array data."""
Expand Down Expand Up @@ -62,8 +64,9 @@ def _get_features(target: Target) -> None:
print("To run attribute inference attacks the features must be described.")
n_features = input("How many features does this dataset have? ")
n_features = int(n_features)
if n_features > 64:
print("There are too many features to perform attribute inference.")
if n_features > MAX_FEATURES:
print("There are too many features to add via prompt.")
print("You can edit the 'target.yaml' to add features later.")
return
print("The name, index, and encoding are needed for each feature.")
print("For example: feature 0 = 'parents', '[0, 1, 2]', 'onehot'")
Expand Down

0 comments on commit 5cab4f2

Please sign in to comment.