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
"This Notebook shows the features to ease the developer experience of authoring Insights JSON Configuration. This shows how to author Insights configuration programmatically using InsightsBuilder and InsightsConfigWriter APIs.\n",
19
+
"\n",
20
+
"The InsightsBuilder class is used to define and customise all of its core features like data schema, data ingestion, data transformation, metric calculation and post processing of metric output .\n",
21
+
"\n",
22
+
"The InsightsConfigWriter class from ML Insights Library will be used to build a config JSON file from InsightsBuilder class instance.\n",
23
+
"\n",
24
+
"In this Notebook we have the following examples -\n",
25
+
"\n",
26
+
"\n",
27
+
"- Generate Insights Configuration JSON from InsightsBuilder class\n",
28
+
"- Approximate input_schema detection from sample dataset and then generate Insights Configuration JSON"
29
+
]
30
+
},
31
+
{
32
+
"cell_type": "markdown",
33
+
"id": "d807a7da",
34
+
"metadata": {},
35
+
"source": [
36
+
"# Install ML Observability Insights Library SDK\n",
37
+
"\n",
38
+
"- Prerequisites\n",
39
+
" - Linux/Mac (Intel CPU)\n",
40
+
" - Python 3.8 and 3.9 only\n",
41
+
"\n",
42
+
"\n",
43
+
"- Installation\n",
44
+
" - ML Insights is made available as a Python package (via Artifactory) which can be installed using pip install as shown below. Depending on the execution engine on which to do the run, one can use scoped package. For eg: if we want to run on dask, use oracle-ml-insights[dask], for spark use oracle-ml-insights[spark], for native use oracle-ml-insights. One can install all the dependencies as use oracle-ml-insights[all]\n",
45
+
"\n",
46
+
" !pip install oracle-ml-insights\n",
47
+
"\n",
48
+
"Refer : [Installation and Setup](https://docs.oracle.com/en-us/iaas/tools/ml-insights-docs/latest/ml-insights-documentation/html/user_guide/tutorials/install.html)"
"## 2 Generate Insights Configuration JSON using InsightsConfigWriter \n",
111
+
"\n",
112
+
"The below section shows how the InsightsBuilder class is used to define and customise all of its core features like data schema, data ingestion, metric calculation and post processing of metric output .\n",
113
+
"\n",
114
+
"The Config Writer class from ML Insights Library used to build a config file from InsightsBuilder class instance using to_json() method.\n",
115
+
"\n",
116
+
"The user can save the config to Object storage using save_config_to_object_storage() method of Config Writer class of ML Insights Library."
"## 2.1 Generate Configuration with Automatic approximate input_schema detection \n",
192
+
"\n",
193
+
"In above section we showed how to define the input schema of each feature one by one along with defining other components using Insights Builder . To ease the developer experience in below section we show how to use automatic approximate input_schema detection feature using the sample dataset.The auto-generated input_schema feature infers the data_type and variable_type of each feature and creates the input schema.\n",
194
+
"\n",
195
+
"Here we are using with_input_schema_using_dataset() method of InsightsBuilder class which take the sample dataset and column_type feature details and auto generate the approximated input_schema instead of defining each feature schema .\n",
196
+
"\n",
197
+
"Note : The auto generated input_schema is approximated version of input-schema, it may not be 100% correct .User needs to validate the input_schema and make the neccesary changes if required.\n"
" # Set up the insights builder by passing: dataset location to generate approaximate input_schema, coulumn_type feature name , metric, reader and engine details\n",
0 commit comments