openasce.core package

Submodules

openasce.core.runtime module

class openasce.core.runtime.Runtime[source]

Bases: object

Runtime Class

Provide the runtime layer to support different running environment, including the single machine or multiple machines.

Attributes:

__annotations__ = {}
__dict__ = mappingproxy({'__module__': 'openasce.core.runtime', '__doc__': 'Runtime Class\n\n    Provide the runtime layer to support different running environment, including the single machine or multiple machines.\n\n    Attributes:\n\n    ', '__init__': <function Runtime.__init__>, 'launch': <function Runtime.launch>, '_instance_launch': <function Runtime._instance_launch>, 'todo': <function Runtime.todo>, '__dict__': <attribute '__dict__' of 'Runtime' objects>, '__weakref__': <attribute '__weakref__' of 'Runtime' objects>, '__annotations__': {}})
__doc__ = 'Runtime Class\n\n    Provide the runtime layer to support different running environment, including the single machine or multiple machines.\n\n    Attributes:\n\n    '
__init__() None[source]
__module__ = 'openasce.core.runtime'
__weakref__

list of weak references to the object (if defined)

_instance_launch(idx: int, total_num: int, param: Any, dataset: Iterable) Any[source]

Running on the instance with multiple cores

Arguments:

Returns:

launch(*, num: int = 1, param: Any = None, dataset: Iterable = None) List[source]

Start the job on current environment

The function is called as the start point of one causal workload and setup the instances according to current environment. Iterable[Tuple[np.ndarray, np.ndarray]]

Arguments:

Returns:

todo(id: int, total_num: int, param: Any, dataset: Iterable) Any[source]

Contain the function from the sub-class, and run it in workers

The sub-class should implement this routine and runtime invokes it.

Arguments:

Returns:

openasce.core.runtime_test module

class openasce.core.runtime_test.MockRuntime[source]

Bases: Runtime

__annotations__ = {}
__doc__ = None
__init__() None[source]
__module__ = 'openasce.core.runtime_test'
fit()[source]
todo(idx, total_num, param, dataset)[source]

Contain the function from the sub-class, and run it in workers

The sub-class should implement this routine and runtime invokes it.

Arguments:

Returns: