#!/bin/bash
# run_inference.sh – Run inference on the saved model using inference.py

# Set the wandb project (if used)
export WANDB_PROJECT="stlm-logic-reasoning"

# REMEMBER TO CHANGE THE INSTRUCTION MODEL SETTING!!!!!!

# ---------------------------
# Experiment Configuration
# ---------------------------
# Set the model path (where your saved model is located)
# MODEL_PATH="/mnt/data/data/stlm-logic/checkpoints/openai-community-gpt2_random-80-10-10_legal_move_natural/checkpoint-1700"  # or the path to your saved model
# MODEL_PATH="/mnt/data/data/stlm-logic/checkpoints/openai-community-gpt2_random-80-10-10_legal_move_natural_Updated-delimiter-for-answer/checkpoint-1200"
# MODEL_PATH="/mnt/data/data/stlm-logic/checkpoints/openai-community-gpt2_random-80-10-10_legal_move_move_seq_special_Updated-delimiter-for-answer/checkpoint-1300"

# MODEL_PATH="/mnt/data/data/stlm-logic/checkpoints/meta-llama-Llama-3.2-1B-Instruct_random-80-10-10_legal_move_move_seq_special_baseline-expts/checkpoint-6800"

# MODEL_PATH="/mnt/data/data/stlm-logic/checkpoints/distilbert-distilgpt2_random-80-10-10_legal_move_move_seq_special_baseline-expts/checkpoint-14000"

# Zero shot
MODEL_PATH="meta-llama/Llama-3.2-1B-Instruct"

# Set the test dataset path (pre-split JSON file)
TEST_DATASET_PATH="/mnt/data/data/stlm-logic/datasets/random_test_dataset_0.8_0.1_0.1.json"

INSTRUCTION_MODEL=True

# Set the experiment mode and representation mode (as defined in your DataArguments)
EXPERIMENT_MODE="legal_move"       # Options: legal_move, best_move
REPRESENTATION_MODE="move_seq_explained"      # Options: ascii, natural, move_seq_explained, move_seq_special

# Inference parameters
MAX_NEW_TOKENS=4
BATCH_SIZE=2

# ---------------------------
# Run Inference
# ---------------------------
python scripts/python/inference.py \
  --model_path "$MODEL_PATH" \
  --test_dataset_path "$TEST_DATASET_PATH" \
  --experiment_mode "$EXPERIMENT_MODE" \
  --representation_mode "$REPRESENTATION_MODE" \
  --max_new_tokens "$MAX_NEW_TOKENS" \
  --batch_size "$BATCH_SIZE" \
  --instruction_model $INSTRUCTION_MODEL \
  # --constrained True
