class_docstr: Base class for samplers used to generate from the VAEs models.
  
  Args:
      model (BaseAE): The vae model to sample from.
      sampler_config (BaseSamplerConfig): An instance of BaseSamplerConfig in which any sampler's
          parameters is made available. If None a default configuration is used. Default: None
class_docstr_tok: ["Base","class","for","samplers","used","to","generate","from","the","VAEs","models",".","Args",":","model","(","BaseAE",")",":","The","vae","model","to","sample","from",".","sampler_config","(","BaseSamplerConfig",")",":","An","instance","of","BaseSamplerConfig","in","which","any","sampler's","parameters","is","made","available",".","If","None","a","default","configuration","is","used",".","Default",":","None"]
docstr: Method to save the sampler config. The config is saved a as ``sampler_config.json``
  file in ``dir_path``
docstr_tok: ["Method","to","save","the","sampler","config",".","The","config","is","saved","a","as","``","sampler_config.json","``","file","in","``","dir_path","``"]
code: def save(self, dir_path):
      """Method to save the sampler config. The config is saved a as ``sampler_config.json``
      file in ``dir_path``"""
  
      self.sampler_config.save_json(dir_path, "sampler_config")
  
file_path: benchmark_VAE/src/pythae/samplers/base/base_sampler.py
imports: import logging
  import os
  from typing import Any, Dict
  import numpy
  import torch
  from imageio import imwrite
  from ...models import BaseAE
  from .base_sampler_config import BaseSamplerConfig
label_desc: Use image node_id 4 for calling the BaseSampler obj's underlying member method code with example usage: obj.save(dir_path) without return types