Skip to content

Commit

Permalink
Run PR check for guided notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
sutaakar authored and openshift-merge-bot[bot] committed Jul 26, 2024
1 parent 1d889b1 commit ecf04c3
Show file tree
Hide file tree
Showing 8 changed files with 455 additions and 45 deletions.
20 changes: 20 additions & 0 deletions .github/resources/minio_remote_config_cell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"@ray.remote\n",
"def get_minio_run_config():\n",
" import s3fs\n",
" import pyarrow\n",
" s3_fs = s3fs.S3FileSystem(\n",
" key = \"minio\",\n",
" secret = \"minio123\",\n",
" endpoint_url = \"http://minio-service.default.svc.cluster.local:9000\"\n",
" )\n",
" custom_fs = pyarrow.fs.PyFileSystem(pyarrow.fs.FSSpecHandler(s3_fs))\n",
" run_config = ray.train.RunConfig(storage_path='training', storage_filesystem=custom_fs)\n",
" return run_config"
]
}
20 changes: 20 additions & 0 deletions .github/resources/wait_for_job_cell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from time import sleep\n",
"\n",
"finished = False\n",
"while not finished:\n",
" sleep(5)\n",
" status = client.get_job_status(submission_id)\n",
" finished = (status == \"SUCCEEDED\" or status == \"FAILED\" or status == \"STOPPED\")\n",
" print(status)\n",
"print(\"Job status \" + status)\n",
"print(\"Logs: \")\n",
"print(client.get_job_logs(submission_id))\n",
"assert status == \"SUCCEEDED\", \"Job failed or was stopped!\""
]
}
Loading

0 comments on commit ecf04c3

Please sign in to comment.