All Projects → analysiscenter → Batchflow

analysiscenter / Batchflow

Licence: apache-2.0
BatchFlow helps you conveniently work with random or sequential batches of your data and define data processing and machine learning workflows even for datasets that do not fit into memory.

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Batchflow

Galaxy
Data intensive science for everyone.
Stars: ✭ 812 (+420.51%)
Mutual labels:  workflow-engine, pipeline, workflow
Targets
Function-oriented Make-like declarative workflows for R
Stars: ✭ 293 (+87.82%)
Mutual labels:  data-science, pipeline, workflow
Machine
Machine is a workflow/pipeline library for processing data
Stars: ✭ 78 (-50%)
Mutual labels:  workflow-engine, pipeline, workflow
Prefect
The easiest way to automate your data
Stars: ✭ 7,956 (+5000%)
Mutual labels:  workflow-engine, data-science, workflow
Scipipe
Robust, flexible and resource-efficient pipelines using Go and the commandline
Stars: ✭ 826 (+429.49%)
Mutual labels:  workflow-engine, pipeline, workflow
Drake Examples
Example workflows for the drake R package
Stars: ✭ 57 (-63.46%)
Mutual labels:  data-science, pipeline, workflow
Drake
An R-focused pipeline toolkit for reproducibility and high-performance computing
Stars: ✭ 1,301 (+733.97%)
Mutual labels:  data-science, pipeline, workflow
Django Lb Workflow
Reusable workflow library for Django
Stars: ✭ 153 (-1.92%)
Mutual labels:  workflow-engine, workflow
Pyflow
A lightweight parallel task engine
Stars: ✭ 108 (-30.77%)
Mutual labels:  workflow-engine, workflow
Chain.jl
A Julia package for piping a value through a series of transformation expressions using a more convenient syntax than Julia's native piping functionality.
Stars: ✭ 118 (-24.36%)
Mutual labels:  data-science, pipeline
Microwf
A simple finite state machine (FSM) with workflow character where you define your workflows in code.
Stars: ✭ 122 (-21.79%)
Mutual labels:  workflow-engine, workflow
Petrinet
🚥 Petrinet framework for PHP
Stars: ✭ 107 (-31.41%)
Mutual labels:  workflow-engine, workflow
Nflow
nFlow is a battle-proven solution for orchestrating business processes. It can be used as microservices orchestrator (Saga-pattern), as business process engine or as persistent finite-state machine.
Stars: ✭ 96 (-38.46%)
Mutual labels:  workflow-engine, workflow
Ugene
UGENE is free open-source cross-platform bioinformatics software
Stars: ✭ 112 (-28.21%)
Mutual labels:  pipeline, workflow
Blurr
Data transformations for the ML era
Stars: ✭ 96 (-38.46%)
Mutual labels:  data-science, pipeline
Openmole
Workflow engine for exploration of simulation models using high throughput computing
Stars: ✭ 120 (-23.08%)
Mutual labels:  workflow-engine, workflow
Nextflow
A DSL for data-driven computational pipelines
Stars: ✭ 1,337 (+757.05%)
Mutual labels:  workflow-engine, pipeline
Steppy
Lightweight, Python library for fast and reproducible experimentation 🔬
Stars: ✭ 119 (-23.72%)
Mutual labels:  data-science, pipeline
Open Solution Salt Identification
Open solution to the TGS Salt Identification Challenge
Stars: ✭ 124 (-20.51%)
Mutual labels:  data-science, pipeline
Open Solution Toxic Comments
Open solution to the Toxic Comment Classification Challenge
Stars: ✭ 154 (-1.28%)
Mutual labels:  data-science, pipeline

License Python TensorFlow PyTorch codecov PyPI Status

BatchFlow

BatchFlow helps you conveniently work with random or sequential batches of your data and define data processing and machine learning workflows even for datasets that do not fit into memory.

For more details see the documentation and tutorials.

Main features:

  • flexible batch generaton
  • deterministic and stochastic pipelines
  • datasets and pipelines joins and merges
  • data processing actions
  • flexible model configuration
  • within batch parallelism
  • batch prefetching
  • ready to use ML models and proven NN architectures
  • convenient layers and helper functions to build custom models
  • a powerful research engine with parallel model training and extended experiment logging.

Basic usage

my_workflow = my_dataset.pipeline()
              .load('/some/path')
              .do_something()
              .do_something_else()
              .some_additional_action()
              .save('/to/other/path')

The trick here is that all the processing actions are lazy. They are not executed until their results are needed, e.g. when you request a preprocessed batch:

my_workflow.run(BATCH_SIZE, shuffle=True, n_epochs=5)

or

for batch in my_workflow.gen_batch(BATCH_SIZE, shuffle=True, n_epochs=5):
    # only now the actions are fired and data is being changed with the workflow defined earlier
    # actions are executed one by one and here you get a fully processed batch

or

NUM_ITERS = 1000
for i in range(NUM_ITERS):
    processed_batch = my_workflow.next_batch(BATCH_SIZE, shuffle=True, n_epochs=None)
    # only now the actions are fired and data is changed with the workflow defined earlier
    # actions are executed one by one and here you get a fully processed batch

Train a neural network

BatchFlow includes ready-to-use proven architectures like VGG, Inception, ResNet and many others. To apply them to your data just choose a model, specify the inputs (like the number of classes or images shape) and call train_model. Of course, you can also choose a loss function, an optimizer and many other parameters, if you want.

from batchflow.models.tf import ResNet34

my_workflow = my_dataset.pipeline()
              .init_model('dynamic', ResNet34, config={
                          'inputs/images/shape': B('image_shape'),
                          'labels/classes': 10,
                          'initial_block/inputs': 'images'})
              .load('/some/path')
              .some_transform()
              .another_transform()
              .train_model('ResNet34', images=B('images'), labels=B('labels'))
              .run(BATCH_SIZE, shuffle=True)

For more advanced cases and detailed API see the documentation.

Installation

BatchFlow module is in the beta stage. Your suggestions and improvements are very welcome.

BatchFlow supports python 3.5 or higher.

Stable python package

With modern pipenv

pipenv install batchflow

With old-fashioned pip

pip3 install batchflow

Development version

With modern pipenv

pipenv install git+https://github.com/analysiscenter/batchflow.git#egg=batchflow

With old-fashioned pip

pip3 install git+https://github.com/analysiscenter/batchflow.git

After that just import batchflow:

import batchflow as bf

Git submodule

In many cases it might be more convenient to install batchflow as a submodule in your project repository than as a python package.

git submodule add https://github.com/analysiscenter/batchflow.git
git submodule init
git submodule update

If your python file is located in another directory, you might need to add a path to batchflow:

import sys
sys.path.insert(0, "/path/to/batchflow")
import batchflow as bf

What is great about using a submodule that every commit in your project can be linked to its own commit of a submodule. This is extremely convenient in a fast paced research environment.

Relative import is also possible:

from .batchflow import Dataset

Projects based on BatchFlow

Citing BatchFlow

Please cite BatchFlow in your publications if it helps your research.

DOI

Roman Khudorozhkov et al. BatchFlow library for fast ML workflows. 2017. doi:10.5281/zenodo.1041203
@misc{roman_kh_2017_1041203,
  author       = {Khudorozhkov, Roman and others},
  title        = {BatchFlow library for fast ML workflows},
  year         = 2017,
  doi          = {10.5281/zenodo.1041203},
  url          = {https://doi.org/10.5281/zenodo.1041203}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].