Testing Model 🤘 #97
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Model on main PR | |
| run-name: Testing Model 🤘 | |
| on: | |
| pull_request: | |
| branches: | |
| - main-testing | |
| workflow_dispatch: | |
| jobs: | |
| train_and_upload: | |
| name: Train and Upload Model | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.23.3 | |
| cache: false | |
| - name: Train Model | |
| uses: dagger/dagger-for-github@v6 | |
| with: | |
| verb: run | |
| args: go run pipeline.go | |
| version: "0.14.0" | |
| - name: Upload All Artifacts | |
| uses: actions/upload-artifact@v4.4.0 | |
| with: | |
| name: all-artifacts | |
| path: artifacts/ | |
| # - name: Upload Best Experiment | |
| # uses: actions/upload-artifact@v4.4.0 | |
| # with: | |
| # name: best_experiment | |
| # path: best_experiment.pkl | |
| # - name: Upload Best Model Artifact | |
| # uses: actions/upload-artifact@v4.4.0 | |
| # with: | |
| # name: model | |
| # path: model.pkl | |
| # - name: Upload Best Model Artifact | |
| # uses: actions/upload-artifact@v4.4.0 | |
| # with: | |
| # name: model | |
| # path: model.pkl | |
| - name: tree | |
| uses: jaywcjlove/github-action-folder-tree@main | |
| id: tree | |
| with: | |
| path: ./ | |
| depth: 3 | |
| test_model: | |
| needs: train_and_upload | |
| name: Unit Test Model Artifacts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: all-artifacts | |
| path: downloaded_artifacts/ | |
| - name: List downloaded artifacts | |
| run: | | |
| echo "Listing files in downloaded_artifacts directory:" | |
| ls -la downloaded_artifacts/ | |
| - name: Verify Artifacts | |
| run: | | |
| REQUIRED_FILES=("best_experiment.pkl" "cat_missing_impute.csv" "columns_drift.json" "columns_list.json" "date_limits.json" "lr_model.pkl" "model.pkl" "model_results.json" "outlier_summary.csv" "raw_data.csv" "scaler.pkl" "train_data.csv" "train_data_gold.csv" "xgboost_model.json" "xgboost_model.pkl") | |
| for file in "${REQUIRED_FILES[@]}"; do | |
| if [ -f "downloaded_artifacts/$file" ]; then | |
| echo "Found $file" | |
| else | |
| echo "Missing $file" | |
| exit 1 | |
| fi | |
| done | |
| echo "All required files are present." | |
| - name: Run Model Inference Test Action | |
| uses: PLtier/itu-sdse-project-model-validator@main |