-
Notifications
You must be signed in to change notification settings - Fork 348
split testing libraries from run libraries in dependencies.yaml #5447
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
base: main
Are you sure you want to change the base?
Changes from 5 commits
f2ad392
95876ce
32ad84c
93b937c
868717c
7b47244
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -62,6 +62,16 @@ files: | |||||||
| - depends_on_libcugraph | ||||||||
| - depends_on_libcugraph_etl | ||||||||
| - depends_on_libcugraph_tests | ||||||||
| run_notebooks: | ||||||||
| output: none | ||||||||
| includes: | ||||||||
| - cuda_version | ||||||||
| - py_version | ||||||||
| - run_notebooks | ||||||||
| - depends_on_cudf | ||||||||
| - depends_on_cugraph | ||||||||
jameslamb marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
| - depends_on_pylibcugraph | ||||||||
| - depends_on_libcugraph | ||||||||
| test_notebooks: | ||||||||
| output: none | ||||||||
| includes: | ||||||||
|
|
@@ -474,8 +484,8 @@ dependencies: | |||||||
| - output_types: [conda, requirements] | ||||||||
| packages: | ||||||||
| - certifi | ||||||||
| - ipython | ||||||||
| - notebook>=0.5.0 | ||||||||
| - &ipython ipython | ||||||||
| - ¬ebook notebook>=0.5.0 | ||||||||
| test_python_common: | ||||||||
| common: | ||||||||
| - output_types: [conda, pyproject, requirements] | ||||||||
|
|
@@ -485,17 +495,30 @@ dependencies: | |||||||
| - pytest-benchmark | ||||||||
| - pytest-cov | ||||||||
| - pytest-xdist | ||||||||
| - scipy | ||||||||
| - &scipy scipy | ||||||||
| test_python_cugraph: | ||||||||
| common: | ||||||||
| - output_types: [conda, pyproject, requirements] | ||||||||
| packages: | ||||||||
| - certifi | ||||||||
| - networkx>=2.5.1 | ||||||||
| - &networkx networkx>=2.5.1 | ||||||||
| - *numpy | ||||||||
| - packaging | ||||||||
| - python-louvain | ||||||||
| - scikit-learn>=0.23.1 | ||||||||
| # Runtime dependencies for cuGraph notebooks tested in CI. | ||||||||
| # Also used in the rapidsai/notebooks Docker image. | ||||||||
| # Only lists packages that are directly imported in notebooks. | ||||||||
| run_notebooks: | ||||||||
| common: | ||||||||
| - output_types: [conda] | ||||||||
| packages: | ||||||||
| - *ipython | ||||||||
| - *networkx | ||||||||
| - *notebook | ||||||||
| - *pandas | ||||||||
| - python-louvain | ||||||||
|
||||||||
| - python-louvain | |
| - *python_louvain |
To avoid duplication, let's make this one a reference to a YAML anchor and change the one here:
Line 497 in 2d4d604
| - python-louvain |
to
- &python_louvain python-louvainI know it doesn't REALLY matter right now since they're both unconstrained, but that reduces the risk of missing a reference if a future PR adds constraints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I ignored it as it was unconstrained, but makes sense to add it to make it future proof.
I added the anchor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do like creating a new top-level list called just
run_notebooks, but think it's confusing to see anything namedtest_*showing up in this list, especially to see something calledtest_notebookshowing up inrun_notebookswhen there is also atest_notebooks.I have an alternative proposal that I think might make this a bit easier to maintain and understand, let me know what you think:
test_python_commoncompletely unchangeddependencies:calledrun_notebooks. Add to that list only packages that are needed for the notebooks and aren't already runtime dependencies ofcugraph,pylibcugraph, andlibcugraph. Use YAML anchors to reference other things already independencies.yaml. Add a code comment above it explaining its purpose.run_notebookslist here containcuda_version,py_version,run_notebooks, and thedepends_on_*cugraphgroups--file-key test_notebooks --file-key run_notebookshere https://github.com/rapidsai/docker/blob/2637556074567056aa69a7cb1850ac844ef89748/context/notebooks.sh#L34 (multiple--file-keyare allowed)That way, we could fine-tune this to exactly the libraries that are needed and nothing else, and the purpose will be clear.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jameslamb I'm pretty clear on everything until step 3.
In step 4 however, we would need a
if-elifstatement to use only therun_notebooksfile-key forcugraphright?If the
test-notebookskey is added, then dependency lists from both keys would be merged, bringing in unwanted libraries likepytestagain.Something like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I wasn't thinking about the fact that
test_notebooksis still the key in the other repos.Yes we'll need different keys for different repos, but let's make the code much stricter than it is today and just hard-code that expectation directly.
Something like:
That'll fail with a big loud error (instead of silently passing) if any of our expectations aren't met, like:
dependencies.yaml(<-- this would also catch being in the wrong working directory)We're only doing this testing for 3 repos there, let's go with specific and strict over generic and permissive, to give ourselves a better chance of catching bugs at the source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, that sounds good!
I've made the changes on both this PR and the rapidsai/docker#853 PR on Docker.