From 99e8f7664485f761ae64448fad9347308eda1254 Mon Sep 17 00:00:00 2001 From: Dmytro Bobrenko <17252809+dbobrenko@users.noreply.github.com> Date: Tue, 6 Aug 2024 14:23:35 +0000 Subject: [PATCH] Remove code duplicate --- prompting/utils/config.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/prompting/utils/config.py b/prompting/utils/config.py index de22e4062..4e5991f97 100644 --- a/prompting/utils/config.py +++ b/prompting/utils/config.py @@ -303,13 +303,6 @@ def parse_probabilities(prob_list): except ValueError: raise argparse.ArgumentTypeError("All probabilities must be floats.") - def parse_probabilities(prob_list): - try: - # Convert each item in the list to a float - return [float(p) for p in prob_list] - except ValueError: - raise argparse.ArgumentTypeError("All probabilities must be floats.") - parser.add_argument( "--neuron.task_p", type=parse_probabilities, # Use the custom parsing function