<commit_before>name: sklearn

# A cron job to ensure autologging works properly in older versions of scikit-learn

on:
  schedule:
    # Run this action daily at 7:00 UTC
    - cron: "0 7 * * *"
  pull_request:
    branches:
      - master
    paths:
      - mlflow/sklearn/**

jobs:
  sklearn:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        version:
          # include this unsupported version to ensure autologging emits a warning properly.
          - "0.20.2"
          # unsupported versions
          # --------------------
          # supported versions
          - "0.20.3"
          - "0.21.2"
          - "0.22.2"
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: "3.6"
      - name: Install dependencies
        run: |
          pip install -e .
          pip install -r dev/small-requirements.txt
      - name: Update scikit-learn
        run: |
          pip install scikit-learn==${{ matrix.version }}
      - name: Run tests
        run: |
          pytest --verbose --large tests/sklearn/test_sklearn_autolog.py<commit_msg>Run sklearn autologging check against dev version for forwards compatibility (#3350)<commit_after>name: sklearn

# A cron job to ensure autologging works properly in older versions of scikit-learn

on:
  schedule:
    # Run this action daily at 7:00 UTC
    - cron: "0 7 * * *"
  pull_request:
    branches:
      - master
    paths:
      - .github/workflows/sklearn.yml
      - mlflow/sklearn/**

jobs:
  sklearn:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        version:
          # include this unsupported version to ensure autologging emits a warning properly.
          - "0.20.2"
          # unsupported versions
          # --------------------
          # supported versions
          - "0.20.3"
          - "0.21.2"
          - "0.22.2"
          # To ensure forwards compatibility
          - "git+https://github.com/scikit-learn/scikit-learn.git@master"
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: "3.6"
      - name: Install dependencies
        run: |
          pip install -e .
          pip install -r dev/small-requirements.txt
      - name: Update scikit-learn
        run: |
          ver="${{ matrix.version }}"
          op=$([[ "$ver" =~ ^git ]] && echo "@" || echo "==")
          pip install -U "scikit-learn $op $ver"
      - name: Check scikit-learn version
        run: |
          python -c "import sklearn; print(sklearn.__version__)"
      - name: Run tests
        run: |
          pytest --verbose --large tests/sklearn/test_sklearn_autolog.py
{'fraction_non_alphanumeric': 0.12026239067055394, 'fraction_numerical': 0.01967930029154519, 'mean_word_length': 1.6496138996138996, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4200869', 'n_tokens_mistral': 858, 'n_tokens_neox': 829, 'n_words': 224}