From 5cab4f206733f7dd5b270be55cbd321c60ff8574 Mon Sep 17 00:00:00 2001 From: Richard Preen Date: Thu, 4 Jul 2024 16:48:54 +0100 Subject: [PATCH] update max features to prompt --- aisdc/config/target.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aisdc/config/target.py b/aisdc/config/target.py index 626f5d7f..4b7f6be5 100644 --- a/aisdc/config/target.py +++ b/aisdc/config/target.py @@ -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.""" @@ -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'")