module grammar.gactions

Inheritance diagram of mlprodict.grammar.gactions

Short summary

module mlprodict.grammar.gactions

Action definition.

source on GitHub

Classes

class

truncated documentation

MLAction

Base class for every action.

MLActionBinary

Any binary operation.

MLActionCast

Cast into another type.

MLActionConcat

Concatenate number of arrays into an array.

MLActionCst

Constant

MLActionFunction

A function.

MLActionFunctionCall

Any function call.

MLActionIfElse

Addition

MLActionReturn

Returns a results.

MLActionUnary

Any binary operation.

MLActionVar

Variable. The constant is only needed to guess the variable type.

Properties

property

truncated documentation

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

Static Methods

staticmethod

truncated documentation

guess_type

Guesses a type given a value.

guess_type

Guesses a type given a value.

Methods

method

truncated documentation

__init__

__init__

__init__

__init__

__init__

__init__

__init__

__init__

__init__

__init__

__init__

_optional_parameters

Returns additional parameters to add the function call.

_optional_parameters

Returns additional parameters to add the function call.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates itself.

execute

Computes the action. Returns the output.

execute

Computes the action. Returns the output.

execute

execute

Concatenation

execute

execute

execute

Computes the action. Returns the output.

execute

execute

execute

Computes the action. Returns the output.

execute

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Documentation

Action definition.

source on GitHub

class mlprodict.grammar.gactions.MLAction(inputs, output, name, children=None)[source]

Bases: mlprodict.grammar.api_extension.AutoAction

Base class for every action.

source on GitHub

Parameters
  • inputs – type of inputs

  • output – output type

  • name – a name which identifies the action

  • children – actions used to compute this one

source on GitHub

ChildrenResults

Return the last execution results.

source on GitHub

__init__(inputs, output, name, children=None)[source]
Parameters
  • inputs – type of inputs

  • output – output type

  • name – a name which identifies the action

  • children – actions used to compute this one

source on GitHub

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

_export_json(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

enumerate_variables()[source]

Enumerates all variables.

source on GitHub

execute(**kwargs)[source]

Computes the action. Returns the output.

source on GitHub

graph_execution()[source]

Returns a formated string which retruns the outputs.

source on GitHub

class mlprodict.grammar.gactions.MLActionBinary(act1, act2, name)[source]

Bases: mlprodict.grammar.gactions.MLAction

Any binary operation.

source on GitHub

__init__(act1, act2, name)[source]
Parameters
  • inputs – type of inputs

  • output – output type

  • name – a name which identifies the action

  • children – actions used to compute this one

source on GitHub

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

class mlprodict.grammar.gactions.MLActionCast(act1, new_type)[source]

Bases: mlprodict.grammar.gactions.MLActionUnary

Cast into another type.

source on GitHub

__init__(act1, new_type)[source]
Parameters
  • inputs – type of inputs

  • output – output type

  • name – a name which identifies the action

  • children – actions used to compute this one

source on GitHub

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

execute(**kwargs)[source]

Computes the action. Returns the output.

source on GitHub

class mlprodict.grammar.gactions.MLActionConcat(act1, act2)[source]

Bases: mlprodict.grammar.gactions.MLActionFunctionCall

Concatenate number of arrays into an array.

source on GitHub

__init__(act1, act2)[source]
Parameters
  • inputs – type of inputs

  • output – output type

  • name – a name which identifies the action

  • children – actions used to compute this one

source on GitHub

execute(**kwargs)[source]

Concatenation

source on GitHub

class mlprodict.grammar.gactions.MLActionCst(cst, inout_type=None, comment=None)[source]

Bases: mlprodict.grammar.gactions.MLAction

Constant

source on GitHub

__init__(cst, inout_type=None, comment=None)[source]
Parameters
  • inputs – type of inputs

  • output – output type

  • name – a name which identifies the action

  • children – actions used to compute this one

source on GitHub

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

_export_json(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

execute(**kwargs)[source]

Computes the action. Returns the output.

source on GitHub

graph_execution()[source]

Returns a formated string which retruns the outputs.

source on GitHub

static guess_type(value)[source]

Guesses a type given a value.

source on GitHub

class mlprodict.grammar.gactions.MLActionFunction(act, name)[source]

Bases: mlprodict.grammar.gactions.MLActionUnary

A function.

source on GitHub

__init__(act, name)[source]
Parameters
  • inputs – type of inputs

  • output – output type

  • name – a name which identifies the action

  • children – actions used to compute this one

source on GitHub

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

execute(**kwargs)[source]

Computes the action. Returns the output.

source on GitHub

class mlprodict.grammar.gactions.MLActionFunctionCall(name, output, *acts)[source]

Bases: mlprodict.grammar.gactions.MLAction

Any function call.

source on GitHub

__init__(name, output, *acts)[source]
Parameters
  • inputs – type of inputs

  • output – output type

  • name – a name which identifies the action

  • children – actions used to compute this one

source on GitHub

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

_optional_parameters()[source]

Returns additional parameters to add the function call.

source on GitHub

class mlprodict.grammar.gactions.MLActionIfElse(cond, act1, act2, check_type=True, comment=None)[source]

Bases: mlprodict.grammar.gactions.MLAction

Addition

source on GitHub

__init__(cond, act1, act2, check_type=True, comment=None)[source]
Parameters
  • inputs – type of inputs

  • output – output type

  • name – a name which identifies the action

  • children – actions used to compute this one

source on GitHub

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

execute(**kwargs)[source]

Computes the action. Returns the output.

source on GitHub

class mlprodict.grammar.gactions.MLActionReturn(act)[source]

Bases: mlprodict.grammar.gactions.MLAction

Returns a results.

source on GitHub

__init__(act)[source]
Parameters
  • inputs – type of inputs

  • output – output type

  • name – a name which identifies the action

  • children – actions used to compute this one

source on GitHub

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

execute(**kwargs)[source]

Computes the action. Returns the output.

source on GitHub

class mlprodict.grammar.gactions.MLActionUnary(act1, name)[source]

Bases: mlprodict.grammar.gactions.MLAction

Any binary operation.

source on GitHub

__init__(act1, name)[source]
Parameters
  • inputs – type of inputs

  • output – output type

  • name – a name which identifies the action

  • children – actions used to compute this one

source on GitHub

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

class mlprodict.grammar.gactions.MLActionVar(value, name, inout_type=None)[source]

Bases: mlprodict.grammar.gactions.MLActionCst

Variable. The constant is only needed to guess the variable type.

source on GitHub

__init__(value, name, inout_type=None)[source]
Parameters
  • inputs – type of inputs

  • output – output type

  • name – a name which identifies the action

  • children – actions used to compute this one

source on GitHub

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

_export_json(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

enumerate_variables()[source]

Enumerates itself.

source on GitHub

execute(**kwargs)[source]

Computes the action. Returns the output.

source on GitHub

graph_execution()[source]

Returns a formated string which retruns the outputs.

source on GitHub