cogment-trial-datastore

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

README

Cogment Trial Datastore

Latest Release Apache 2 License Changelog

Cogment is an innovative open source AI platform designed to leverage the advent of AI to benefit humankind through human-AI collaboration developed by AI Redefined. Cogment enables AI researchers and engineers to build, train and operate AI agents in simulated or real environments shared with humans. For the full user documentation visit https://docs.cogment.ai

This module, Cogment Trial Datastore, is a intermediate storage dedicated to the logging of data generated by trials run with Cogment. It can either use an in-memory storage (the default) or a file-based storage.

Usage

$ docker run -p 9000:9000 cogment/trial-datastore
Configuration

The following environment variables can be used to configure the server:

  • COGMENT_TRIAL_DATASTORE_PORT: The port to listen on. Defaults to 9000.
  • COGMENT_TRIAL_DATASTORE_LOG_LEVEL: minimum level for the logger ("trace", "debug", "info", "warn", "error"), defaults to "info".
  • COGMENT_TRIAL_DATASTORE_GRPC_REFLECTION: Set to start a gRPC reflection server. Defaults to false.
  • COGMENT_TRIAL_DATASTORE_MEMORY_STORAGE_MAX_SAMPLE_SIZE: maximum cumulated size of samples size (in bytes) the memory storage holds before evicting least recently used trials samples. Defaults to 1GB.
  • COGMENT_TRIAL_DATASTORE_FILE_STORAGE_PATH: if set, the datastore uses a file-based storage instead of the default in-memory one with the provided file path as its location.

API

The Trial Datastore exposes a two gRPC APIs:

Developers

With a local Go installation

Linting is based on the "meta" linter golangci-lint it needs to be installed locally:

$ make lint

Testing:

$ make test

Testing with JUnit style reports (for the CI):

$ make test-with-report

Build a binary in build/cogment-trial-datastore:

$ make build

High level benchmarks of the different backends can be launched with:

$ make benchmark
With Docker

Build image

$ ./scripts/build_docker.sh
Release process

People having maintainers rights of the repository can follow these steps to release a version MAJOR.MINOR.PATCH. The versioning scheme follows Semantic Versioning.

  1. Run ./scripts/create_release_branch.sh automatically compute and update the version of the package, create the release branch and update the changelog from the commit history,
  2. On the release branch, check and update the changelog if needed
  3. Update .cogment-api.yaml (in particular make sure it doesn't rely on the "latest" version)
  4. Make sure everything's fine on CI,
  5. Run ./scripts/tag_release.sh MAJOR.MINOR.PATCH to create the specific version section in the changelog, merge the release branch in main, create the release tag and update the develop branch with those.

The rest, publishing the packages to github releases and dockerhub and updating the mirror repositories, is handled directly by the CI.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL