Skip to content

Commit

Permalink
disable logging
Browse files Browse the repository at this point in the history
  • Loading branch information
chr-peters committed Jun 8, 2021
1 parent f843a21 commit cfe9d54
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions notebooks/dataset_info.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,53 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from sketching.datasets import Dataset, Covertype_Sklearn, KDDCup_Sklearn, Webspam_libsvm"
"from sketching.datasets import Dataset, Covertype_Sklearn, KDDCup_Sklearn, Webspam_libsvm\n",
"from sketching import settings\n",
"\n",
"import logging\n",
"\n",
"# disable log output\n",
"logger = logging.getLogger(settings.LOGGER_NAME)\n",
"logger.setLevel(logging.WARNING)"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"def print_dataset_info(dataset: Dataset):\n",
" dataset.get_Z() # do this to quickly get rid of logging output\n",
" print(\"Info for dataset \"+dataset.get_name()+\":\")\n",
" print(f\"n = {dataset.get_n()}\")\n",
" print(f\"d = {dataset.get_d()}\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Info for dataset covertype_sklearn:\n",
"n = 581012\n",
"d = 54\n",
"Info for dataset kddcup_sklearn:\n",
"n = 494021\n",
"d = 33\n",
"Info for dataset webspam_libsvm_desparsed:\n",
"n = 350000\n",
"d = 128\n"
]
}
],
"source": [
"print_dataset_info(Covertype_Sklearn())\n",
"print_dataset_info(KDDCup_Sklearn())\n",
Expand Down

0 comments on commit cfe9d54

Please sign in to comment.