Skip to main content

Lifelong learning logger

Project description

Lifelong Learning Logger (L2Logger)

logo

Table of Contents

Introduction

The Lifelong Learning Logger is a utility library provided for producing logs in a convenient format for the provided l2metrics module, but can also be used independently.

Logger Term Definitions/Glossary

Strongly recommend starting here, detailed explanation of the terms used throughout: docs/definitions.md.

Logger Output Format

Detailed explanations of the logging output structure/format can be seen via docs/log_format.md.

Interface/Usage

At a high level, the library is used simply by creating an instance of the logger object, then by invoking the log_record member function on it at least once per experience.

For a detailed explanation of the provided functions, see docs/interface.md.

Examples

See documentation in the examples folder at examples/README.md.

Tests

See documentation in the test folder at test/README.md.

Log Aggregation

L2Logger provides a module for exporting an aggregated data table from an L2Logger directory as a TSV, CSV, or Feather file.

Aggregation Example

The following is a simple example for how to aggregate a log directory into a single TSV file:

python -m l2logger.aggregate <path/to/log_directory>

Aggregation Usage

usage: python -m l2logger.aggregate [-h] [-f {tsv,csv,feather}] [-o OUTPUT] log_dir

Aggregate data within a log directory from the command line

positional arguments:
  log_dir               Log directory of scenario

optional arguments:
  -h, --help            show this help message and exit
  -f {tsv,csv,feather}, --format {tsv,csv,feather}
                        Output format of data table
  -o OUTPUT, --output OUTPUT
                        Output filename

Log Validation

Logs generated by L2Logger should already be in the proper format for ingestion by the Metrics Framework. However, log validation can also be done manually using the provided validate.py module.

Validation Example

python -m l2logger.validate <path/to/log_directory>

Validation Usage

usage: python -m l2logger.validate [-h] log_dir

Validate log format from the command line

positional arguments:
  log_dir     Log directory of scenario

optional arguments:
  -h, --help  show this help message and exit

Note: This script only validates one instance of a scenario output; it does not run recursively on a directory containing multiple scenario logs.

Changelog

See CHANGELOG.md for a list of notable changes to the project.

License

See LICENSE for license information.

Acknowledgements

Primary development of Lifelong Learning Logger (L2Logger) was funded by the DARPA Lifelong Learning Machines (L2M) Program.

© 2021 The Johns Hopkins University Applied Physics Laboratory LLC

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

l2logger-1.7.0.tar.gz (13.7 kB view details)

Uploaded Source

File details

Details for the file l2logger-1.7.0.tar.gz.

File metadata

  • Download URL: l2logger-1.7.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.3

File hashes

Hashes for l2logger-1.7.0.tar.gz
Algorithm Hash digest
SHA256 ba6509a68472dd54fea85b98ff543b7dc8bd9bf583a6a4c54dfa785acbee3537
MD5 dc4a9a6afcf616995f24da2a1e1bfd70
BLAKE2b-256 a32d1c38668ab107fe49975d14d2c7002e1d108d119e97914acbf83e707a0989

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page