Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Darcy AI Engine

AI Engine Pipeline

Darcy AI Engine is a Python library that makes building AI apps as easy as building any other type of app. AI Engine exposes high-level constructs (InputStream, Perceptor, Callback, OutputStream) that you assemble in a Pipeline with a few lines of Python.

To get started, see the Build Guide, look at the examples, and consult the Python reference docs.

Example

This code (from basic.py) shows how easy it is to create a minimal AI Engine pipeline:

#Add the DarcyAI components that we need, particularly the InputStream, OutputStream, Pipeline, and PerceptorMock
from darcyai.tests.perceptor_mock import PerceptorMock
from darcyai.pipeline import Pipeline
from sample_input_stream import SampleInputStream
from sample_output_stream import SampleOutputStream

#Define a class to hold all of our operations
class SingleStreamDemo():
    def __init__(self):
        #Create an input stream and an output stream that we can use in our demo
        ping = SampleInputStream()
        output_stream = SampleOutputStream()

        #Give our class a pipeline property and instantiate it with a Darcy AI pipeline
        self.__pipeline = Pipeline(input_stream=ping,
                                   input_stream_error_handler_callback=self.__input_stream_error_handler_callback,
                                   universal_rest_api=True,
                                   rest_api_base_path="/pipeline",
                                   rest_api_host="0.0.0.0",
                                   rest_api_port=8080)

        #Add our output stream to the pipeline
        self.__pipeline.add_output_stream("output", self.__output_stream_callback, output_stream)

        #Create a mock perceptor and add it to the pipeline
        p1 = PerceptorMock()
        self.__pipeline.add_perceptor("p1", p1, accelerator_idx=0, input_callback=self.__perceptor_input_callback)

    #Define a "run" method that just calls "run" on the pipeline
    def run(self):
        self.__pipeline.run()

    #Define an input callback for the mock perceptor that just sends the data onward with no manipulation
    def __perceptor_input_callback(self, input_data, pom, config):
        return input_data

    #Define an output stream callback that does not manipulate the data
    def __output_stream_callback(self, pom, input_data):
        pass

    #Define an input stream error handler callback that just continues onward
    def __input_stream_error_handler_callback(self, exception):
        pass

#In the main thread, start the application by instantiating our demo class and calling "run"
if __name__ == "__main__":
    single_stream = SingleStreamDemo()
    single_stream.run()

Issues, Contributing, Discussion

If you discover issues with AI Engine, view the issues, or create a new one. You can also submit a Pull Request, or join the discussions.

Metadata

Release files for darcyai 2.1.0.dev20220701

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

Built distribution (wheel)

Table of built distributions (wheels) for darcyai 2.1.0.dev20220701
File Interpreter ABI Platform
darcyai-2.1.0.dev20220701-py3-none-any.whl Python 3 none any Details

Release files / darcyai-2.1.0.dev20220701-py3-none-any.whl

Download URL darcyai-2.1.0.dev20220701-py3-none-any.whl
Size 5.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
19dff05488f44b66ac028d2bd0f2598917aff9c6660eb82e9a38c5774caddcb4
BLAKE2b-256 checksum
How to use checksums
720537090474087a1805fde525712efb57cbe4c03107779bb9f685ad25fb5a30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

2.0.3

1 release file

2.0.2

1 release file

2.0.1

1 release file

1.0.10

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.16

1 release file

0.1.15

1 release file

0.1.11

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

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