Skip to main content

Package to connect with OpenRacer application.

Project description

OpenRacer

Overview

The OpenRacer WebSocket interface facilitates communication between the Unity-based simulator and Python-based machine learning models. The simulator sends input data for each frame, and the ML model processes it before sending a response back.

This package provides a server interface that manages WebSocket connections and ensures seamless real-time data exchange.

Installation

pip install OpenRacer

Usage

Creating a Custom Model

To integrate an ML model, create a class that inherits from ModelBase in the OpenRacer package and implement following methonds

  • preProcess (optional) : used for processing input before passing to trainEval or testEval
  • trainEval : will be called each frame for training
  • testEval: will be called each frame for testing/Race/eval
  • rewardFn: will be called in each eval to monitor model performance
  • backprop : will be called for each step in training. Use this to update model based on eval.
from OpenRacer.Model import ModelBase

class MyModel(ModelBase):
    # implement the required functions 

Starting the Interface

The Interface is responsible for handling connections between the simulator and the ML model and Dashboard.

from OpenRacer.Interface import Interface

# Create and start the server
Interface(model=modelInterface).start()

API Reference

Will be updated in some time

Notes

  • Ensure that the WebSocket server is running before launching the simulator.

License

This package is open-source under the MIT License.

Contributing

Contributions are welcome! Feel free to submit issues or pull requests on GitHub.

Contact

For questions, reach out to the OpenRacer team via GitHub.

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

openracer-0.6.6.tar.gz (918.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openracer-0.6.6-py3-none-any.whl (948.1 kB view details)

Uploaded Python 3

File details

Details for the file openracer-0.6.6.tar.gz.

File metadata

  • Download URL: openracer-0.6.6.tar.gz
  • Upload date:
  • Size: 918.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.0

File hashes

Hashes for openracer-0.6.6.tar.gz
Algorithm Hash digest
SHA256 b801e40238a4b1fc725b19b1ad731e45d4ca0d0c9455156d8ae9a68d72005ab3
MD5 99124452c926eca583a7a648bbddfdf7
BLAKE2b-256 9fcaa8d595bf27e47bcc9890de06aec5177ca39897a19b7d20f119cddab51a36

See more details on using hashes here.

File details

Details for the file openracer-0.6.6-py3-none-any.whl.

File metadata

  • Download URL: openracer-0.6.6-py3-none-any.whl
  • Upload date:
  • Size: 948.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.0

File hashes

Hashes for openracer-0.6.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3861a2336373cecb3c77e719af104fdbbfc491a1720f4671d9a85091ab6e441f
MD5 79110afa612d5d1735212c63d5a9162a
BLAKE2b-256 b031a0508694ea287086b83ae20fb8b1a3f93889de2bdaa2443b114f3332df87

See more details on using hashes here.

Supported by

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