You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jobs/flask_job_monitor/README.md
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,13 @@
2
2
3
3
Incubator project to augment the OCI console with useful functionality to support development of Data Science Jobs.
4
4
5
+
This job monitor is a Python Flask app build on top of [Oracle ADS](https://docs.oracle.com/en-us/iaas/tools/ads-sdk/latest/index.html). It allows users to monitor the status and outputs of OCI data science job runs.
6
+
7
+

8
+
9
+
User can also see the job definition in YAML:
10
+

11
+
5
12
## How to run
6
13
### Requirements
7
14
This tool requires `oci>=2.45.1` and `oracle-ads>=2.4.2`.
@@ -41,3 +48,20 @@ The following config can be used in the VS Code `launch.json` to launch the Flas
41
48
"jinja": true
42
49
},
43
50
```
51
+
52
+
### UI Development
53
+
If you would like to develop the UI (HTML and JavaScript) without OCI authentication, you can start the app in "Recording Mode" to cache the data to your local computer.
54
+
55
+
56
+
"mocked" version of the Flask app:
57
+
```
58
+
OCI_PYTHON_SDK_NO_SERVICE_IMPORTS=1 FLASK_APP=job_monitor_mocked flask run
59
+
```
60
+
61
+
The mocked version will use the cached data from the "mock" directory to render the web page.
62
+
63
+
The content of the "mocked" version can be generated by running the app in "Recording Mode":
64
+
```
65
+
OCI_PYTHON_SDK_NO_SERVICE_IMPORTS=1 RECORDING=1 FLASK_APP=job_monitor flask run
66
+
```
67
+
In this mode, the context of each API response is saved as pickle files in the "mock" directory. The files are named in the format of `{endpoint}/{identifier}.pickle`. This allow us to easily save real data from OCI for mocking purpose. Once the data is saved, we can simply switch to the mocked version work offline.
0 commit comments