parameters: (base_path, spec, filter_regex=None)
return_statement: return log_dirs
docstring: Return list of run directories given an experiments spec
          
          :param base_path: base directory to search in 
          :param spec: experiment spec, e.g. from an experiments config file
          :param filter_regex: optional additional regex; limits result to matching paths 
          :return: list of (filtered) paths (joined with base path)
docstring_summary: Return list of run directories given an experiments spec
          
          :param base_path: base directory to search in 
          :param spec: experiment spec, e.g. from an experiments config file
          :param filter_regex: optional additional regex; limits result to matching paths 
          :return: list of (filtered) paths (joined with base path)
docstring_tokens: Return list of run directories given an experiments spec : param base_path : base directory to search in : param spec : experiment spec e . g . from an experiments config file : param filter_regex : optional additional regex ; limits result to matching paths : return : list of ( filtered ) paths ( joined with base path )
function: def get_log_dirs(base_path, spec, filter_regex=None):
          """Return list of run directories given an experiments spec
          
          :param base_path: base directory to search in 
          :param spec: experiment spec, e.g. from an experiments config file
          :param filter_regex: optional additional regex; limits result to matching paths 
          :return: list of (filtered) paths (joined with base path)
          """
          log_dirs = [d for p in spec.pattern for d in glob(os.path.join(base_path, p)) if Run.is_run_dir(d)]
          if spec.filter_regex:
              log_dirs = [d for d in log_dirs if re.search(spec.filter_regex, d)]
          if filter_regex:
              log_dirs = [d for d in log_dirs if re.search(filter_regex, d)]
          return log_dirs
function_tokens: def get_log_dirs ( base_path , spec , filter_regex = None ) : log_dirs = [ d for p in spec . pattern for d in glob ( os . path . join ( base_path , p ) ) if Run . is_run_dir ( d ) ] if spec . filter_regex : log_dirs = [ d for d in log_dirs if re . search ( spec . filter_regex , d ) ] if filter_regex : log_dirs = [ d for d in log_dirs if re . search ( filter_regex , d ) ] return log_dirs