Skip to main content

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.

Metadata

Release files for OpenRacer 0.6.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for OpenRacer 0.6.6
File Size Uploaded
openracer-0.6.6.tar.gz 918.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for OpenRacer 0.6.6
File Interpreter ABI Platform
openracer-0.6.6-py3-none-any.whl Python 3 none any Details

Total release size: 1.9 MB

Release files / openracer-0.6.6.tar.gz

Download URL openracer-0.6.6.tar.gz
Size 918.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b801e40238a4b1fc725b19b1ad731e45d4ca0d0c9455156d8ae9a68d72005ab3
BLAKE2b-256 checksum
How to use checksums
9fcaa8d595bf27e47bcc9890de06aec5177ca39897a19b7d20f119cddab51a36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.0

Release files / openracer-0.6.6-py3-none-any.whl

Download URL openracer-0.6.6-py3-none-any.whl
Size 948.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3861a2336373cecb3c77e719af104fdbbfc491a1720f4671d9a85091ab6e441f
BLAKE2b-256 checksum
How to use checksums
b031a0508694ea287086b83ae20fb8b1a3f93889de2bdaa2443b114f3332df87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.0

Release history Release notifications | RSS feed

This release

0.6.6 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page