|
53 | 53 | "metadata": {},
|
54 | 54 | "outputs": [],
|
55 | 55 | "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", |
57 | 59 | "auth = TokenAuthentication(\n",
|
58 | 60 | " token = \"XXXX\",\n",
|
59 | 61 | " server = \"XXXX\",\n",
|
60 |
| - " skip_tls = True\n", |
| 62 | + " skip_tls = False\n", |
61 | 63 | ")\n",
|
62 | 64 | "auth.login()"
|
63 | 65 | ]
|
|
88 | 90 | "# Create our cluster and submit appwrapper\n",
|
89 | 91 | "cluster = Cluster(ClusterConfiguration(name='hfgputest', \n",
|
90 | 92 | " namespace=\"default\",\n",
|
91 |
| - " min_worker=1, \n", |
92 |
| - " max_worker=1, \n", |
| 93 | + " num_workers=1,\n", |
93 | 94 | " min_cpus=8, \n",
|
94 | 95 | " max_cpus=8, \n",
|
95 | 96 | " min_memory=16, \n",
|
96 | 97 | " max_memory=16, \n",
|
97 |
| - " gpu=4,\n", |
| 98 | + " num_gpus=4,\n", |
98 | 99 | " image=\"quay.io/project-codeflare/ray:2.5.0-py38-cu116\",\n",
|
99 | 100 | " instascale=True, machine_types=[\"m5.xlarge\", \"p3.8xlarge\"]))"
|
100 | 101 | ]
|
|
319 | 320 | "#install additional libraries that will be required for this training\n",
|
320 | 321 | "runtime_env = {\"pip\": [\"transformers\", \"datasets\", \"evaluate\", \"pyarrow<7.0.0\", \"accelerate\"]}\n",
|
321 | 322 | "\n",
|
322 |
| - "ray.init(address=f'{ray_cluster_uri}', runtime_env=runtime_env)\n", |
| 323 | + "ray.init(address=ray_cluster_uri, runtime_env=runtime_env)\n", |
323 | 324 | "\n",
|
324 | 325 | "print(\"Ray cluster is up and running: \", ray.is_initialized())"
|
325 | 326 | ]
|
|
0 commit comments