getml.engine
This module is a collection of utility functions for the overall communication and the session management of the getML Engine.
In order to log into the Engine, you have to open your favorite internet browser and enter http://localhost:1709 in the navigation bar. This tells it to connect to a local TCP socket at port 1709 opened by the getML Monitor. This will only be possible from within the same device!
Example
First of all, you need to start the getML Engine. Next, you need to create a new project or load an existing one.
getml.engine.list_projects()
getml.engine.set_project('test')
print(getml.engine.is_alive())
getml.engine.shutdown()
Note
The Python process and the getML Engine must be located on
the same machine. If you
intend to run the Engine on a remote host, make sure to start your
Python session on that device as well. Also, when using SSH sessions,
make sure to start Python using python &
followed by disown
or
using nohup python
. This ensures the Python process and all the
script it has to run won't be killed the moment your remote
connection becomes unstable, and
you are able to recover them later on (see
remote_access
).
All data frame objects and models in the getML Engine are
bundled in projects. When loading an existing project, the
current memory of the Engine will be flushed and all changes
applied to DataFrame
instances after
calling their save
method will
be lost. Afterwards, all
Pipeline
will be loaded into
memory automatically. The data frame objects
will not be loaded automatically since they consume significantly
more
memory than the pipelines. They can be loaded manually using
load_data_frame
or
load
.
The getML Engine reflects the separation of data into individual projects on the level of the filesystem too. All data belonging to a single project is stored in a dedicated folder in the 'projects' directory located in '.getML' in your home folder. These projects can be copied and shared between different platforms and architectures without any loss of information. However, you must copy the entire project and not just individual data frames or pipelines.
delete_project
delete_project(name: str)
Deletes a project.
PARAMETER | DESCRIPTION |
---|---|
name |
Name of your project.
TYPE:
|
Note
All data and models contained in the project directory will be permanently lost.
Source code in getml/engine/helpers.py
32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
is_alive
is_alive() -> bool
Checks if the getML Engine is running.
RETURNS | DESCRIPTION |
---|---|
bool
|
True if the getML Engine is running and ready to accept |
bool
|
commands and False otherwise. |
Source code in getml/communication.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|
is_engine_alive
is_engine_alive() -> bool
Checks if the getML Engine is running.
RETURNS | DESCRIPTION |
---|---|
bool
|
True if the getML Engine is running and ready to accept |
bool
|
commands and False otherwise. |
Source code in getml/communication.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|
launch
launch(
allow_push_notifications: bool = True,
allow_remote_ips: bool = False,
home_directory: Optional[str] = None,
http_port: Optional[int] = None,
in_memory: bool = True,
install: bool = False,
launch_browser: bool = True,
log: bool = False,
project_directory: Optional[str] = None,
proxy_url: Optional[str] = None,
token: Optional[str] = None,
)
Launches the getML Engine.
PARAMETER | DESCRIPTION |
---|---|
allow_push_notifications |
Whether you want to allow the getML Monitor to send push notifications to your desktop.
TYPE:
|
allow_remote_ips |
Whether you want to allow remote IPs to access the http-port.
TYPE:
|
home_directory |
The directory which should be treated as the home directory by getML. getML will create a hidden folder named '.getML' in said directory. All binaries will be installed there. |
http_port |
The local port of the getML Monitor.
This port can only be accessed from your local computer,
unless you set |
in_memory |
Whether you want the Engine to process everything in memory.
TYPE:
|
install |
Reinstalls getML, even if it is already installed.
TYPE:
|
launch_browser |
Whether you want to automatically launch your browser.
TYPE:
|
log |
Whether you want the Engine log to appear in the logfile (more detailed logging). The Engine log also appears in the 'Log' page of the Monitor.
TYPE:
|
project_directory |
The directory in which to store all of your projects. |
proxy_url |
The URL of any proxy server that that redirects to the getML Monitor. |
token |
The token used for authentication. Authentication is required when remote IPs are allowed to access the Monitor. If authentication is required and no token is passed, a random hexcode will be generated as the token. |
Source code in getml/engine/_launch.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
|
list_projects
List all projects on the getML Engine.
RETURNS | DESCRIPTION |
---|---|
List[str]
|
Lists the name of all the projects. |
Source code in getml/engine/helpers.py
50 51 52 53 54 55 56 57 |
|
list_running_projects
List all projects on the getML Engine that are currently running.
RETURNS | DESCRIPTION |
---|---|
List[str]
|
Lists the name of all the projects currently running. |
Source code in getml/engine/helpers.py
63 64 65 66 67 68 69 70 |
|
set_project
set_project(name: str)
Creates a new project or loads an existing one.
If there is no project called name
present on the Engine, a new one will
be created.
PARAMETER | DESCRIPTION |
---|---|
name |
Name of the new project.
TYPE:
|
Source code in getml/engine/helpers.py
76 77 78 79 80 81 82 83 84 85 |
|
shutdown
shutdown()
Shuts down the getML Engine.
Source code in getml/engine/helpers.py
91 92 93 94 95 96 97 98 99 100 |
|
suspend_project
suspend_project(name: str)
Suspends a project that is currently running.
PARAMETER | DESCRIPTION |
---|---|
name |
Name of your project.
TYPE:
|
Source code in getml/engine/helpers.py
106 107 108 109 110 111 112 113 |
|