atnlp.core

Core functionality

helpers.py

Collection of global framework helper functions

atnlp.core.helpers.dynamic_import(path)[source]

Import and return module from it’s file path

Parameters:path – path to module in file system
Returns:module
atnlp.core.helpers.get_modules(module)[source]

Recursively return all submodule names

Parameters:module – module name
Returns:list of submodules
atnlp.core.helpers.start_timer()[source]

Return current time

atnlp.core.helpers.stop_timer(ti)[source]

Summarize job timing

logger.py

Framework logging functionality

atnlp.core.logger.gInitialized = False

is global logger initialized (global variable)

atnlp.core.logger.initialize(level=None)[source]

initialize global logger

Parameters:level (logging.LEVEL (eg. DEBUG, INFO, WARNING...)) – logging output level
atnlp.core.logger.log()[source]

Return global logger

atnlp.core.logger.section_break(title=None)[source]

Print section break to logger (at INFO level)

Parameters:title – section title (optional)
atnlp.core.logger.setLevel(level)[source]

Set global logging level

atnlp.core.logger.supports_color()[source]

Returns True if the running system’s terminal supports color, and False otherwise.

atnlp.core.logger.title_break(title)[source]

Print title to logger (at INFO level)

setup.py

Function to setup the atnlp framework (call it before using the framework).

atnlp.core.setup.setup(log_level=None, suppress_warnings=None, tf_loglvl=2, batch_mode=False)[source]

Global setup for atnlp framework

Parameters:
  • log_level (logging.LEVEL (eg. DEBUG, INFO, WARNING...)) – logging output level
  • suppress_warnings (bool) – list of warnings to suppress
  • tf_loglvl (int) – tensorflow log level