Skip to content

Commit

Permalink
Merge branch 'main' into notebook-cuml-optuna-hpo
Browse files Browse the repository at this point in the history
  • Loading branch information
betatim committed Feb 28, 2023
2 parents a776a44 + 5704978 commit e0baa97
Show file tree
Hide file tree
Showing 17 changed files with 2,674 additions and 28 deletions.
9 changes: 9 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

build:
os: "ubuntu-20.04"
tools:
python: "mambaforge-4.10"

conda:
environment: conda/environments/deployment_docs.yml
31 changes: 23 additions & 8 deletions extensions/rapids_version_templating.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
def version_template(app, docname, source):
import re

from docutils import nodes


class TextNodeVisitor(nodes.SparseNodeVisitor):
def __init__(self, app, *args, **kwargs):
self.app = app
super().__init__(*args, **kwargs)

def visit_Text(self, node):
new_node = nodes.Text(re.sub(r"\{\{.*?\}\}", self.template_func, node.astext()))
node.parent.replace(node, new_node)

def template_func(self, match):
return self.app.builder.templates.render_string(
match.group(), self.app.config.rapids_version
)


def version_template(app, doctree, docname):
"""Substitute versions into each page.
This allows documentation pages and notebooks to substiture in values like
Expand All @@ -12,17 +32,12 @@ def version_template(app, docname, source):
"""

# Make sure we're outputting HTML
if app.builder.format != "html":
return
src = source[0]
rendered = app.builder.templates.render_string(src, app.config.rapids_version)
source[0] = rendered
doctree.walk(TextNodeVisitor(app, doctree))


def setup(app):
app.add_config_value("rapids_version", {}, "html")
app.connect("source-read", version_template)
app.connect("doctree-resolved", version_template)

return {
"version": "0.1",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions source/cloud/aws/sagemaker.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ mamba create -y -n rapids {{ rapids_conda_channels }} {{ rapids_conda_packages }
conda activate rapids
# optionally install AutoGluon for AutoML GPU demo
# anaconda3/envs/rapids/bin/python -m pip install --pre autogluon
# python -m pip install --pre autogluon
anaconda3/envs/rapids/bin/python -m ipykernel install --user --name rapids
python -m ipykernel install --user --name rapids
echo "kernel install completed"
EOF
```
Expand Down Expand Up @@ -68,7 +68,7 @@ All you’ll need to do is bring in your RAPIDS training script and libraries as

![Screenshot of summarized step to build Estimator](../../images/sagemaker-containerize-and-publish.png)

- Having built our container [ +custom logic], compile all efforts into an Estimator instance. Test the Estimator and run parallel hyperparameter optimization tuning jobs.
- Having built our container and custom logic, we can now assemble all components into an Estimator. We can now test the Estimator and run parallel hyperparameter optimization tuning jobs.

```python
estimator = sagemaker.estimator.Estimator(
Expand Down
4 changes: 2 additions & 2 deletions source/cloud/azure/azure-vm-multi.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ cluster = AzureVMCluster(
resource_group=resource_group,
vnet=vnet,
security_group=security_group,
subscription_id=security_group,
subscription_id=subscription_id,
location="westus2",
vm_size="Standard_NC12s_v3",
public_ingress=True,
disk_size=100,
n_workers=2,
worker_class="dask_cuda.CUDAWorker",
docker_image={{rapids_container}},
docker_image="{{rapids_container}}",
docker_args="-e DISABLE_JUPYTER=true -p 8787:8787 -p 8786:8786",
)
```
Expand Down
9 changes: 4 additions & 5 deletions source/cloud/gcp/dataproc.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ It is strongly recommended that you copy the initialization scripts into your ow
$ REGION=<region>
$ GCS_BUCKET=<bucket_name>
$ gcloud storage buckets create gs://$GCS_BUCKET
$ gsutil cp gs://goog-dataproc-initialization-actions-${REGION}/gpu/install_gpu_driver.sh,\
gs://goog-dataproc-initialization-actions-${REGION}/dask/dask.sh,\
gs://goog-dataproc-initialization-actions-${REGION}/rapids/rapids.sh\
gs://$GCS_BUCKET
$ gsutil cp gs://goog-dataproc-initialization-actions-${REGION}/gpu/install_gpu_driver.sh gs://$GCS_BUCKET
$ gsutil cp gs://goog-dataproc-initialization-actions-${REGION}/dask/dask.sh gs://$GCS_BUCKET
$ gsutil cp gs://goog-dataproc-initialization-actions-${REGION}/rapids/rapids.sh gs://$GCS_BUCKET

```

Expand All @@ -29,7 +28,7 @@ $ gcloud dataproc clusters create $CLUSTER_NAME\
--master-accelerator type=nvidia-tesla-t4,count=2\
--worker-machine-type n1-standard-32\
--worker-accelerator type=nvidia-tesla-t4,count=2\
--initialization-actions=$GCS_BUCKET/install_gpu_driver.sh,gs://$GCS_BUCKET/dask.sh,gs://$GCS_BUCKET/rapids.sh\
--initialization-actions=gs://$GCS_BUCKET/install_gpu_driver.sh,gs://$GCS_BUCKET/dask.sh,gs://$GCS_BUCKET/rapids.sh\
--initialization-action-timeout 60m\
--optional-components=JUPYTER\
--metadata gpu-driver-provider=NVIDIA,dask-runtime=$DASK_RUNTIME,rapids-runtime=DASK\
Expand Down
11 changes: 7 additions & 4 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@

versions = {
"stable": {
"rapids_container": "rapidsai/rapidsai-core:22.12-cuda11.5-runtime-ubuntu20.04-py3.9",
"rapids_container": "rapidsai/rapidsai-core:23.02-cuda11.5-runtime-ubuntu20.04-py3.10",
"rapids_conda_channels": "-c rapidsai -c conda-forge -c nvidia",
"rapids_conda_packages": "rapids=22.12 python=3.9 cudatoolkit=11.5",
"rapids_conda_packages": "rapids=23.02 python=3.10 cudatoolkit=11.5",
},
"nightly": {
"rapids_container": "rapidsai/rapidsai-core-nightly:23.02-cuda11.5-runtime-ubuntu20.04-py3.9",
"rapids_container": "rapidsai/rapidsai-core-nightly:23.04-cuda11.5-runtime-ubuntu20.04-py3.10",
"rapids_conda_channels": "-c rapidsai-nightly -c conda-forge -c nvidia",
"rapids_conda_packages": "rapids=23.02 python=3.9 cudatoolkit=11.5",
"rapids_conda_packages": "rapids=23.04 python=3.10 cudatoolkit=11.5",
},
}
rapids_version = (
Expand Down Expand Up @@ -67,6 +67,9 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
copybutton_prompt_is_regexp = True

# -- Options for notebooks -------------------------------------------------

nb_execution_mode = "off"
Expand Down
1 change: 1 addition & 0 deletions source/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ rapids-optuna-hpo/notebook
rapids-sagemaker-higgs/notebook
rapids-sagemaker-hpo/notebook
rapids-ec2-mnmg/notebook
rapids-autoscaling-multi-tenant-kubernetes/notebook
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# image-prepuller.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: prepull-rapids
spec:
selector:
matchLabels:
name: prepull-rapids
template:
metadata:
labels:
name: prepull-rapids
spec:
initContainers:
- name: prepull-rapids
image: us-central1-docker.pkg.dev/nv-ai-infra/rapidsai/rapidsai-core:22.12-cuda11.5-runtime-ubuntu20.04-py3.9
command: ["sh", "-c", "'true'"]
containers:
- name: pause
image: gcr.io/google_containers/pause
Loading

0 comments on commit e0baa97

Please sign in to comment.