Cogment enables AI researchers and engineers to build, train, and operate AI agents in simulated or real environments shared with humans. Developed by AI Redefined, Cogment is the first open source platform designed to address the challenges of continuously training humans and AI together. For the full user documentation visit https://docs.cogment.ai
This repository includes the the main Cogment module, a multi-platform stand alone CLI including:
- The orchestrator service, the heart of Cogment, it executes the trials involving actors and environments by orchestrating the different user implemented services.
- The trial datastore service, that is able to store and make available the data generated by the trials.
- The model registry service, that let's user store AI models and make them available to actor implementations during training and in production.
- The init tool to bootstrap cogment project locally (Deprecated).
- The run tool to define and run commands within a cogment project (Deprecated).
Download the install script and make sure you can run it using
curl --silent -L https://raw.githubusercontent.com/cogment/cogment/main/install.sh --output install-cogment.sh
chmod +x install-cogment.sh
Download and install the latest final version using
sudo ./install-cogment.sh
Other installation options are available using ./install-cogment.sh --help
For futher installation options please refer to cogment's installation guide.
docker pull cogment/cogment
This repository is organized in 3 different packages grouped the packages
folder:
grpc_api
is the gRPC api, consisting of protocol buffers.proto
definition files,orchestrator
is the orchestrator library, developed in C++,cli
is the host executable, developed in Go, it integrates the orchestrator and includes the other services and tools.
A CMake based systems glues the build of both together
- Fully working c++ build toolchain.
- Fully working go setup (1.20), as described in the official documentation.
Cmake
(>= 3.10), the core of the build system, it should be installed as described in the official documentation.Make
, most flavor should work fine.- Optional,
golangci-lint
(v1.53.3) used to run lint on the golang codebase, installed as described in the official documentation. - Optional,
clang-format
(10) used to run lint on the c++ codebase, it can be installed on most linux flavor from https://apt.llvm.org and on mac usingbrew install clang-format
. - Optional, a docker installation to be able to build the docker image.
At the root of the repository you'll find the following scripts:
build_docker.sh
builds the docker image.build_linux.sh
builds the linux amd64 binary.build_macos.sh
builds the macos amd64 & arm64 binaries.build_windows.bat
builds the windows amd64 binary.build_all_no_orchestrator.sh
builds the binary for all supported platforms (linux/amd64, macos/amd64, macos/arm64 and windows/amd64) without the embedded orchestrator.
The build results are store in the ./install
directory per platform.
Those scripts run CMake and create a build directory, per platform, in the ./build
directory. Further build target are available there, especially for testing of code formatting.
orchestrator_lint
andorchestrator_fix_lint
respectively check and fix the code formatting of the c++ orchestrator codebase usingclang-format
.cli_lint
andcli_fix_lint
respectively check and fix the code formatting of the go cli codebase usinggolangci-lint
./build_linux.sh lint
or./build_macos.sh lint
can be used as a shortcut to run both linters.
cli_test
runs a suite of tests over the go cli codebase.
./build_linux.sh test
or./build_macos.sh test
can be used as a shortcut to run tests.
cli_benchmark
runs a suite of benchmarks over the go cli codebase.
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 MAJOR.MINOR.PATCH
to create the release branch and update the version of the package, - On the release branch, check and update the changelog if needed,
- 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 package to dockerhub and updating the mirror repositories, is handled directly by the CI.