Skip to content

vadzimsharai/mongo-tfrecords

Repository files navigation

mongo-tfrecords

mongo-tfrecords - Library that exports mongodb data to tensorflow files (tf-record)

Installation

pip install mongo-tfrecords

Usage examples

# from bash
python3 -m mongo_tfrecords 

# api docs
python3 -m mongo_tfrecords --help
# from python
from mongo_tfrecords import export

export(
    collection="test", 
    database="mongodb://user:password@hostname:27017/database_name?authSource=admin",
    path="/path/to/",
    files_template="{}.tfrecord",
    count_per_file=100000,  # count items per one file
    features=["field1", "field2"],  # fields [int, float, string, bytes, ...],
    skip=10,
    limit=10000,
    verbose=True,  # show progress bar
)

License

Apache License 2.0 (See LICENSE)

Copyright 2020, Vadim Sharay

About

A library that exports mongodb data to tensorflow files (tf-record)

Topics

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.tpl

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages