1
# -*- encoding: utf-8 -*-
2 2
"""
3
@file
4
@brief Ways to speed up predictions for a machine learned model.
5
"""
6

7 2
__version__ = "0.4.1258"
8 2
__author__ = "Xavier Dupré"
9

10

11 2
def check(log=False):
12
    """
13
    Checks the library is working.
14
    It raises an exception.
15
    If you want to disable the logs:
16

17
    @param      log     if True, display information, otherwise
18
    @return             0 or exception
19
    """
20 2
    return True
21

22

23 2
def _setup_hook(use_print=False):
24
    """
25
    If this function is added to the module,
26
    the help automation and unit tests call it first before
27
    anything goes on as an initialization step.
28
    """
29 2
    if use_print:
30 2
        print("Success: _setup_hook")
31

32

33
def load_ipython_extension(ip):  # pragma: no cover
34
    """
35
    To allow the call ``%load_ext mlprodict``
36

37
    @param      ip      from ``get_ipython()``
38
    """
39
    from .onnxrt.doc.nb_helper import register_onnx_magics as freg
40
    freg(ip)

Read our documentation on viewing source code .

Loading