Skip to content

Commit ecf04c3

Browse files
sutaakaropenshift-merge-bot[bot]
authored andcommitted
Run PR check for guided notebooks
1 parent 1d889b1 commit ecf04c3

8 files changed

+455
-45
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"cell_type": "code",
3+
"execution_count": null,
4+
"metadata": {},
5+
"outputs": [],
6+
"source": [
7+
"@ray.remote\n",
8+
"def get_minio_run_config():\n",
9+
" import s3fs\n",
10+
" import pyarrow\n",
11+
" s3_fs = s3fs.S3FileSystem(\n",
12+
" key = \"minio\",\n",
13+
" secret = \"minio123\",\n",
14+
" endpoint_url = \"http://minio-service.default.svc.cluster.local:9000\"\n",
15+
" )\n",
16+
" custom_fs = pyarrow.fs.PyFileSystem(pyarrow.fs.FSSpecHandler(s3_fs))\n",
17+
" run_config = ray.train.RunConfig(storage_path='training', storage_filesystem=custom_fs)\n",
18+
" return run_config"
19+
]
20+
}
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"cell_type": "code",
3+
"execution_count": null,
4+
"metadata": {},
5+
"outputs": [],
6+
"source": [
7+
"from time import sleep\n",
8+
"\n",
9+
"finished = False\n",
10+
"while not finished:\n",
11+
" sleep(5)\n",
12+
" status = client.get_job_status(submission_id)\n",
13+
" finished = (status == \"SUCCEEDED\" or status == \"FAILED\" or status == \"STOPPED\")\n",
14+
" print(status)\n",
15+
"print(\"Job status \" + status)\n",
16+
"print(\"Logs: \")\n",
17+
"print(client.get_job_logs(submission_id))\n",
18+
"assert status == \"SUCCEEDED\", \"Job failed or was stopped!\""
19+
]
20+
}

0 commit comments

Comments
 (0)