class_docstr: Base class for defining hyperparameters.
docstr: Arguments:
  - name : the name of the hyperparameter (e.g., `--dropout`)
  - values : the set of values to sweep over (e.g., `[0.0, 0.1, 0.2]`)
  - binary_flag : whether the hyperparameter uses a boolean flag
                  (e.g., `--no-save`)
  - save_dir_key : function that takes the hyperparameter value and returns
                  the "key" to be appended to the output directory name
docstr_tok: ["Arguments",":","-","name",":","the","name","of","the","hyperparameter","(","e.g.",",","`","--","dropout","`",")","-","values",":","the","set","of","values","to","sweep","over","(","e.g.",",","`","[","0.0",",","0.1",",","0.2","]","`",")","-","binary_flag",":","whether","the","hyperparameter","uses","a","boolean","flag","(","e.g.",",","`","--","no-save","`",")","-","save_dir_key",":","function","that","takes","the","hyperparameter","value","and","returns","the","``","key","''","to","be","appended","to","the","output","directory","name"]
code: def __init__(
      self, name, values=None, binary_flag=False, save_dir_key=None
  ):
      """
      Arguments:
      - name : the name of the hyperparameter (e.g., `--dropout`)
      - values : the set of values to sweep over (e.g., `[0.0, 0.1, 0.2]`)
      - binary_flag : whether the hyperparameter uses a boolean flag
                      (e.g., `--no-save`)
      - save_dir_key : function that takes the hyperparameter value and returns
                      the "key" to be appended to the output directory name
      """
      self.name = name
      if values is None:  # syntactic sugar for binary flags
          self.values = [True]
          self.binary_flag = True
      else:
          self.values = values if isinstance(values, list) else [values]
          self.binary_flag = binary_flag
      self.save_dir_key = save_dir_key
      self.current_value = None
  
      if len(self.values) > 1 and self.save_dir_key is None:
          raise ValueError(
              f"{name} has more than one value but is missing a save_dir_key!"
          )
  
file_path: mmf/tools/sweeps/lib/__init__.py
imports: import argparse
  import datetime
  import json
  import os
  import socket
label_desc: Use image node_id 1 to create a new hyperparam object  with example: obj = hyperparam(name, values, binary_flag, save_dir_key)