Skip to content

Commit

Permalink
Merge 044d45a into faeaf0b
Browse files Browse the repository at this point in the history
  • Loading branch information
Jirayr-Solvee committed Feb 21, 2022
2 parents faeaf0b + 044d45a commit 2611a62
Show file tree
Hide file tree
Showing 18 changed files with 7,874 additions and 792 deletions.
89 changes: 58 additions & 31 deletions examples/Dataset_Profiler_Viewer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "1f0ab34a",
"metadata": {},
"outputs": [],
Expand All @@ -29,7 +29,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "fc04cc42",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -59,7 +59,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 4,
"id": "7ebc0b5f",
"metadata": {},
"outputs": [],
Expand All @@ -86,22 +86,24 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": null,
"id": "2e018520",
"metadata": {},
"outputs": [],
"source": [
"session = get_or_create_session()\n",
"with session.logger(\"mytestytest\",dataset_timestamp=datetime.datetime(2021, 6, 2)) as logger:\n",
" for _ in range(500):\n",
" logger.log({\"uniform_integers\": np.random.randint(0,50)})\n",
" logger.log({\"strings\": fake.name()})\n",
" logger.log({\"mixture_distribution\": np.random.choice(distribution, 1)[0]})\n",
" logger.log({\"nulls\": None})\n",
" logger.log({\"moah_data\":1})\n",
" logger.log({\"moah_data\":1})\n",
" logger.log({\"moah_data\":5})\n",
" profile=logger.profile"
"def profile_generator():\n",
" with session.logger(\"mytestytest\",dataset_timestamp=datetime.datetime(2021, 6, 2)) as logger:\n",
" for _ in range(500):\n",
" logger.log({\"uniform_integers\": np.random.randint(0,50)})\n",
" logger.log({\"strings\": fake.name()})\n",
" logger.log({\"mixture_distribution\": np.random.choice(distribution, 1)[0]})\n",
" logger.log({\"nulls\": None})\n",
" logger.log({\"moah_data\":1})\n",
" logger.log({\"moah_data\":1})\n",
" logger.log({\"moah_data\":5})\n",
" return logger.profile\n",
"profile=profile_generator()"
]
},
{
Expand All @@ -123,39 +125,64 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": null,
"id": "e293634d",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'/var/folders/pr/f715zv8x17b1v5vwydgv2gq40000gq/T/tmpabxku502.html'"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"profile_viewer(profiles=[profile], output_path=None)"
]
},
{
"cell_type": "markdown",
"id": "e9cebe5c",
"metadata": {},
"source": [
"### Logging reference profile"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "d36563e9",
"metadata": {},
"outputs": [],
"source": [
"reference_profile=profile_generator() "
]
},
{
"cell_type": "markdown",
"id": "56dcaef9",
"metadata": {},
"source": [
"### Add reference profile to viewer and open"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6a4eb38c",
"metadata": {},
"outputs": [],
"source": [
"profile_viewer(profiles=[profile], reference_profiles=[reference_profile], output_path=None,)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d09732c5",
"id": "1b1d89e2",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "whylogs-dev",
"display_name": "Python 3",
"language": "python",
"name": "whylogs-dev"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -167,7 +194,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
"version": "3.8.8"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 2611a62

Please sign in to comment.