Domain.yml file not found when passing option -d domain for training to github action

I have split my domain file into multiple files in a folder. It trains fine with “rasa train -d domain”. However if I try to use the github action it fails with file not found domain.yml. I have passed “-d domain” in the train_args parameter as can be seen below.

Run RasaHQ/rasa-train-test-gha@main
  with:
    rasa_version: 2.8.11-full
    rasa_test: false
    github_token: ***
    train_args: -d domain
    rasa_train: true
    fine_tune: false
    data_validate: true
    workspace: /home/runner/work/chatbot/chatbot
    train_type: all
    test_type: all
    publish_summary: true
    configuration: config.yml
    cross_validation: false
    data_name: default
    result_directory: results
    report_directory: reports
    gomplate_image: hairyhenderson/gomplate
    tmpfs_directory: /.config
Run mkdir -p /home/runner/work/chatbot/chatbot/models
  mkdir -p /home/runner/work/chatbot/chatbot/models
  chmod 777 /home/runner/work/chatbot/chatbot/models
  mkdir -p /home/runner/work/chatbot/chatbot/results
  chmod 777 /home/runner/work/chatbot/chatbot/results
  
  case "all" in
    all)
      echo TRAIN_TYPE="" >> $GITHUB_ENV
      ;;
    nlu)
      echo TRAIN_TYPE=nlu >> $GITHUB_ENV
      echo DEFAULT_ARGS="--config /app/config.yml" >> $GITHUB_ENV
      ;;
    core)
      echo TRAIN_TYPE=core >> $GITHUB_ENV
      ;;
    *)
      echo "::error::Unknown training type: all (use: core/nlu/all)"
      exit 1
  esac
  
  case "all" in
    all)
      echo TEST_NLU="true" >> $GITHUB_ENV
      echo TEST_CORE="true" >> $GITHUB_ENV
      ;;
    nlu)
      echo TEST_NLU="true" >> $GITHUB_ENV
      echo DEFAULT_ARGS="--config /app/config.yml" >> $GITHUB_ENV
      ;;
    core)
      echo TEST_CORE="true" >> $GITHUB_ENV
      ;;
    *)
      echo "::error::Unknown test type: all (use: core/nlu/all)"
      exit 1
  esac
  
  # Set a model path
  if [[ -n "" ]];then
    echo MODEL_ARGS="--model /app/" >> $GITHUB_ENV
  fi
  
  # Set cross validation
  if [[ "false" == "true" ]];then
    echo CROSS_VALIDATION_ARGS="--cross-validation" >> $GITHUB_ENV
  fi
  
  # Set docker args
  echo DOCKER_ARGS="--rm --tmpfs /.config -e HOME=/app -e MPLCONFIGDIR=/tmp/.mplconfigdir \
    -e CI=${CI} -e RASA_TELEMETRY_ENABLED= -v /home/runner/work/chatbot/chatbot:/app/github_workspace \
    -v /home/runner/work/chatbot/chatbot:/app -v /home/runner/work/chatbot/chatbot/models:/app/models \
    -v /home/runner/work/chatbot/chatbot/results:/app/results" >> $GITHUB_ENV
  
  # Set environment variables for generating a report
  echo "SUMMARY_FILE=/home/runner/work/chatbot/chatbot/reports/report.json" >> $GITHUB_ENV
  
  if [[ -n "" ]]; then
    echo "CONFIG=" >> $GITHUB_ENV
  else
    echo "CONFIG=config.yml" >> $GITHUB_ENV
  fi
  
  echo "DATASET_NAME=default" >> $GITHUB_ENV
  echo "RESULT_DIR=/home/runner/work/chatbot/chatbot/results" >> $GITHUB_ENV
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
Run # Set custom rasa image
  # Set custom rasa image
  if [[ -n "" ]]; then
    echo "RASA_IMAGE=" >> $GITHUB_ENV
    # Don't continue if a custom rasa image was used
    exit 0
  fi
  
  DOCKERHUB_TAGS_URL="https://registry.hub.docker.com/v2/repositories/rasa/rasa/tags?page_size=10000"
  # Get the latest version
  if [[ "2.8.11-full" == "latest-full" ]]; then
    LATEST_RASA_VERSION=$(curl -s ${DOCKERHUB_TAGS_URL} | jq -r '.results[].name' | grep -E 'full' | grep -vE 'latest' | sort -Vr | head -n1)
    RASA_VERSION=${LATEST_RASA_VERSION}
  else
    # Validate Rasa version
    CHECK_VERSION=$((DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect rasa/rasa:2.8.11-full &> /dev/null && echo true || echo false) || true)
    if [[ "$CHECK_VERSION" != "true" ]]; then
      echo "::error::Rasa version 2.8.11-full doesn't exist. Check if the given Rasa version is valid, https://hub.docker.com/r/rasa/rasa/tags" && exit 1
    fi
    RASA_VERSION=2.8.11-full
  fi
  
  echo "RASA_IMAGE=rasa/rasa:${RASA_VERSION}" >> $GITHUB_ENV
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    TRAIN_TYPE: 
    TEST_NLU: true
    TEST_CORE: true
    DOCKER_ARGS: --rm --tmpfs /.config -e HOME=/app -e MPLCONFIGDIR=/tmp/.mplconfigdir   -e CI=true -e RASA_TELEMETRY_ENABLED= -v /home/runner/work/chatbot/chatbot:/app/github_workspace   -v /home/runner/work/chatbot/chatbot:/app -v /home/runner/work/chatbot/chatbot/models:/app/models   -v /home/runner/work/chatbot/chatbot/results:/app/results
    SUMMARY_FILE: /home/runner/work/chatbot/chatbot/reports/report.json
    CONFIG: config.yml
    DATASET_NAME: default
    RESULT_DIR: /home/runner/work/chatbot/chatbot/results
Run if [[ "true" == "true" ]]; then
  if [[ "true" == "true" ]]; then
    echo "Run data validation"
    echo
    echo docker run --rm --tmpfs /.config -e HOME=/app -e MPLCONFIGDIR=/tmp/.mplconfigdir   -e CI=true -e RASA_TELEMETRY_ENABLED= -v /home/runner/work/chatbot/chatbot:/app/github_workspace   -v /home/runner/work/chatbot/chatbot:/app -v /home/runner/work/chatbot/chatbot/models:/app/models   -v /home/runner/work/chatbot/chatbot/results:/app/results rasa/rasa:2.8.11-full data validate 
    docker run --rm --tmpfs /.config -e HOME=/app -e MPLCONFIGDIR=/tmp/.mplconfigdir   -e CI=true -e RASA_TELEMETRY_ENABLED= -v /home/runner/work/chatbot/chatbot:/app/github_workspace   -v /home/runner/work/chatbot/chatbot:/app -v /home/runner/work/chatbot/chatbot/models:/app/models   -v /home/runner/work/chatbot/chatbot/results:/app/results rasa/rasa:2.8.11-full data validate 
  else
    echo "::warning::Data validation is disabled. To turn on data validation set the data_validate parameter to 'true'."
  fi
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    TRAIN_TYPE: 
    TEST_NLU: true
    TEST_CORE: true
    DOCKER_ARGS: --rm --tmpfs /.config -e HOME=/app -e MPLCONFIGDIR=/tmp/.mplconfigdir   -e CI=true -e RASA_TELEMETRY_ENABLED= -v /home/runner/work/chatbot/chatbot:/app/github_workspace   -v /home/runner/work/chatbot/chatbot:/app -v /home/runner/work/chatbot/chatbot/models:/app/models   -v /home/runner/work/chatbot/chatbot/results:/app/results
    SUMMARY_FILE: /home/runner/work/chatbot/chatbot/reports/report.json
    CONFIG: config.yml
    DATASET_NAME: default
    RESULT_DIR: /home/runner/work/chatbot/chatbot/results
    RASA_IMAGE: rasa/rasa:2.8.11-full
Run data validation

docker run --rm --tmpfs /.config -e HOME=/app -e MPLCONFIGDIR=/tmp/.mplconfigdir -e CI=true -e RASA_TELEMETRY_ENABLED= -v /home/runner/work/chatbot/chatbot:/app/github_workspace -v /home/runner/work/chatbot/chatbot:/app -v /home/runner/work/chatbot/chatbot/models:/app/models -v /home/runner/work/chatbot/chatbot/results:/app/results rasa/rasa:2.8.11-full data validate
Unable to find image 'rasa/rasa:2.8.11-full' locally
2.8.11-full: Pulling from rasa/rasa
f3ef4ff62e0d: Pulling fs layer
5aa143346b89: Pulling fs layer
234da6dec324: Pulling fs layer
7c919f225533: Pulling fs layer
9a51dd5915bd: Pulling fs layer
84c4f4b996f9: Pulling fs layer
4f4fb700ef54: Pulling fs layer
b2bce042717c: Pulling fs layer
7c919f225533: Waiting
9a51dd5915bd: Waiting
84c4f4b996f9: Waiting
4f4fb700ef54: Waiting
b2bce042717c: Waiting
234da6dec324: Verifying Checksum
234da6dec324: Download complete
7c919f225533: Verifying Checksum
7c919f225533: Download complete
f3ef4ff62e0d: Verifying Checksum
f3ef4ff62e0d: Download complete
5aa143346b89: Verifying Checksum
5aa143346b89: Download complete
9a51dd5915bd: Verifying Checksum
9a51dd5915bd: Download complete
4f4fb700ef54: Verifying Checksum
4f4fb700ef54: Download complete
b2bce042717c: Verifying Checksum
b2bce042717c: Download complete
f3ef4ff62e0d: Pull complete
5aa143346b89: Pull complete
234da6dec324: Pull complete
7c919f225533: Pull complete
9a51dd5915bd: Pull complete
84c4f4b996f9: Verifying Checksum
84c4f4b996f9: Download complete
84c4f4b996f9: Pull complete
4f4fb700ef54: Pull complete
b2bce042717c: Pull complete
Digest: sha256:cf7557a4f796dd4fa35ff0c6a7176afa588a3d7c05a862a2f2fe3be5d4d04e01
Status: Downloaded newer image for rasa/rasa:2.8.11-full
/opt/venv/lib/python3.8/site-packages/rasa/shared/utils/io.py:97: UserWarning: Loading domain from 'domain.yml' failed. Using empty domain. Error: 'Failed to load domain specification from '/app/domain.yml'. File not found!'
1 Like