Closed schmmd closed 5 years ago
Do the sniff tests actually give us anything? Given that the ELMo sniff tests are our four longest tests by a very big margin, I wonder if we can do something to just get rid of them. I think these tests have two purposes: (1) make sure that the models backing our demo still work, and (2) make sure that current code can still run old models.
I think tests for (1) should be in the demo repository, not here, and we could do (2) with a much faster test that uses a simple test fixture.
as someone who is currently mucking with the ELMo code itself, the sniff tests give me a lot! 😀
that doesn't mean they need to run every commit though.
Not taking a particular position here, but it's easy to exclude them, e.g.:
exit_code = pytest.main([test_dir, '--color=no', '-k', 'not sniff_test and not notebooks_test',
'-m', 'not java'])
@joelgrus, that's fair, I'm just wondering if we could get the same value out of tests that run much faster. If we can't, we should definitely keep them.
Some more timings:
build-docs
70s (locally) 97s (TC)
mypy
25s (locally) 37s (TC)
pylint
163s (locally) 240s (TC)
So I'm pretty sure some of the time difference is due to the cloud VMs--although the amount of difference is surprising to me. Some of the pylint slowdown could be because it's using 4 threads locally but, if many jobs are running at once, the multithreading will actually slow things down on the shared server. It takes 245s
if jobs=1
locally.
Given the last comment here, I'm not sure there's much we can do about this, so I'm going to close it. @schmmd, feel free to re-open if you disagree.
We moved to TeamCity in part because tests ran much faster than than on Travis, but they are still running twice as slowly as locally.
CI:
Locally:
Initially I was concerned that downloading models slowed down the sniff test significantly, but the above data doesn't show that. We still could mount the cache directory when we run tests, which would avoid duplicate downloads--although it's not clear how much we would gain.