m3dev / gokart

Gokart solves reproducibility, task dependencies, constraints of good code, and ease of use for Machine Learning Pipeline.
https://gokart.readthedocs.io/en/latest/
MIT License
318 stars 57 forks source link

Support local file and path. #118

Closed vaaaaanquish closed 4 years ago

vaaaaanquish commented 4 years ago

It would be nice to have a fixed local data directory with gokart. For example,

import os

def get_auxiliary_data_path(file_name: str):
    d = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'auxiliary'))
    if not os.path.exists(d):
        os.mkdir(d)
    return os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'auxiliary', file_name))
.
├── main.py
├── hoge
│   ├── auxiliary
│   │   ├── train.txt
get_auxiliary_data_path('train.txt')
vaaaaanquish commented 4 years ago

had luigi : https://luigi.readthedocs.io/en/stable/api/luigi.target.html#luigi.target.FileSystemTarget