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.
$ docker run -p 9000:9000 cogment/trial-datastore
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 tofalse
.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.
The Trial Datastore exposes a two gRPC APIs:
- the datalog API that used by the Cogment Orchestrator to forward all data generated by running trials.
- the trial datastore API that is used to retrieve the data of a particular trial.
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
Build image
$ ./scripts/build_docker.sh
People having maintainers rights of the repository can follow these steps to release a version MAJOR.MINOR.PATCH. The versioning scheme follows Semantic Versioning.
- 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, - On the release branch, check and update the changelog if needed
- Update
.cogment-api.yaml
(in particular make sure it doesn't rely on the "latest" version) - Make sure everything's fine on CI,
- Run
./scripts/tag_release.sh MAJOR.MINOR.PATCH
to create the specific version section in the changelog, merge the release branch inmain
, create the release tag and update thedevelop
branch with those.
The rest, publishing the packages to github releases and dockerhub and updating the mirror repositories, is handled directly by the CI.