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

Smoke test #346

Merged
merged 27 commits into from
Nov 25, 2019
Merged

Smoke test #346

merged 27 commits into from
Nov 25, 2019

Conversation

mingbowan
Copy link
Contributor

@mingbowan mingbowan commented Nov 20, 2019

Adding smoke test after nightly build and upload. Currently the scope is limited to Linux. The test environment is a docker container that has all Python versions we need with dependencies installed.
This PR also added docker image builder, which will build a new image every week. But we need to manually pick one for smoke test.

we only test "import torchaudio" at the moment.

@mingbowan mingbowan changed the title [TEST DON'T MERGE] Smoke test Smoke test Nov 22, 2019
@vincentqb
Copy link
Contributor

In the circle ci test below, there are binary_linux_conda_, binary_macos_wheel_. Could we add a python -c "import torchaudio" add the end and get the same information without having to regenerate the binaries? More generally, we could add an option to run smoke tests after each compilation instead. Thoughts?

@mingbowan
Copy link
Contributor Author

not sure about the "having to regenerate the binaries" part. we should only build once, and if it's nightlies, we upload output, then run smoke test.

…ker image which can make nightlies installed via pip pass
README.md Outdated

```
pip install numpy
pip install future # only on python2.7
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: space missing: python 2.7

command: |
set -x
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
conda install -y -c pytorch-nightly torchaudio
Copy link
Contributor

Choose a reason for hiding this comment

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

The PyTorch smoketests fix the version date, so they fail if the nightlies failed. Should we do that here? (I'm indifferent, just pointing out the discrepancy)

Copy link
Contributor

Choose a reason for hiding this comment

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

Another option is to have the smoke test not run if the nightlies fail? Or do you have another suggestion?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not 100% sure how conda will resolve target versions, if it picks the latest version, then test here might still make sense. I'll spend sometime looking into this later

docker_build:
triggers:
- schedule:
cron: "0 10 * * 0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Reminder that cron jobs don't get access to environment variables in secret contexts. If you want to do jobs with access to them, you have to do the Chronos triggered push trick

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OMG!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks like circleCI fix this:

https://circleci.com/workflow-run/7dc8be6a-9d61-4b14-b6cb-7394f32245f1

the docker build job is triggered by cron and credentials got passed in

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I disagree with your assessment of the job. Look at https://app.circleci.com/jobs/github/pytorch/pytorch/3712495 and expand "Spin up Environment". None of the environment variables mentioned are those from the context https://circleci.com/gh/organizations/pytorch/settings#contexts/2b885fc9-ef3a-4b86-8f5a-2e6e22bd0cfe

Maybe these smoketests don't actually need the secrets from the context, which is why everything is OK. But just FYI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, so what I used is environment variable, which is define here: https://circleci.com/gh/pytorch/audio/edit#env-vars , it's different than context


```
pip install numpy
pip install future # only on python 2.7
pip install six # only on python 3.5
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm surprised we have to add the dependencies explicitly :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure why pip didn't do that, my tests showed I have to install them manually.


FROM ubuntu:latest

RUN apt-get -qq update && apt-get -qq -y install curl bzip2 \
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider putting this in a shell script?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd prefer to use current format since there are just list of commands, no complex logic, still very readable to me.


ENV PATH /opt/conda/bin:$PATH

RUN apt update
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you want apt update as its own RUN, as this will create a layer that has all of the apt metadata included (but generally we want to make sure this data doesn't show up in the docker image, as it's just bloat and thwarts caching)

Copy link
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

Looks legit. Is this based off of some of the existing Docker in builder? Good to add a reference in that case.

Copy link
Contributor

@vincentqb vincentqb left a comment

Choose a reason for hiding this comment

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

LGTM

@vincentqb
Copy link
Contributor

As a possible future smoke test, it'd be good to verify that the tutorial can run.

@mingbowan
Copy link
Contributor Author

Looks legit. Is this based off of some of the existing Docker in builder? Good to add a reference in that case.

no, new docker from scratch

@mingbowan mingbowan merged commit 89a108c into pytorch:master Nov 25, 2019
@mingbowan mingbowan deleted the smoke_test branch November 25, 2019 18:56
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.

None yet

3 participants