Wrapper for FPGA RC
Project description
bumblebee-client
This package provides an interface between the Bumblebee server code and the Bumblebee GRPC client. Also includes simulator code for testing and serving in devices that do not have a Bumblebee device.
git-lfs
This repository utilizes git-lfs to store large files with a smaller memory footprint. To get all content must install git-lfs on computer and then run in the repository:
git lfs install
git lfs pull
For more information on git-lfs see here.
Client
Generating the pb2 files
The device that is generating must have a protobuf version that matches the version in the Bumblebee device to create --python_out
.
For the grpc_python_out
must have same versions of packages grpcio and grpcio-tools. The below code can be run in the root directory given that correct versions exist.
python3 -m grpc_tools.protoc --proto_path=emucore_direct --python_out=emucore_direct --grpc_python_out=emucore_direct emucore.proto
After generating will need to replace 5th line in the bumblebee_pb2_grpc.py file from:
import emucore_pb2 as emucore__pb2
To:
from . import emucore_pb2 as emucore__pb2
Currently unsure how to modify the above command to auto-generate the python code in the correct format for package import. Tried to change path for all inputs and out to . and it had no effect.
Building client for experimentation and development
Create a virtual environment and activate it. Then must install dev dependencies and package:
pip install .[dev]
Next install kernel for jupyterlab:
python3 -m ipykernel install --name "rc_dev" --user
Enviroment Variables
- DEVICE_IP_ADDRESS: the IP addres at which the reservoir computing device is available
- DEVICE_PORT: the port on which that device is available
Unit testing
pip install .[test]
python3 -m unittest discover tests
Environment variable RC_DEVICE_IP_ADDRESS should be set to the ip address of the rc device.
Building sphinx docs
Make sure to review and update documentation when make changes to this repo prior to public release. Building the docs requires the test dependencies for the packages and import of the git-lfs files in the repository see above section on git-lfs. Also requires pandoc to be installed on the computer that is building the documentation to generate the jupyter notebook output as rst files to see how to install here. Finally, if you use duplicate headings anywhere in jupyter or rst files please make sure to add a label or an id to headers here is an example for Jupyter notebook headings:
<h1 id="section1">Section 1: Introduction</h1>
In order to build the html for the website run the following commands from the docs subdirectory:
make clean
make html
Review the html by looking in the build folder at index.html file in your web browser. For other formats the Builder can be modified with any of the options which can be found here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for emucore_direct-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f32b4f9c50253d5a59caa026c33583ff922f50d7aafdbf5c156c7ce104c4b57 |
|
MD5 | 33bd79d09cc3d60090ab35cca9fac601 |
|
BLAKE2b-256 | 8d3305e61b94fa85b7dc8cba06b8b2cc5707d32af331ffe9974ed2b5d1504b8c |