class_docstr: Parameters
  ----------
  model : torch.nn.Module
      Model to be pruned.
  config_list : listlist
      Supported keys:
          - initial_sparsity: This is to specify the sparsity when compressor starts to compress.
          - final_sparsity: This is to specify the sparsity when compressor finishes to compress.
          - start_epoch: This is to specify the epoch number when compressor starts to compress, default start from epoch 0.
          - end_epoch: This is to specify the epoch number when compressor finishes to compress.
          - frequency: This is to specify every *frequency* number epochs compressor compress once, default frequency=1.
  optimizer: torch.optim.Optimizer
      Optimizer used to train model.
  pruning_algorithm: str
      Algorithms being used to prune model,
      choose from `['level', 'slim', 'l1', 'l2', 'fpgm', 'taylorfo', 'apoz', 'mean_activation']`, by default `level`
class_docstr_tok: ["Parameters","--","--","--","--","--","model",":","torch.nn.Module","Model","to","be","pruned",".","config_list",":","listlist","Supported","keys",":","-","initial_sparsity",":","This","is","to","specify","the","sparsity","when","compressor","starts","to","compress",".","-","final_sparsity",":","This","is","to","specify","the","sparsity","when","compressor","finishes","to","compress",".","-","start_epoch",":","This","is","to","specify","the","epoch","number","when","compressor","starts","to","compress",",","default","start","from","epoch","0",".","-","end_epoch",":","This","is","to","specify","the","epoch","number","when","compressor","finishes","to","compress",".","-","frequency",":","This","is","to","specify","every","*","frequency","*","number","epochs","compressor","compress","once",",","default","frequency=1",".","optimizer",":","torch.optim.Optimizer","Optimizer","used","to","train","model",".","pruning_algorithm",":","str","Algorithms","being","used","to","prune","model",",","choose","from","`","[","'level","'",",","'slim","'",",","'l1","'",",","'l2","'",",","'fpgm","'",",","'taylorfo","'",",","'apoz","'",",","'mean_activation","'","]","`",",","by","default","`","level","`"]
docstr: Parameters
  ----------
  model : torch.nn.Module
      Model to be pruned
  config_list : list
      List on pruning configs
docstr_tok: ["Parameters","--","--","--","--","--","model",":","torch.nn.Module","Model","to","be","pruned","config_list",":","list","List","on","pruning","configs"]
code: def validate_config(self, model, config_list):
      """
      Parameters
      ----------
      model : torch.nn.Module
          Model to be pruned
      config_list : list
          List on pruning configs
      """
      schema = CompressorSchema(
          [
              {
                  "initial_sparsity": And(float, lambda n: 0 <= n <= 1),
                  "final_sparsity": And(float, lambda n: 0 <= n <= 1),
                  "start_epoch": And(int, lambda n: n >= 0),
                  "end_epoch": And(int, lambda n: n >= 0),
                  "frequency": And(int, lambda n: n > 0),
                  Optional("op_types"): [str],
                  Optional("op_names"): [str],
              }
          ],
          model,
          logger,
      )
  
      schema.validate(config_list)
  
file_path: auptimizer/src/aup/compression/torch/pruning/agp.py
imports: import logging
  import torch
  from schema import And, Optional
  from .constants import MASKER_DICT
  from ..utils.config_validation import CompressorSchema
  from ..compressor import Pruner
label_desc: Use image node_id 2 for calling the AGPPruner obj's underlying member method code with example usage: obj.validate_config(model, config_list) without return types