<commit_before>---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Install python-pip (yum)
  yum:
    pkg: "{{ python_pip_package }}"
    state: "latest"
  register: install_packages
  until: install_packages|success
  retries: 5
  delay: 2
  when:
    - ansible_pkg_mgr == 'yum'

- name: Install python-pip (apt)
  apt:
    pkg: "{{ python_pip_package }}"
    state: "latest"
  register: install_packages
  until: install_packages|success
  retries: 5
  delay: 2
  when:
    - ansible_pkg_mgr == 'apt'

- name: Install required pip packages
  pip:
    name: "{{ pip_packages | map('quote') | join (' ') }} {{ pip_required_pip_packages | map('quote') | join(' ') }}"
    state: latest
    extra_args: "--upgrade --force-reinstall"
  register: install_packages
  until: install_packages|success
  retries: 5
  delay: 2
<commit_msg>Added fall back mode to binary install<commit_after>---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Install python-pip (yum)
  yum:
    pkg: "{{ python_pip_package }}"
    state: "latest"
  register: install_packages
  until: install_packages|success
  retries: 5
  delay: 2
  when:
    - ansible_pkg_mgr == 'yum'

- name: Install python-pip (apt)
  apt:
    pkg: "{{ python_pip_package }}"
    state: "latest"
  register: install_packages
  until: install_packages|success
  retries: 5
  delay: 2
  when:
    - ansible_pkg_mgr == 'apt'

- name: Install pip packages and upgrade
  pip:
    name: "{{ pip_packages | map('quote') | join (' ') }}"
    state: latest
    extra_args: "--upgrade --force-reinstall"
  ignore_errors: true
  register: install_packages
  until: install_packages|success
  retries: 5
  delay: 2

- name: Install pip packages and upgrade (fall back mode)
  pip:
    name: "{{ pip_packages | map('quote') | join (' ') }}"
    state: latest
    extra_args: "--upgrade --force-reinstall --isolated"
  when: install_packages | failed
  register: install_packages
  until: install_packages|success
  retries: 5
  delay: 2

- name: Install required pip packages
  pip:
    name: "{{ pip_required_pip_packages | map('quote') | join(' ') }}"
    state: latest
    extra_args: "--upgrade --force-reinstall"
  ignore_errors: true
  register: install_packages_required
  until: install_packages_required|success
  retries: 5
  delay: 2

- name: Install required pip packages (fall back mode)
  pip:
    name: "{{ pip_required_pip_packages | map('quote') | join(' ') }}"
    state: latest
    extra_args: "--upgrade --force-reinstall --isolated"
  when: install_packages_required | failed
  register: install_packages_required
  until: install_packages_required|success
  retries: 5
  delay: 2

{'fraction_non_alphanumeric': 0.10678830158304266, 'fraction_numerical': 0.009122618728199625, 'mean_word_length': 3.730964467005076, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2232951', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1123, 'n_words': 392}