Skip to content

Fix missing import for load_numpy_array_data in MLflow section #1

Fix missing import for load_numpy_array_data in MLflow section

Fix missing import for load_numpy_array_data in MLflow section #1

Workflow file for this run

name: Network Security CI/CD
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
- name: Run tests
run: |
pytest --cov=networksecurity
- name: Upload coverage report
uses: codecov/codecov-action@v1
dvc-tracking:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
- name: Setup DVC
uses: iterative/setup-dvc@v1
- name: Configure DAGsHub credentials
run: |
echo "machine dagshub.com login austinLorenzMccoy password ${{ secrets.DAGSHUB_TOKEN }}" > $HOME/.netrc
chmod 600 $HOME/.netrc
- name: Pull DVC data
run: |
dvc remote add origin https://dagshub.com/austinLorenzMccoy/networkSecurity_project.dvc
dvc pull
- name: Run DVC pipeline
run: dvc repro
- name: Push DVC results
run: dvc push
- name: Log metrics to DAGsHub
run: |
pip install dagshub
python -c "from dagshub import dagshub_logger; dagshub_logger(metrics_path='reports/direct_training_metrics.json')"
env:
DAGSHUB_USER: austinLorenzMccoy
DAGSHUB_REPO: networkSecurity_project