class_docstr: Determines whether there are significant outliers in activation data around a certain layer.
  
  This is ideally used in conjunction with information on stationary vs. non-stationary distribution:
      If the data is stationary, and there are significant outliers, then we want to flag them
      We want to do this on a per channel basis for detecting outliers
  
  Determines whether activation data is flagged as outlier based on if data is stationary and:
      p_r = avg(100th percentile / "reference_percentile"th percentile)
      where:
          p_r is average percentile ratio across all batches in the epoch
          reference_percentile is a percentile values between 0 and 100 exclusive
  
      if p_r is above some threshold, then we consider the activations to have significant outliers
  
  Args:
      ratio_threshold (float, optional): The threshold for p_r to determine if there are outliers in activations
          Should be >= 1
          Default: 3.5
      reference_percentile (float, optional): The denominator to find the relative scale of the 100th percentile
          Should be between 0 and 1
          Default: 0.975
      fraction_batches_used_threshold (float, optional): Threshold of fraction of batches per channel to determine outlier
          If fraction is below this, we deem number of samples used to calculate outliers as insignificant and alert user
          regardless of whether we detected outliers or not in channel to take a closer look at channel results
          Should be between 0 and 1
          Default: 0.95
      ch_axis (int, optional): The channel axis being observed to determine input weight equalization
          Default: 1
  
  * :attr:`ratio_threshold`: The threshold for p_r to determine if there are outliers in activations
      The p_r value (average ratio of 100th percentile/reference_percentile) is compared to ratio_threshold
      If it is significantly greater, then we consider it an outlier
      This threshold was calculated based on the ratio of the percentiles in a normal distribution
      The calculations behind value choice: https://drive.google.com/file/d/1N2wdtXWI-kOH8S7HH4-PYB_NmqzZil4p/view?usp=sharing
  
  * :attr:`reference_percentile`: The denominator of the top fraction to find the relative scale of the 100th percentile
      Should be between 0 and 1
      The calculations behind value choice: https://drive.google.com/file/d/1N2wdtXWI-kOH8S7HH4-PYB_NmqzZil4p/view?usp=sharing
  
  * :attr:`fraction_batches_used_threshold`: The fraction of batches to determine outliers for each channel should be above this
      Some batches may not be used because of 0-based errors, so this is to ensure a good amount of the total batches are used
      Should be between 0 and 1
  
  * :attr:`ch_axis`: The channel axis being observed to determine outliers
  
  * :attr:`DEFAULT_PRE_OBSERVER_NAME`: The name of the pre-observer to be inserted for this detector
class_docstr_tok: ["Determines","whether","there","are","significant","outliers","in","activation","data","around","a","certain","layer",".","This","is","ideally","used","in","conjunction","with","information","on","stationary","vs.","non-stationary","distribution",":","If","the","data","is","stationary",",","and","there","are","significant","outliers",",","then","we","want","to","flag","them","We","want","to","do","this","on","a","per","channel","basis","for","detecting","outliers","Determines","whether","activation","data","is","flagged","as","outlier","based","on","if","data","is","stationary","and",":","p_r","=","avg","(","100th","percentile","\/","``","reference_percentile","''","th","percentile",")","where",":","p_r","is","average","percentile","ratio","across","all","batches","in","the","epoch","reference_percentile","is","a","percentile","values","between","0","and","100","exclusive","if","p_r","is","above","some","threshold",",","then","we","consider","the","activations","to","have","significant","outliers","Args",":","ratio_threshold","(","float",",","optional",")",":","The","threshold","for","p_r","to","determine","if","there","are","outliers","in","activations","Should","be",">","=","1","Default",":","3.5","reference_percentile","(","float",",","optional",")",":","The","denominator","to","find","the","relative","scale","of","the","100th","percentile","Should","be","between","0","and","1","Default",":","0.975","fraction_batches_used_threshold","(","float",",","optional",")",":","Threshold","of","fraction","of","batches","per","channel","to","determine","outlier","If","fraction","is","below","this",",","we","deem","number","of","samples","used","to","calculate","outliers","as","insignificant","and","alert","user","regardless","of","whether","we","detected","outliers","or","not","in","channel","to","take","a","closer","look","at","channel","results","Should","be","between","0","and","1","Default",":","0.95","ch_axis","(","int",",","optional",")",":","The","channel","axis","being","observed","to","determine","input","weight","equalization","Default",":","1","*",":","attr",":","`","ratio_threshold","`",":","The","threshold","for","p_r","to","determine","if","there","are","outliers","in","activations","The","p_r","value","(","average","ratio","of","100th","percentile\/reference_percentile",")","is","compared","to","ratio_threshold","If","it","is","significantly","greater",",","then","we","consider","it","an","outlier","This","threshold","was","calculated","based","on","the","ratio","of","the","percentiles","in","a","normal","distribution","The","calculations","behind","value","choice",":","https",":","\/\/drive.google.com\/file\/d\/1N2wdtXWI-kOH8S7HH4-PYB_NmqzZil4p\/view","?","usp=sharing","*",":","attr",":","`","reference_percentile","`",":","The","denominator","of","the","top","fraction","to","find","the","relative","scale","of","the","100th","percentile","Should","be","between","0","and","1","The","calculations","behind","value","choice",":","https",":","\/\/drive.google.com\/file\/d\/1N2wdtXWI-kOH8S7HH4-PYB_NmqzZil4p\/view","?","usp=sharing","*",":","attr",":","`","fraction_batches_used_threshold","`",":","The","fraction","of","batches","to","determine","outliers","for","each","channel","should","be","above","this","Some","batches","may","not","be","used","because","of","0-based","errors",",","so","this","is","to","ensure","a","good","amount","of","the","total","batches","are","used","Should","be","between","0","and","1","*",":","attr",":","`","ch_axis","`",":","The","channel","axis","being","observed","to","determine","outliers","*",":","attr",":","`","DEFAULT_PRE_OBSERVER_NAME","`",":","The","name","of","the","pre-observer","to","be","inserted","for","this","detector"]
docstr: Returns the DetectorQConfigInfo for each module_fqn relevant
  Args
      model (nn.Module or subclass): model to find observer insertion points
  
  Returns a Dict mapping from unique observer fqns (where we want to insert them) to:
      A DetectorQConfigInfo with the information to generate a QConfig for a specific module
docstr_tok: ["Returns","the","DetectorQConfigInfo","for","each","module_fqn","relevant","Args","model","(","nn.Module","or","subclass",")",":","model","to","find","observer","insertion","points","Returns","a","Dict","mapping","from","unique","observer","fqns","(","where","we","want","to","insert","them",")","to",":","A","DetectorQConfigInfo","with","the","information","to","generate","a","QConfig","for","a","specific","module"]
code: def get_qconfig_info(self, model) -> Dict[str, DetectorQConfigInfo]:
      r"""Returns the DetectorQConfigInfo for each module_fqn relevant
      Args
          model (nn.Module or subclass): model to find observer insertion points
  
      Returns a Dict mapping from unique observer fqns (where we want to insert them) to:
          A DetectorQConfigInfo with the information to generate a QConfig for a specific module
      """
      # currently doesn't do anything for outlier detector
      return {}
  
imports: from typing import Any, Dict, Set, Tuple, Callable, List
  import torch
  import torch.nn
  import torch.ao.nn.qat
  from abc import ABC, abstractmethod
  from torch.ao.quantization.fake_quantize import FakeQuantize
  from torch.ao.quantization.fx.graph_module import GraphModule
  from torch.ao.quantization.fx._model_report.model_report_observer import ModelReportObserver
  from torch.ao.quantization.qconfig import QConfig, default_qconfig, _assert_valid_qconfig
  from torch.ao.quantization.observer import ObserverBase, default_dynamic_quant_observer, default_per_channel_weight_observer, default_observer, default_weight_observer
  from torch.ao.quantization.fx._equalize import default_equalization_qconfig, EqualizationQConfig
  from torch.ao.quantization.observer import _is_activation_post_process
label_desc: Use image node_id 4 for calling the OutlierDetector obj's underlying member method code with example usage: obj.get_qconfig_info(model) and returns: dict