-
Notifications
You must be signed in to change notification settings - Fork 51
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
Use CUDA version ranges in release selector. #524
Conversation
✅ Deploy Preview for docs-rapids-ai ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
ae6c328
to
5a60880
Compare
@jarmak-nv @jakirkham Can you review and play with the site preview to see if this works like you expect? I tried to get one button for conda to have CUDA 12.0-12.2 that would change to 12.0-12.5 when enabling nightlies but I didn't want to mess with any more of this selector logic at the moment. |
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.
Thanks Bradley! 🙏
Wonder if we can generalize this a bit to simplify the updating cycle for new CUDA versions
Took a first pass at this below, but likely more needs to change (like Docker). Also there may be better ways to capture the same logic (like a bool
variable that simply states whether nightly and stable versions match)
_includes/selector.html
Outdated
@@ -371,8 +380,9 @@ | |||
|
|||
// all possible values | |||
python_vers: ["3.9", "3.10", "3.11"], | |||
cuda_vers: ["11.2", "11.8", "12.0", "12.2", "12.5"], | |||
pip_cuda_vers: ["11.2 - 11.8", "12"], | |||
conda_cuda_vers: ["11.4 - 11.8", "12.0 - 12.2", "12.0 - 12.5"], |
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.
conda_cuda_vers: ["11.4 - 11.8", "12.0 - 12.2", "12.0 - 12.5"], | |
conda_cuda_vers: ["11.4 - 11.8", "12.0 - 12.2", "12.0 - 12.5"], | |
conda_cuda_ver_nightly: "12.0 - 12.5", | |
// TODO: Change to "12.0 - 12.5" once RAPIDS 24.08 releases | |
conda_cuda_ver_stable: "12.0 - 12.2", |
_includes/selector.html
Outdated
// Remove once stable releases support CUDA 12.5 | ||
if (this.active_release === "Stable" && this.active_conda_cuda_ver === "12.0 - 12.5") { | ||
this.active_conda_cuda_ver = "12.0 - 12.2"; | ||
} | ||
if (this.active_release === "Stable" && this.active_docker_cuda_ver === "12.5") { | ||
this.active_docker_cuda_ver = "12.2"; |
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.
// Remove once stable releases support CUDA 12.5 | |
if (this.active_release === "Stable" && this.active_conda_cuda_ver === "12.0 - 12.5") { | |
this.active_conda_cuda_ver = "12.0 - 12.2"; | |
} | |
if (this.active_release === "Stable" && this.active_docker_cuda_ver === "12.5") { | |
this.active_docker_cuda_ver = "12.2"; | |
if (this.active_release === "Stable" && this.active_conda_cuda_ver === this.conda_cuda_ver_nightly) { | |
this.active_conda_cuda_ver = this.conda_cuda_ver_nightly; | |
} | |
if (this.active_release === "Stable" && this.active_docker_cuda_ver === "12.5") { | |
this.active_docker_cuda_ver = "12.2"; |
_includes/selector.html
Outdated
// Remove once stable releases support CUDA 12.5 | ||
if (this.active_release === "Stable" && cuda_version.includes("12.5")) isDisabled = true; |
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.
// Remove once stable releases support CUDA 12.5 | |
if (this.active_release === "Stable" && cuda_version.includes("12.5")) isDisabled = true; | |
if (this.active_release === "Stable" && cuda_version == conda_cuda_ver_nightly) isDisabled = (conda_cuda_ver_stable != conda_cuda_ver_nightly); |
_includes/selector.html
Outdated
@@ -789,7 +808,7 @@ | |||
return; | |||
} | |||
this.active_additional_packages = [...this.active_additional_packages, package]; | |||
if (this.active_additional_packages.includes("TensorFlow") && (this.active_cuda_ver !== "12.0")) this.active_cuda_ver = "12.0"; | |||
if (this.active_additional_packages.includes("TensorFlow") && (!this.active_conda_cuda_ver.includes("12.0"))) this.active_conda_cuda_ver = "12.0 - 12.2"; |
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.
if (this.active_additional_packages.includes("TensorFlow") && (!this.active_conda_cuda_ver.includes("12.0"))) this.active_conda_cuda_ver = "12.0 - 12.2"; | |
if (this.active_additional_packages.includes("TensorFlow") && (!this.active_conda_cuda_ver.includes("12.0"))) this.active_conda_cuda_ver = this.conda_cuda_ver_stable; |
Logic seems good, no issues after lots of clicks/testing. I think having both 12.0-12.2 and 12.0-12.5 buttons is a bit awkward though. While I like the specificity of ranges, I think I'm still lightly in favor of just |
If we don't show the version ranges on the buttons, where do we specify these ranges? |
ec821ee
to
3a6e9a5
Compare
c99bd91
to
c68ec79
Compare
@jakirkham Glad this is going in the right direction -- I'm still working on some improvements, and I'm using CI as my test for website rendering. I may push some commits that don't work. I will let you know when this is ready for a final look. |
@jakirkham @jarmak-nv I think this is ready to review. |
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.
Thanks Bradley! 🙏
Played around with the install selector. Liked the ergonomics of these improvements. Also felt like it was clear from a user perspective what they were getting. Not to mention they could further refine it if needed (like picking a specific CUDA version or working with other dependencies that have such constraints). Tried various combinations of selections to make sure the output was looking as expected
Think it is great that the code is being generalized so that we have fewer hard-coded versions in it. That will only benefit us longer term
Noted a couple spots that still have some hard-coding (likely not a focus on the recent revisions). Am curious if there are ways we can turn those into variables as well. Would be interested to hear your thoughts on this 🙂
var cuda_version_info = { | ||
"Stable": { | ||
"11": ["11.4", "11.8"], | ||
"12": ["12.0", "12.2"] | ||
}, | ||
"Nightly": { | ||
"11": ["11.4", "11.8"], | ||
"12": ["12.0", "12.5"] | ||
} | ||
}; |
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.
Wonder if we can collect this info next to the "all possible values" section. That way there would be one place to change all of the versions
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 struggled with this. I don't know why, but I couldn't get the JavaScript to work happily when I did that. See my attempt here (I force-pushed it out of the history for this PR since it wasn't going well): 3a6e9a5
if (this.active_release === "Stable" && this.active_docker_cuda_ver === "12.5") { | ||
this.active_docker_cuda_ver = "12.2"; | ||
} |
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.
What do you think about capturing 12.5
& 12.2
in variables in the "all possible values" section?
Perhaps we could do something like...?
if (this.active_release === "Stable" && this.active_docker_cuda_ver === "12.5") { | |
this.active_docker_cuda_ver = "12.2"; | |
} | |
if (this.active_release === "Stable" && this.active_docker_cuda_ver === this.nightly_docker_cuda_ver) { | |
this.active_docker_cuda_ver = this.stable_docker_cuda_ver; | |
} |
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.
Could we leave this for a later PR? I think this ties in with the above thread, where I struggled to get a "structured" JSON format to work.
@@ -673,8 +702,7 @@ | |||
}, | |||
disableUnsupportedCuda(cuda_version) { | |||
var isDisabled = false; | |||
if (this.active_additional_packages.includes("TensorFlow") && (cuda_version !== "12.0")) isDisabled = true; | |||
if (this.active_method === "Docker" && cuda_version < "11.8") isDisabled = true; | |||
if (this.active_additional_packages.includes("TensorFlow") && (!cuda_version.startsWith("12"))) isDisabled = true; | |||
if (this.active_release === "Stable" && cuda_version === "12.5") isDisabled = true; |
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.
Curious if we could use a variable for 12.5
here as well
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.
Could we leave this for a later PR? I think this ties in with the above thread, where I struggled to get a "structured" JSON format to work.
Yeah that's the challenge, my thought is that the selector should not be the main way of communicating what ranges of CUDA 12 the user can install alongside RAPIDS, but it does serve that purpose. Ranges work for this and the current implementation looks very nice/clean so I'm happy here. I like how this works and the back-end changes! Thanks @bdice Only concern is we no longer highlight that the nightly has a higher CUDA version available than the stable. Not sure if there's a straightforward path to resolve this or if it's a big deal. Also on testing I noticed something I think might be considered undesirable, when selecting I think its controlled by the code here: |
I am leaning towards "this is not a big deal." I think most users are happy as long as some CUDA minor version for the selected major version works with their environment. |
I will revisit this in a follow-up PR. I have a solution in mind but I think this PR is in a fairly complete state and would be better to merge as is. |
Agreed. The window where these differ is usually short. So don't think it is worth the effort |
FWIW am ok merging and iterating in follow ups. This feels like a substantial improvement |
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.
FWIW am ok merging and iterating in follow ups. This feels like a substantial improvement
Same! Thanks @bdice
Thank you both! 🙏 |
This PR uses CUDA version ranges in the release selector. This follows from discussions in #522.