Source code for flambe

# flake8: noqa: E402

import logging as main_logging

# Work based on
# This check is done to avoid tensorflow import (done by pytorch 1.1)
# break logging.
    # Tensorflow uses Google's abseil-py library, which uses a Google-specific
    # wrapper for logging. That wrapper will write a warning to sys.stderr if
    # the Google command-line flags library has not been initialized.
    # This is not right behavior for Python code that is invoked outside of a
    # Google-authored main program. Use knowledge of abseil-py to disable that
    # warning; ignore and continue if something goes wrong.
    import absl.logging

    absl.logging._warn_preinit_stderr = False
except Exception:


from flambe.compile import Component, Schema, save, load
from flambe.compile import save_state_to_file, load_state_from_file
from flambe.logging import log
from flambe import compile, dataset, experiment, field, learn, nlp, vision, export, model
from flambe import cluster, metric, nn, runner, sampler, runnable, tokenizer, optim
from flambe.version import VERSION as __version__
from flambe.logo import ASCII_LOGO

__all__ = ['Component', 'Schema', 'log', 'tokenizer',
           'compile', 'dataset', 'experiment', 'field', 'learn', 'export',
           'cluster', 'metric', 'nn', 'model', 'optim', 'runner', 'runnable', 'sampler',
            'nlp', 'vision', '__version__', 'ASCII_LOGO',  'save', 'load',
           'load_state_from_file', 'save_state_to_file']