File tree Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Original file line number Diff line number Diff line change 1
1
from .vetiver_model import VetiverModel
2
+ from .utils import inform
2
3
import warnings
3
4
import logging
4
- import sys
5
- from types import SimpleNamespace
6
5
7
6
_log = logging .getLogger (__name__ )
8
7
9
- modelcard_options = SimpleNamespace (quiet = False )
10
-
11
-
12
- def inform (log , msg ):
13
- if log is not None :
14
- log .info (msg )
15
-
16
- if not modelcard_options .quiet :
17
- print (msg , file = sys .stderr )
18
-
19
8
20
9
class ModelCard (UserWarning ):
21
10
def __init__ (
Original file line number Diff line number Diff line change 1
1
import nest_asyncio
2
2
import warnings
3
+ import sys
4
+ from types import SimpleNamespace
3
5
4
6
no_notebook = False
5
7
try :
@@ -18,3 +20,14 @@ def _jupyter_nb():
18
20
nest_asyncio .apply ()
19
21
else :
20
22
return False
23
+
24
+
25
+ modelcard_options = SimpleNamespace (quiet = False )
26
+
27
+
28
+ def inform (log , msg ):
29
+ if log is not None :
30
+ log .info (msg )
31
+
32
+ if not modelcard_options .quiet :
33
+ print (msg , file = sys .stderr )
You can’t perform that action at this time.
0 commit comments