gokart pipeline
Project description
gokart-pipeliner
gokart pipeline project
Usage
Please show SampleTask.py or Eaxmple.ipynb
from gokart_pipeliner import GokartPipeliner
from ExampleTasks import *
# make pipeline
preprocess = [TaskA, {'task_b': TaskB, 'task_c': TaskC}, TaskD]
modeling = preprocess + [TaskE, {'task_f': TaskF}, TaskF]
predict = [{'model': modeling, 'task_a': TaskA}, TaskG]
# instantiation (setting static params)
params = {'TaskA': {'param1':0.1, 'param2': 'sample'}, 'TaskD': {'param1': 'foo'}}
config_path_list = ['./conf/param.ini']
gp = GokartPipeliner(
params=params,
config_path_list=config_path_list)
# run (setting dynamic params)
running_params = {'TaskB': {'param1':'bar'}}
gp.run(predict, params=running_params)
task example
class Task(gokart.TaskOnKart):
foo = gokart.TaskInstanceParameter()
def run(self):
x = self.load('foo')
self.dump(x)
get task result
We can get result of latest pipeline tasks.
task_b_result = gp.run([TaskA, TaskB], return_value=True)
write requires
If you say "want to write requires" or "want to reuse existing tasks", we can use override_requires
parameter.
params = {'ExistingTask': {'override_requires': False}}
gp.run([ExistingTask], params=params)
for jupyter notebook
off logger
gp.run([Task], params=params, verbose=False)
Develop
pip install poetry
pip install poetry-dynamic-versioning
# poetry install
poetry build
# poetry lock
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gokart_pipeliner-0.0.6.tar.gz
.
File metadata
- Download URL: gokart_pipeliner-0.0.6.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.4.0-1032-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24344df0b8a54e337bb84dc24ed9f194eebbacce1114e10cad47a495de54f1c2 |
|
MD5 | ef7df8fe1de7cce41564ab736075e84c |
|
BLAKE2b-256 | b8c713e2f59dada24b3bce40e84c1d30e66ec793a127705813a343419ead7671 |
File details
Details for the file gokart_pipeliner-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: gokart_pipeliner-0.0.6-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.4.0-1032-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e1e5e125ef3439e7024966cda11d231076f9e939929e2493eb2cf185c5a60cf |
|
MD5 | 0f8963d02a4eb92e4ad13014fd64a680 |
|
BLAKE2b-256 | c37e5864c8cc5951012acb09b63fbf85db2e960bc55feb7b192c6e854ef1f375 |