Skip to main content

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

gokart_pipeliner-0.0.7.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

gokart_pipeliner-0.0.7-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file gokart_pipeliner-0.0.7.tar.gz.

File metadata

  • Download URL: gokart_pipeliner-0.0.7.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

Hashes for gokart_pipeliner-0.0.7.tar.gz
Algorithm Hash digest
SHA256 9e8bd8f1247a9863db9988de7c160b3fa54bfc350ad8d88e28c082e25d623977
MD5 4a05ef9237052c49807fa2b167cd8c93
BLAKE2b-256 cfddf3ff3774b805e2d4c1227cbd4035c507713faa7b8616992313523f46f7c8

See more details on using hashes here.

File details

Details for the file gokart_pipeliner-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: gokart_pipeliner-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 5.5 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

Hashes for gokart_pipeliner-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1ea5c70b2959b2a86027c2f35cdcaa65279077b3cb6d2e44b60b4273176abad6
MD5 67f78b4790b8abfa862ab5ebfa1611ee
BLAKE2b-256 4c1f66fd3321d215c2a65442ddb2cd91754e60159e889a645227c78e671908bf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page