Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update maint/build tools #50

Merged
merged 42 commits into from
May 1, 2020
Merged

Update maint/build tools #50

merged 42 commits into from
May 1, 2020

Conversation

mloning
Copy link
Contributor

@mloning mloning commented Apr 24, 2020

Reference issues

#28

Summary

  • Updates binder requirements
  • Updates GitHub PR/issue templates
  • Adds linting based on flake8 to check code quality
  • Adds CI on Azure DevOps
  • Adds testing/building for macOS and Windows
  • Adds CHANGELOG.md
  • Adds Makefile and script for maintenance tasks and release process
  • Reports coverage and test results on Azure DevOps project website

Comments

  • For Python 3.6, we haven't released any built wheels for sktime and we need to build them too when we build sktime-dl, which is why we currently require Cython. With the new sktime release, we'll no longer need Cython as a build dependency.

To do

  • Fix issues with Python 3.6 with TensorFlow 1.9 (see below)
  • Enforce linting (you can see the report here or pip install and run flake8 in the root directory)

@mloning
Copy link
Contributor Author

mloning commented Apr 24, 2020

For Python 3.6 with TensorFlow 1.9 both the Linux and macOS tests cause a Fatal Python error: Aborted for the MCDCNN classifier. For Linux, this passes on travis. It also passes when I run it locally on macOS.

Thread 0x00007feff2736740 (most recent call first):
File "/usr/share/miniconda/envs/testenv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1451 in call
File "/usr/share/miniconda/envs/testenv/lib/python3.6/site-packages/tensorflow/python/keras/backend.py", line 2897 in call
File "/usr/share/miniconda/envs/testenv/lib/python3.6/site-packages/tensorflow/python/keras/engine/training_arrays.py", line 253 in fit_loop
File "/usr/share/miniconda/envs/testenv/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 1348 in fit
File "/home/vsts/work/1/s/sktime_dl/deeplearning/mcdcnn/_classifier.py", line 172 in fit

  • Any idea how to fix this?
  • Do we still want to support Python 3.6 with TensorFlow 1.9?
  • We could leave them to run on travis

@mloning mloning added this to the v0.2.0 milestone Apr 24, 2020
@mloning mloning linked an issue Apr 24, 2020 that may be closed by this pull request
Copy link
Collaborator

@Withington Withington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I've not used Azure Pipelines before.

I'd be happy to have sktime-dl support only TensorFlow 2. TF1 depends upon standalone keras and support for that ended in April 2020 .

Can we switch to use only Azure and not both Azure and Travis, to avoid duplication of sections of yml files?

Azure code coverage can't be rendered, it says "Please verify that "Report Directory" containing an HTML report was specified when publishing code coverage."

set -x # print executed commands to the terminal

pytest -m="not slow" --verbose --showlocals --durations=20 --junitxml=junit/test-results.xml --cov=sktime_dl --pyargs ../sktime_dl

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider removing "not slow" and running all of the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How long do they need? We could consider always running them on azure?

@mloning
Copy link
Contributor Author

mloning commented Apr 25, 2020

  • I could refactor the .travis.yml to use the same bash scripts as azure if we want to keep travis for the failing tests or as a back-up. I've seen this before that things work on one CI service but not the other ...
  • I can try to set up the task to publish coverage results

@mloning
Copy link
Contributor Author

mloning commented Apr 26, 2020

  • I've figured out where the error comes from: Python 3.6 with TensorFlow 1.9 only works on Ubuntu 16.14 (xenial) and macOS Mojave, but not the latest OS versions. @james-large what's your opinion? Shall we still test these versions?
  • I've refactored .travis.yml to use the same build and test scripts.
  • Coverage results are now published on our project page on Azure DevOps.

@mloning mloning marked this pull request as ready for review April 27, 2020 08:08
@james-large
Copy link
Contributor

james-large commented Apr 28, 2020

Hmm, certainly don't have to support (or test) tf1.9 by any means. The test was mainly there as a proof that we are backwards compatible that far in case people do still want to use it (for better or worse), but if it varies even by linux versions (let alone windows/macOS), it's likely worth just dropping.

There is a reasonable argument to be made for thoroughly testing most recent tf versions only and leaving it up to the user to figure out if they want to keep older installations, with guidelines in text that as far back as 1.9 is compatible in principle but maybe not in practice

@mloning
Copy link
Contributor Author

mloning commented Apr 28, 2020

Okay, I make sure we test on the most recent TF and OS versions, will push final changes some time later this week.

@james-large
Copy link
Contributor

This is good stuff

Looking through the Azure DevOps CI, what (on a high level) are the pros/cons to having both the Azure and Travis checks? On-the-surface redundancy can be useful like you say before, more tests on different platforms can reveal different problems. Assuming they're run in parallel as well then presumably the main cost is just maintenance of two CI systems instead of one?

.binder/requirements.txt Outdated Show resolved Hide resolved
maint_tools/make_release.py Outdated Show resolved Hide resolved
@mloning
Copy link
Contributor Author

mloning commented Apr 30, 2020

  • Yes, but maintenance of both shouldn't add too much extra work, as they use the same scripts for building and testing. I've added azure dev ops because they offer a better service on their free tier (more parallel builds, unlimited minutes), I also like their syntax and available predefined functionality compared to travis.
  • travis now runs everything on ubuntu-16.14 (xenial), azure pipelines runs the latest OS versions, and only for TF 1.9 the previous ubunutu and macOS versions.

So, from my side, this PR is good to go.

Once this is merged, I was thinking of opening another PR to clean up any code style violations and enforce PEP8 on azure pipelines, what do you think?

@james-large
Copy link
Contributor

Fair dos, yep will merge. I'd be happy with enforcing PEP8, don't know about other people's environments, but for me adhering it it is fine, a couple of old commit have been me just going through and enforcing it on all files via the IDE

@james-large james-large merged commit 9f90a60 into dev May 1, 2020
@Withington
Copy link
Collaborator

Yes, happy to work to PEP8.

@TonyBagnall TonyBagnall deleted the ci branch June 17, 2021 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

macOS and Windows environments on travis tests
3 participants