class_docstr: Test class for cross-validation tests.
class_docstr_tok: ["Test","class","for","cross-validation","tests","."]
docstr: Test when using `folds_file`, log shows number of folds and appropriate warning.
docstr_tok: ["Test","when","using","`","folds_file","`",",","log","shows","number","of","folds","and","appropriate","warning","."]
code: def test_folds_file_logging_num_folds(self):
      """Test when using `folds_file`, log shows number of folds and appropriate warning."""
      # Run experiment
      suffix = ".jsonlines"
      train_path = train_dir / f"f0{suffix}"
  
      template_path = config_dir / "test_folds_file.template.cfg"
      config_path = fill_in_config_paths_for_single_file(
          template_path, train_path, None
      )
      run_configuration(config_path, quiet=True, local=True)
  
      # Check experiment log output
      with open(output_dir / "test_folds_file_logging.log") as f:
          cv_file_pattern = re.compile(
              r'Specifying "folds_file" overrides both explicit and default '
              r'"num_cv_folds".'
          )
          matches = re.findall(cv_file_pattern, f.read())
          self.assertEqual(len(matches), 1)
  
      # Check job log output
      with open(
          output_dir / "test_folds_file_logging_train_f0."
          "jsonlines_LogisticRegression.log"
      ) as f:
          cv_folds_pattern = re.compile(
              r"(Task: cross_validate\n)(.+)(Cross-validating \([0-9]+ folds, seed=[0-9]+\))"
          )
          matches = re.findall(cv_folds_pattern, f.read())
          self.assertEqual(len(matches), 1)
  
imports: import csv
  import itertools
  import json
  import re
  import unittest
  import numpy
  from numpy.testing import assert_almost_equal
  from sklearn.datasets import make_classification
  from sklearn.feature_extraction import FeatureHasher
  from skll.config import load_cv_folds
  from skll.data import FeatureSet
  from skll.experiments import load_featureset, run_configuration
  from skll.learner import Learner
  from skll.utils.testing import compute_expected_folds_for_cv_testing, config_dir, create_jsonlines_feature_files, fill_in_config_paths_for_single_file, other_dir, output_dir, remove_jsonlines_feature_files, train_dir, unlink
label_desc: Use image node_id 8 for calling the TestCrossValidation obj's underlying member method code with example usage: obj.test_folds_file_logging_num_folds() without return types