-
Notifications
You must be signed in to change notification settings - Fork 321
Expand file tree
/
Copy path__init__.py
More file actions
115 lines (88 loc) · 3.61 KB
/
__init__.py
File metadata and controls
115 lines (88 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
"""
@package graphlab
...
GraphLab Create is a machine learning platform that enables data scientists and
app developers to easily create intelligent applications at scale. Building an
intelligent, predictive application involves iterating over multiple steps:
cleaning the data, developing features, training a model, and creating and
maintaining a predictive service. GraphLab Create does all of this in one
platform. It is easy to use, fast, and powerful.
For more details on the GraphLab Create see http://dato.com, including
documentation, tutorial, etc.
"""
'''
Copyright (C) 2015 Dato, Inc.
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
'''
from . import util
from .util import set_runtime_config
from .util import get_runtime_config
from .version_info import __VERSION__, version, build_number
from .connect import _get_metric_tracker
from . import visualization
from .data_structures.sgraph import Vertex, Edge
from .data_structures.sgraph import SGraph
from .data_structures.sframe import SFrame
from .data_structures.sarray import SArray
from .data_structures.sketch import Sketch
from .data_structures.image import Image
from .data_structures.sarray_builder import SArrayBuilder
from .data_structures.sframe_builder import SFrameBuilder
from .data_structures.sgraph import load_sgraph, load_graph
from .toolkits._model import Model, CustomModel, load_model
from . import aggregate
from . import toolkits
from .toolkits.image_analysis import image_analysis
from .data_structures.sframe import load_sframe, get_spark_integration_jar_path
from .data_structures.DBConnection import connect_odbc, get_libodbc_path, set_libodbc_path
# internal util
from .connect.main import launch as _launch
from .connect.main import stop as _stop
from .connect import main as glconnect
from .util import get_environment_config
from .util import get_graphlab_object_type
from .util import get_log_location, get_client_log_location, get_server_log_location
from .version_info import version
from .version_info import __VERSION__
from ._gl_pickle import GLPickler
from ._gl_pickle import GLUnpickler
class DeprecationHelper(object):
def __init__(self, new_target):
self.new_target = new_target
def _warn(self):
import warnings
import logging
warnings.warn("Graph has been renamed to SGraph. The Graph class will be removed in the next release.", PendingDeprecationWarning)
logging.warning("Graph has been renamed to SGraph. The Graph class will be removed in the next release.")
def __call__(self, *args, **kwargs):
self._warn()
return self.new_target(*args, **kwargs)
def __getattr__(self, attr):
self._warn()
return getattr(self.new_target, attr)
Graph = DeprecationHelper(SGraph)
from .cython import cy_pylambda_workers
################### Extension Importing ########################
from . import extensions
from .extensions import ext_import
extensions._add_meta_path()
# rewrite the extensions module
class _extensions_wrapper(object):
def __init__(self, wrapped):
self._wrapped = wrapped
self.__doc__ = wrapped.__doc__
def __getattr__(self, name):
try:
return getattr(self._wrapped, name)
except:
pass
from .connect.main import get_unity
get_unity()
return getattr(self._wrapped, name)
import sys as _sys
from . import _json as json # imports from _json.py in this directory
_sys.modules[__name__ + ".extensions"] = _extensions_wrapper(_sys.modules[__name__ + ".extensions"])
# rewrite the import
extensions = _sys.modules[__name__ + ".extensions"]