malevich.interpreter.core#
- class malevich.interpreter.core.CoreInterpreter(core_auth: tuple[str, str], core_host: str = 'https://core.malevich.ai/')#
Interpret flows to be run on Malevich Core
Malevich Core is a computational cloud of Malevich. It provides low-level access to the computational resources of Malevich. This interpreter utilizes its API to run your flows.
Note
The interpreter can operate with dependencies installed with both image and space installer.
Prepare#
The prepare hook is a simple proxy to the task_prepare function of Malevich Core API. All the parameters are optional.
Options:
with_logs (bool)
:If set, return prepare logs if True after end
debug_mode (bool)
:If set, displays additional information about errors
info_url (str)
:URL to which the request is sent. If not specified, the default url is used. Rewrite msg_url from configuration if exist
core_manage (bool)
:If set, the requests will be managed by Core, otherwise by the DAG Manager.
with_show (bool)
:Show results (like for each operation, default equals with_logs arg)
profile_mode (str)
:If set, provides more information in logs. Possible modes:
no
,all
,time
,df_info
,df_show
Run#
The run hook is a simple proxy to the task_run function of Malevich Core API. All the parameters are optional.
Options:
Interpreter-specific parameters
run_id (str)
:A custom identifier for the run. If not specified, a random identifier is generated.
overrides (dict[str, str])
:A dictionary of overrides for the collections. The keys are collection names, the values are collection IDs. The option is managed by Runners, but can be provided manually.
Core-API parameters
with_logs (bool)
:If set return prepare logs if True after end
debug_mode (bool)
:If set, displays additional information about errors
with_show (bool)
:Show results in logs
profile_mode (str)
:If set, provides more information in logs. Possible modes:
no
,all
,time
,df_info
,df_show
Stop#
The stop hook is a simple proxy to the task_stop function. It stops the task and does not have any options.
Results#
Results is represented as a list of
malevich.results.core.CoreResult
objects. Each object contains a payload which can be an asset, a dataframe or a list of such. Use.get_df()
,.get_binary()
,.get_dfs()
and.get_binary_dir()
to extract the results.Configure#
You can mark an operation to be run on a specific platform. To do so, set
platform
andplatform_settings
parameters in the.configure()
method. Theplatform
parameter can bebase
orvast
. Theplatform_settings
parameter is a dictionary of settings for the platform. The settings are platform-specific.