Skip to content

Commit edac73e

Browse files
committed
Adding warnings filter for inference on data sets being empty to avoid user confusion.
1 parent cb78c17 commit edac73e

6 files changed

+21
-9
lines changed

ImageColorizer.ipynb

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
"source": [
2222
"from deoldify.visualize import *\n",
2323
"plt.style.use('dark_background')\n",
24-
"torch.backends.cudnn.benchmark=True"
24+
"torch.backends.cudnn.benchmark=True\n",
25+
"import warnings\n",
26+
"warnings.filterwarnings(\"ignore\", category=UserWarning, message=\".*?Your .*? set is empty.*?\")"
2527
]
2628
},
2729
{
@@ -140,7 +142,7 @@
140142
"name": "python",
141143
"nbconvert_exporter": "python",
142144
"pygments_lexer": "ipython3",
143-
"version": "3.7.0"
145+
"version": "3.7.6"
144146
},
145147
"toc": {
146148
"colors": {

ImageColorizerArtisticTests.ipynb

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"outputs": [],
2121
"source": [
2222
"from deoldify.visualize import *\n",
23-
"plt.style.use('dark_background')"
23+
"plt.style.use('dark_background')\n",
24+
"import warnings\n",
25+
"warnings.filterwarnings(\"ignore\", category=UserWarning, message=\".*?Your .*? set is empty.*?\")"
2426
]
2527
},
2628
{
@@ -3285,7 +3287,7 @@
32853287
"name": "python",
32863288
"nbconvert_exporter": "python",
32873289
"pygments_lexer": "ipython3",
3288-
"version": "3.7.0"
3290+
"version": "3.7.6"
32893291
},
32903292
"toc": {
32913293
"colors": {

ImageColorizerColab.ipynb

+3-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@
144144
"outputs": [],
145145
"source": [
146146
"import fastai\n",
147-
"from deoldify.visualize import *"
147+
"from deoldify.visualize import *\n",
148+
"import warnings\n",
149+
"warnings.filterwarnings(\"ignore\", category=UserWarning, message=\".*?Your .*? set is empty.*?\")"
148150
]
149151
},
150152
{

ImageColorizerStableTests.ipynb

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"outputs": [],
2121
"source": [
2222
"from deoldify.visualize import *\n",
23-
"plt.style.use('dark_background')"
23+
"plt.style.use('dark_background')\n",
24+
"import warnings\n",
25+
"warnings.filterwarnings(\"ignore\", category=UserWarning, message=\".*?Your .*? set is empty.*?\")"
2426
]
2527
},
2628
{

VideoColorizer.ipynb

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"outputs": [],
2121
"source": [
2222
"from deoldify.visualize import *\n",
23-
"plt.style.use('dark_background')"
23+
"plt.style.use('dark_background')\n",
24+
"import warnings\n",
25+
"warnings.filterwarnings(\"ignore\", category=UserWarning, message=\".*?Your .*? set is empty.*?\")"
2426
]
2527
},
2628
{
@@ -146,7 +148,7 @@
146148
"name": "python",
147149
"nbconvert_exporter": "python",
148150
"pygments_lexer": "ipython3",
149-
"version": "3.7.0"
151+
"version": "3.7.6"
150152
},
151153
"toc": {
152154
"colors": {

VideoColorizerColab.ipynb

+3-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@
151151
"import fastai\n",
152152
"from deoldify.visualize import *\n",
153153
"from pathlib import Path\n",
154-
"torch.backends.cudnn.benchmark=True"
154+
"torch.backends.cudnn.benchmark=True\n",
155+
"import warnings\n",
156+
"warnings.filterwarnings(\"ignore\", category=UserWarning, message=\".*?Your .*? set is empty.*?\")"
155157
]
156158
},
157159
{

0 commit comments

Comments
 (0)