Skip to content

Commit 6c91bcd

Browse files
committed
Merge branch 'main' into ingress-ray-dashboard
2 parents 526e2d6 + 9dd4e3f commit 6c91bcd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+5021
-12438
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.ipynb linguist-detectable=false

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55

66
An intuitive, easy-to-use python interface for batch resource requesting, access, job submission, and observation. Simplifying the developer's life while enabling access to high-performance compute resources, either in the cloud or on-prem.
77

8-
Tutorial and basics walkthrough coming soon!
8+
For guided demos and basics walkthroughs, check out the following links:
9+
- Guided demo notebooks available [here](https://github.com/project-codeflare/codeflare-sdk/tree/main/demo-notebooks/guided-demos), and copies of the notebooks with [expected output](https://github.com/project-codeflare/codeflare-sdk/tree/main/demo-notebooks/guided-demos/notebook-ex-outputs) also available
10+
- Note that these notebooks will work with the latest `codeflare-sdk` PyPI release. For testing and experimentation with `main` branch, please use the [preview notebooks](https://github.com/project-codeflare/codeflare-sdk/tree/main/demo-notebooks/guided-demos/preview_nbs)
11+
- Additionally, we have a [video walkthrough](https://www.youtube.com/watch?v=U76iIfd9EmE) of these basic demos from June, 2023
912

1013
Full documentation can be found [here](https://project-codeflare.github.io/codeflare-sdk/)
1114

@@ -62,7 +65,7 @@ The following instructions apply when doing release manually. This may be requir
6265

6366
* Check and update the version in "pyproject.toml" file.
6467
* Generate new documentation.
65-
`pdoc --html -o docs src/codeflare_sdk && pushd docs && rm -rf cluster job utils && mv codeflare_sdk/* . && rm -rf codeflare_sdk && popd` (it is possible to install **pdoc** using the following command `poetry install --with docs`)
68+
`pdoc --html -o docs src/codeflare_sdk && pushd docs && rm -rf cluster job utils && mv codeflare_sdk/* . && rm -rf codeflare_sdk && popd && find docs -type f -name "*.html" -exec bash -c "echo '' >> {}" \;` (it is possible to install **pdoc** using the following command `poetry install --with docs`)
6669
* Commit all the changes to the repository.
6770
* Create Github release (https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release).
6871
* Build the Python package. `poetry build`

demo-notebooks/interactive/hf_interactive.ipynb renamed to demo-notebooks/additional-demos/hf_interactive.ipynb

+9-6
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@
5353
"metadata": {},
5454
"outputs": [],
5555
"source": [
56-
"# Create authentication object for oc user permissions and login\n",
56+
"# Create authentication object for user permissions\n",
57+
"# IF unused, SDK will automatically check for default kubeconfig, then in-cluster config\n",
58+
"# KubeConfigFileAuthentication can also be used to specify kubeconfig path manually\n",
5759
"auth = TokenAuthentication(\n",
5860
" token = \"XXXX\",\n",
5961
" server = \"XXXX\",\n",
60-
" skip_tls = True\n",
62+
" skip_tls = False\n",
6163
")\n",
6264
"auth.login()"
6365
]
@@ -88,13 +90,12 @@
8890
"# Create our cluster and submit appwrapper\n",
8991
"cluster = Cluster(ClusterConfiguration(name='hfgputest', \n",
9092
" namespace=\"default\",\n",
91-
" min_worker=1, \n",
92-
" max_worker=1, \n",
93+
" num_workers=1,\n",
9394
" min_cpus=8, \n",
9495
" max_cpus=8, \n",
9596
" min_memory=16, \n",
9697
" max_memory=16, \n",
97-
" gpu=4,\n",
98+
" num_gpus=4,\n",
9899
" image=\"quay.io/project-codeflare/ray:2.5.0-py38-cu116\",\n",
99100
" instascale=True, machine_types=[\"m5.xlarge\", \"p3.8xlarge\"]))"
100101
]
@@ -319,7 +320,9 @@
319320
"#install additional libraries that will be required for this training\n",
320321
"runtime_env = {\"pip\": [\"transformers\", \"datasets\", \"evaluate\", \"pyarrow<7.0.0\", \"accelerate\"]}\n",
321322
"\n",
322-
"ray.init(address=f'{ray_cluster_uri}', runtime_env=runtime_env)\n",
323+
"# NOTE: This will work for in-cluster notebook servers (RHODS/ODH), but not for local machines\n",
324+
"# To see how to connect from your laptop, go to demo-notebooks/additional-demos/local_interactive.ipynb\n",
325+
"ray.init(address=ray_cluster_uri, runtime_env=runtime_env)\n",
323326
"\n",
324327
"print(\"Ray cluster is up and running: \", ray.is_initialized())"
325328
]

demo-notebooks/interactive/local_interactive.ipynb renamed to demo-notebooks/additional-demos/local_interactive.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"cluster_name = \"hfgputest-1\"\n",
4545
"local_interactive = True\n",
4646
"\n",
47-
"cluster = Cluster(ClusterConfiguration(local_interactive=local_interactive, namespace=namespace, name=cluster_name, min_worker=1, max_worker=1, min_cpus=1, max_cpus=1, min_memory=4, max_memory=4, gpu=0, instascale=False, machine_types=[\"m5.xlarge\", \"p3.8xlarge\"]))"
47+
"cluster = Cluster(ClusterConfiguration(local_interactive=local_interactive, namespace=namespace, name=cluster_name, num_workers=1, min_cpus=1, max_cpus=1, min_memory=4, max_memory=4, num_gpus=0, instascale=False, machine_types=[\"m5.xlarge\", \"p3.8xlarge\"]))"
4848
]
4949
},
5050
{
@@ -319,7 +319,7 @@
319319
"name": "python",
320320
"nbconvert_exporter": "python",
321321
"pygments_lexer": "ipython3",
322-
"version": "3.8.13"
322+
"version": "3.8.17"
323323
},
324324
"vscode": {
325325
"interpreter": {

0 commit comments

Comments
 (0)