class_docstr: Specification for a parameter to be generated during fuzzing.
class_docstr_tok: ["Specification","for","a","parameter","to","be","generated","during","fuzzing","."]
docstr: Args:
      name:
          A string name with which to identify the parameter.
          FuzzedTensors can reference this string in their
          specifications.
      minval:
          The lower bound for the generated value. See the description
          of `distribution` for type behavior.
      maxval:
          The upper bound for the generated value. Type behavior is
          identical to `minval`.
      distribution:
          Specifies the distribution from which this parameter should
          be drawn. There are three possibilities:
              - "loguniform"
                  Samples between `minval` and `maxval` (inclusive) such
                  that the probabilities are uniform in log space. As a
                  concrete example, if minval=1 and maxval=100, a sample
                  is as likely to fall in [1, 10) as it is [10, 100].
              - "uniform"
                  Samples are chosen with uniform probability between
                  `minval` and `maxval` (inclusive). If either `minval`
                  or `maxval` is a float then the distribution is the
                  continuous uniform distribution; otherwise samples
                  are constrained to the integers.
              - dict:
                  If a dict is passed, the keys are taken to be choices
                  for the variables and the values are interpreted as
                  probabilities. (And must sum to one.)
          If a dict is passed, `minval` and `maxval` must not be set.
          Otherwise, they must be set.
      strict:
          If a parameter is strict, it will not be included in the
          iterative resampling process which Fuzzer uses to find a
          valid parameter configuration. This allows an author to
          prevent skew from resampling for a given parameter (for
          instance, a low size limit could inadvertently bias towards
          Tensors with fewer dimensions) at the cost of more iterations
          when generating parameters.
docstr_tok: ["Args",":","name",":","A","string","name","with","which","to","identify","the","parameter",".","FuzzedTensors","can","reference","this","string","in","their","specifications",".","minval",":","The","lower","bound","for","the","generated","value",".","See","the","description","of","`","distribution","`","for","type","behavior",".","maxval",":","The","upper","bound","for","the","generated","value",".","Type","behavior","is","identical","to","`","minval","`",".","distribution",":","Specifies","the","distribution","from","which","this","parameter","should","be","drawn",".","There","are","three","possibilities",":","-","``","loguniform","''","Samples","between","`","minval","`","and","`","maxval","`","(","inclusive",")","such","that","the","probabilities","are","uniform","in","log","space",".","As","a","concrete","example",",","if","minval=1","and","maxval=100",",","a","sample","is","as","likely","to","fall","in","[","1",",","10",")","as","it","is","[","10",",","100","]",".","-","``","uniform","''","Samples","are","chosen","with","uniform","probability","between","`","minval","`","and","`","maxval","`","(","inclusive",")",".","If","either","`","minval","`","or","`","maxval","`","is","a","float","then","the","distribution","is","the","continuous","uniform","distribution",";","otherwise","samples","are","constrained","to","the","integers",".","-","dict",":","If","a","dict","is","passed",",","the","keys","are","taken","to","be","choices","for","the","variables","and","the","values","are","interpreted","as","probabilities",".","(","And","must","sum","to","one",".",")","If","a","dict","is","passed",",","`","minval","`","and","`","maxval","`","must","not","be","set",".","Otherwise",",","they","must","be","set",".","strict",":","If","a","parameter","is","strict",",","it","will","not","be","included","in","the","iterative","resampling","process","which","Fuzzer","uses","to","find","a","valid","parameter","configuration",".","This","allows","an","author","to","prevent","skew","from","resampling","for","a","given","parameter","(","for","instance",",","a","low","size","limit","could","inadvertently","bias","towards","Tensors","with","fewer","dimensions",")","at","the","cost","of","more","iterations","when","generating","parameters","."]
code: def __init__(
      self,
      name: str,
      minval: Optional[Union[int, float]] = None,
      maxval: Optional[Union[int, float]] = None,
      distribution: Optional[Union[str, Dict[Any, float]]] = None,
      strict: bool = False,
  ):
      """
      Args:
          name:
              A string name with which to identify the parameter.
              FuzzedTensors can reference this string in their
              specifications.
          minval:
              The lower bound for the generated value. See the description
              of `distribution` for type behavior.
          maxval:
              The upper bound for the generated value. Type behavior is
              identical to `minval`.
          distribution:
              Specifies the distribution from which this parameter should
              be drawn. There are three possibilities:
                  - "loguniform"
                      Samples between `minval` and `maxval` (inclusive) such
                      that the probabilities are uniform in log space. As a
                      concrete example, if minval=1 and maxval=100, a sample
                      is as likely to fall in [1, 10) as it is [10, 100].
                  - "uniform"
                      Samples are chosen with uniform probability between
                      `minval` and `maxval` (inclusive). If either `minval`
                      or `maxval` is a float then the distribution is the
                      continuous uniform distribution; otherwise samples
                      are constrained to the integers.
                  - dict:
                      If a dict is passed, the keys are taken to be choices
                      for the variables and the values are interpreted as
                      probabilities. (And must sum to one.)
              If a dict is passed, `minval` and `maxval` must not be set.
              Otherwise, they must be set.
          strict:
              If a parameter is strict, it will not be included in the
              iterative resampling process which Fuzzer uses to find a
              valid parameter configuration. This allows an author to
              prevent skew from resampling for a given parameter (for
              instance, a low size limit could inadvertently bias towards
              Tensors with fewer dimensions) at the cost of more iterations
              when generating parameters.
      """
      self._name = name
      self._minval = minval
      self._maxval = maxval
      self._distribution = self._check_distribution(distribution)
      self.strict = strict
  
imports: import functools
  import itertools
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
label_desc: Use image node_id 1 to create a new FuzzedParameter object  with example: obj = FuzzedParameter(name, minval, maxval, distribution, strict)