https://github.com/GPflow/GPflow
Revision 5d6336f1d9d62fd4a3fc144d36a65c3c9d344890 authored by Artem Artemev on 27 October 2019, 16:41:50 UTC, committed by Artem Artemev on 27 October 2019, 16:46:49 UTC
This PR updates the understanding/upper_bound.ipynb to work in gpflow2.

It fixes the upper_bound code in gpflow/models/sgpr.py and restores the original (tighter) test tolerance that had both been changed by commit 45efebc

The plots don't quite match up to what was in the GPflow1 version (nor does the tight bound in the 1-inducing-point example at the end), but otherwise this seems to work.
1 parent f650c7b
Raw File
Tip revision: 5d6336f1d9d62fd4a3fc144d36a65c3c9d344890 authored by Artem Artemev on 27 October 2019, 16:41:50 UTC
GPflow 2.0 notebook update: SGPR upper bound (#1116)
Tip revision: 5d6336f
config.yml
runtest: &runtest
  steps:
    - checkout
    - run:
        name: Install GPflow
        command: |
          pip install -U pip
          pip install -e .
          pip install -r tests_requirements.txt
    - run:
        name: Run tests
        command: |
          pytest -v -W ignore::UserWarning --durations=10 -m "${PYTEST_FILTER}" --cov=./gpflow ./tests
    - run:
        name: Upload coverage report
        command: |
          bash <(curl -s https://codecov.io/bash) -t "${CODECOV_TOKEN}"

version: 2.1

jobs:
  unit-test:
    <<: *runtest
    docker:
      - image: awav/tensorflow:2.0-preview
        environment:
          PYTEST_FILTER: not notebooks

  notebook-test:
    <<: *runtest
    docker:
      - image: awav/tensorflow:2.0-preview
        environment:
          PYTEST_FILTER: notebooks

  example-test:
    <<: *runtest
    docker:
      - image: awav/tensorflow:2.0-preview
        environment:
          PYTEST_FILTER: examples

  deploy:
    docker:
      - image: awav/tensorflow:2.0-preview
    steps:
      - checkout
      - run:
          name: Verify git tag vs. VERSION
          command: |
            VERSION="v$(cat VERSION | tr -d '\t\r\n ')"
            if [ "$VERSION" != "$CIRCLE_TAG" ]; then
              echo "The package version ($VERSION) and the latest tag version ($CIRCLE_TAG) are different"
              exit 1
            fi
      - run:
          name: Install twine
          command: |
            pip install twine
      - run:
          name: Init .pypirc
          command: |
            echo -e "[pypi]" >> ~/.pypirc
            echo -e "username = artemav" >> ~/.pypirc
            echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
      - run:
          name: Create pip package
          command: |
            python setup.py bdist_wheel sdist
      - run:
          name: Upload to PyPI
          command: |
            twine upload dist/*

workflows:
  version: 2.1
  build_test_and_deploy:
    jobs:
      - unit-test:
          filters:
            tags:
              only: /^v[0-9]+(\.[0-9]+)*/
      - notebook-test:
          filters:
            tags:
              only: /^v[0-9]+(\.[0-9]+)*/
      # - example-test:
      #     filters:
      #       tags:
      #         only: /^v[0-9]+(\.[0-9]+)*/
      # - deploy:
      #     requires:
      #       - unit-test
      #       - notebook-test
      #     filters:
      #       tags:
      #         only: /^v[0-9]+(\.[0-9]+)*/
      #       branches:
      #         ignore: /.*/
back to top