diff --git a/.github/workflows/checkTrainingParams.yml b/.github/workflows/checkTrainingParams.yml new file mode 100644 index 0000000..e4048df --- /dev/null +++ b/.github/workflows/checkTrainingParams.yml @@ -0,0 +1,99 @@ +name: Check Training Parameters + +on: + pull_request: + branches: [ main ] + paths: + - 'XPointMLTest.py' # Only trigger when this specific file changes + +jobs: + check-training-params: + runs-on: ubuntu-latest + steps: + - name: Checkout PR code + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + path: pr-code + fetch-depth: 1 + + - name: Checkout main branch + uses: actions/checkout@v3 + with: + ref: main + path: main-code + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + + - name: Run parameter check + run: | + python - < {pr_params[param]}") + mismatch = True + else: + print(f"✅ Parameter '{param}' unchanged: {main_params[param]}") + else: + print(f"⚠️ Could not compare '{param}' - missing from one or both branches") + +# Summary +print("\n=== Parameter Check Summary ===") +if mismatch: + print("❌ Training parameters have been modified!") + print("Detected changes to training configuration parameters.") + print("Please verify these changes are intentional and approved.") + sys.exit(1) +else: + print("✅ All training parameters match the main branch!") + sys.exit(0) +EOF