code: def run_oasst(tmp_path, config_name, metric):
      """
      Test training on OASST dataset.
  
      Pytest keeps around the last 3 test runs in the tmp_path fixture.
      """
      prepare_default_dataset_causal_language_modeling(tmp_path)
      train_path = os.path.join(tmp_path, "train_full.pq")
      # create dummy labels for classification problem type,
      # unused for other problem types
      df = pd.read_parquet(train_path)
      df["multiclass_label"] = np.random.choice(
          ["0", "1", "2"], size=len(df)
      )
      df["binary_label"] = np.random.choice(["0", "1"], size=len(df))
      df.to_parquet(train_path)
  
      with open(
          os.path.join(
              os.path.dirname(os.path.realpath(__file__)),
              f"{config_name}.yaml",
          ),
          "r",
      ) as fp:
          cfg = yaml.load(fp, Loader=yaml.FullLoader)
      # set paths and save in tmp folder
      cfg["dataset"]["train_dataframe"] = train_path
      cfg["output_directory"] = os.path.join(tmp_path, "output")
      # set metric
      cfg["prediction"]["metric"] = metric
      modifed_config_path = os.path.join(tmp_path, "cfg.yaml")
      with open(modifed_config_path, "w") as fp:
          yaml.dump(cfg, fp)
  
      # llm studio root directory.
      root_dir = os.path.abspath(
          os.path.join(
              os.path.dirname(os.path.realpath(__file__)), "../../"
          )
      )
      cmd = [
          f"{sys.executable}",
          os.path.join(root_dir, "train.py"),
          "-Y",
          f"{modifed_config_path}",
      ]
      execute_subprocess_async(cmd)
      assert os.path.exists(cfg["output_directory"])
      status = get_experiment_status(path=cfg["output_directory"])
      assert status == "finished"
      assert os.path.exists(
          os.path.join(cfg["output_directory"], "charts.db")
      )
      assert os.path.exists(
          os.path.join(cfg["output_directory"], "checkpoint.pth")
      )
      assert os.path.exists(
          os.path.join(cfg["output_directory"], "logs.log")
      )
      assert os.path.exists(
          os.path.join(
              cfg["output_directory"], "validation_predictions.csv"
          )
      )
  
file_path: h2o-llmstudio/tests/integration/test_integration.py
imports: import json
  import os
  import sys
  import numpy
  import pandas
  import pytest
  import torch
  import yaml
  from transformers.testing_utils import execute_subprocess_async
  from llm_studio.app_utils.default_datasets import prepare_default_dataset_causal_language_modeling
label_desc: Use image node_id 6 for calling a global function with example usage: run_oasst(tmp_path, config_name, metric) without return types