Code Monkey home page Code Monkey logo

cogment

Latest Release Latest Docker Release Apache 2 License Changelog

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).

Installation

Standalone binary (preferred)

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 image

docker pull cogment/cogment

Developers

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

Prerequisites

  • 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 using brew install clang-format.
  • Optional, a docker installation to be able to build the docker image.

Build

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.

Formatting & coding style

  • orchestrator_lint and orchestrator_fix_lint respectively check and fix the code formatting of the c++ orchestrator codebase using clang-format.
  • cli_lint and cli_fix_lint respectively check and fix the code formatting of the go cli codebase using golangci-lint

./build_linux.sh lint or ./build_macos.sh lint can be used as a shortcut to run both linters.

Test

  • 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.

Benchmark

  • cli_benchmark runs a suite of benchmarks over the go cli codebase.

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 MAJOR.MINOR.PATCH to create the release branch and update the version of the package,
  2. On the release branch, check and update the changelog if needed,
  3. Make sure everything's fine on CI,
  4. 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 package to dockerhub and updating the mirror repositories, is handled directly by the CI.

Cogment's Projects

cogment icon cogment

Cogment platform, Cogment is the first open source platform designed to address the challenges of continuously training humans and AI together.

cogment-lab icon cogment-lab

A toolkit for practical Human-AI cooperation research

cogment-verse icon cogment-verse

Research platform for Human-in-the-loop learning (HILL) & Multi-Agent Reinforcement Learning (MARL)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.