class_docstr: CAV class contains methods for concept activation vector (CAV).
  
  CAV represents semenatically meaningful vector directions in
  network's embeddings (bottlenecks).
class_docstr_tok: ["CAV","class","contains","methods","for","concept","activation","vector","(","CAV",")",".","CAV","represents","semenatically","meaningful","vector","directions","in","network","'s","embeddings","(","bottlenecks",")","."]
docstr: Check if a CAV is saved in cav_dir.
  
  Args:
    cav_dir: where cav pickles might be saved
    concepts: set of concepts used for CAV
    bottleneck: the bottleneck used for CAV
    cav_hparams: a parameter used to learn CAV
  
  Returns:
    True if exists, False otherwise.
docstr_tok: ["Check","if","a","CAV","is","saved","in","cav_dir",".","Args",":","cav_dir",":","where","cav","pickles","might","be","saved","concepts",":","set","of","concepts","used","for","CAV","bottleneck",":","the","bottleneck","used","for","CAV","cav_hparams",":","a","parameter","used","to","learn","CAV","Returns",":","True","if","exists",",","False","otherwise","."]
code: def check_cav_exists(cav_dir, concepts, bottleneck, cav_hparams):
      """Check if a CAV is saved in cav_dir.
  
      Args:
        cav_dir: where cav pickles might be saved
        concepts: set of concepts used for CAV
        bottleneck: the bottleneck used for CAV
        cav_hparams: a parameter used to learn CAV
  
      Returns:
        True if exists, False otherwise.
      """
      cav_path = os.path.join(
          cav_dir,
          CAV.cav_key(
              concepts,
              bottleneck,
              cav_hparams["model_type"],
              cav_hparams["alpha"],
          )
          + ".pkl",
      )
      return tf.io.gfile.exists(cav_path)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os.path
  import pickle
  import numpy
  from six.moves import range
  from sklearn import linear_model
  from sklearn import metrics
  from sklearn.model_selection import train_test_split
  from tcav import utils
  import tensorflow
label_desc: Use image node_id 4 for calling the CAV obj's underlying member method code with example usage: obj.check_cav_exists(cav_dir, concepts, bottleneck, cav_hparams) and returns: tf