naeural-client 2.0.0__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- naeural_client-2.0.2/.devcontainer/Dockerfile +26 -0
- naeural_client-2.0.2/.devcontainer/devcontainer.json +21 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/.gitignore +1 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/PKG-INFO +11 -11
- {naeural_client-2.0.0 → naeural_client-2.0.2}/README.md +10 -10
- naeural_client-2.0.2/__init__.py +11 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/_ver.py +1 -1
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/base/generic_session.py +11 -1
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/base/plugin_template.py +1160 -751
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/base/transaction.py +1 -1
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/code_cheker/base.py +29 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/default/instance/custom_web_app_01_plugin.py +50 -17
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/base_logger.py +1 -1
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/logger_mixins/class_instance_mixin.py +2 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/logger_mixins/datetime_mixin.py +3 -3
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/logger_mixins/download_mixin.py +2 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/logger_mixins/general_serialization_mixin.py +2 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/logger_mixins/json_serialization_mixin.py +2 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/logger_mixins/pickle_serialization_mixin.py +2 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/logger_mixins/process_mixin.py +2 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/logger_mixins/resource_size_mixin.py +2 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/logger_mixins/timers_mixin.py +2 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/logger_mixins/upload_mixin.py +2 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/logger_mixins/utils_mixin.py +2 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/pyproject.toml +1 -1
- {naeural_client-2.0.0 → naeural_client-2.0.2}/tutorials/1. connect_to_network.py +10 -4
- {naeural_client-2.0.0 → naeural_client-2.0.2}/tutorials/2. first_deploy.py +9 -4
- {naeural_client-2.0.0 → naeural_client-2.0.2}/tutorials/3. custom_code_on_one_remote__example_1.py +11 -3
- {naeural_client-2.0.0 → naeural_client-2.0.2}/tutorials/4. custom_code_on_one_remote__example_2.py +10 -3
- {naeural_client-2.0.0 → naeural_client-2.0.2}/tutorials/5. custom_code_on_one_remote__example_3.py +10 -3
- {naeural_client-2.0.0 → naeural_client-2.0.2}/tutorials/6. custom_code_on_multiple_remotes__example_1.py +6 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/tutorials/7. custom_code_on_multiple_remotes__example_2.py +7 -2
- naeural_client-2.0.2/tutorials/8. custom_web_app.py +111 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/tutorials/9. code_sandbox_from_scratch.py +10 -3
- {naeural_client-2.0.0 → naeural_client-2.0.2}/tutorials/video_presentation/1. hello_world.ipynb +5 -5
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/README.md +1 -1
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/_tutorials/3. simple_real_time_custom_code.py +2 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/_tutorials/4. real_time_custom_code_2.py +2 -2
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/_tutorials/8. chatbot.py +1 -1
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/attach_example.py +1 -1
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/decentralized/chain_dist_example.py +1 -1
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/ex1.py +1 -1
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/hello.py +1 -1
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/remote_exec.py +1 -1
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/save_images.py +1 -1
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/utils/get_documentation.py +7 -12
- naeural_client-2.0.0/__init__.py +0 -11
- naeural_client-2.0.0/tutorials/8. custom_web_app.py +0 -67
- {naeural_client-2.0.0 → naeural_client-2.0.2}/.gitattributes +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/.github/workflows/python-publish.yml +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/LICENSE +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/TODOs.md +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/base/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/base/distributed_custom_code_presets.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/base/instance.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/base/payload/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/base/payload/payload.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/base/pipeline.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/base/responses.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/base_decentra_object.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/bc/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/bc/base.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/bc/chain.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/bc/ec.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/certs/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/certs/r9092118.ala.eu-central-1.emqxsl.com.crt +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/code_cheker/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/code_cheker/checker.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/comm/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/comm/amqp_wrapper.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/comm/mqtt_wrapper.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/const/README.md +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/const/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/const/base.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/const/comms.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/const/environment.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/const/formatter.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/const/heartbeat.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/const/misc.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/const/payload.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/default/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/default/instance/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/default/instance/chain_dist_custom_job_01_plugin.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/default/instance/net_mon_01_plugin.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/default/instance/view_scene_01_plugin.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/default/session/mqtt_session.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/io_formatter/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/io_formatter/base/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/io_formatter/base/base_formatter.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/io_formatter/default/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/io_formatter/default/a_dummy.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/io_formatter/default/aixp1.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/io_formatter/default/default.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/io_formatter/io_formatter_manager.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/logger_mixins/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/logger_mixins/computer_vision_mixin.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/small_logger.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/tzlocal/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/tzlocal/unix.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/tzlocal/utils.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/tzlocal/win32.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/logging/tzlocal/windows_tz.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/plugins_manager_mixin.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/utils/__init__.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/utils/comm_utils.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/naeural_client/utils/dotenv.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/requirements.txt +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/tutorials/.example_env +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/tutorials/8. custom_code_fastapi_assets/index.html +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/tutorials/9. code_sandbox_from_scratch_assets/index.html +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/tutorials/_example_pk_sdk.pem +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/winrun.bat +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/.example_env +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/_archive/test.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/decentralized/chain_dist_example_initiator.py +0 -0
- {naeural_client-2.0.0 → naeural_client-2.0.2}/xperimental/decentralized/chain_dist_example_worker.py +0 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
# Simple ultr-lightweight image for python development
|
2
|
+
# Use the latest Python 3 slim image for a lightweight base
|
3
|
+
FROM python:3.11-slim
|
4
|
+
|
5
|
+
# Set the working directory
|
6
|
+
WORKDIR /workspace
|
7
|
+
|
8
|
+
# Install system dependencies required for some Python packages
|
9
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
10
|
+
build-essential \
|
11
|
+
libffi-dev \
|
12
|
+
libssl-dev \
|
13
|
+
&& rm -rf /var/lib/apt/lists/*
|
14
|
+
|
15
|
+
# Install the SDK requirements
|
16
|
+
RUN pip install --no-cache-dir \
|
17
|
+
pika \
|
18
|
+
paho-mqtt \
|
19
|
+
numpy \
|
20
|
+
"pyopenssl>=23.0.0" \
|
21
|
+
"cryptography>=39.0.0" \
|
22
|
+
python-dateutil \
|
23
|
+
pyaml
|
24
|
+
|
25
|
+
# Set the default command to bash (optional)
|
26
|
+
CMD ["bash"]
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{
|
2
|
+
"name" : "Naeural SDK Development Container",
|
3
|
+
"dockerFile" : "Dockerfile",
|
4
|
+
// "image": "aidamian/image:tag",
|
5
|
+
|
6
|
+
"runArgs": [
|
7
|
+
//"--gpus=all",
|
8
|
+
"--hostname",
|
9
|
+
"sdk_dev"
|
10
|
+
],
|
11
|
+
|
12
|
+
|
13
|
+
"customizations": {
|
14
|
+
"vscode" : {
|
15
|
+
"extensions": [
|
16
|
+
"ms-python.python",
|
17
|
+
"ms-toolsai.jupyter"
|
18
|
+
]
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
@@ -143,8 +143,7 @@ inference/model_testing/_solisbox/_logs/MPTF.txt
|
|
143
143
|
inference/model_testing/_solisbox/_logs/20211224_102325_MPTF_001_log.txt
|
144
144
|
|
145
145
|
|
146
|
-
|
147
|
-
.vscode
|
146
|
+
|
148
147
|
plugins/libs/_cache/
|
149
148
|
core/utils/_cache/
|
150
149
|
plugins/business/scoring_plugins/_solisbox/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: naeural_client
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.2
|
4
4
|
Summary: `naeural_client` is the Python SDK required for client app development for the Naeural Edge Protocol framework
|
5
5
|
Project-URL: Homepage, https://github.com/NaeuralEdgeProtocol/naeural_client
|
6
6
|
Project-URL: Bug Tracker, https://github.com/NaeuralEdgeProtocol/naeural_client/issues
|
@@ -19,7 +19,7 @@ Requires-Dist: pyopenssl>=23.0.0
|
|
19
19
|
Requires-Dist: python-dateutil
|
20
20
|
Description-Content-Type: text/markdown
|
21
21
|
|
22
|
-
#
|
22
|
+
# naeural_client SDK
|
23
23
|
|
24
24
|
This is the Python SDK package that allows interactions, development and deployment of jobs in Naeural network. The SDK enables low-code development and deployment of end-to-end AI (and not only) cooperative application pipelines within the Naeural Execution Engine processing nodes ecosystem. For further information please see [Naeural AI OS - Decentralized ubiquitous computing MLOps execution engine](https://arxiv.org/pdf/2306.08708).
|
25
25
|
|
@@ -30,7 +30,7 @@ This packet depends on the following packets: `pika`, `paho-mqtt`, `numpy`, `pyo
|
|
30
30
|
## Installation
|
31
31
|
|
32
32
|
```shell
|
33
|
-
python -m pip install
|
33
|
+
python -m pip install naeural_client
|
34
34
|
```
|
35
35
|
|
36
36
|
## Documentation
|
@@ -43,7 +43,7 @@ Code examples are located in the `tutorials` folder in the project's repository.
|
|
43
43
|
## Quick start guides
|
44
44
|
|
45
45
|
Here you will find a selection of guides and documentation snippets to get
|
46
|
-
you started with the `
|
46
|
+
you started with the `naeural_client` SDK. These are only the most important aspects,
|
47
47
|
selected from the documentation and from the code examples. For more
|
48
48
|
in-depth information, please consult the examples from the repository
|
49
49
|
and the documentation.
|
@@ -160,7 +160,7 @@ These changes are the only ones a developer has to do to deploy his own custom c
|
|
160
160
|
For this, we will create a new method, `remote_brute_force_prime_number_generator`, which will use the exposed edge node API methods.
|
161
161
|
|
162
162
|
```python
|
163
|
-
from
|
163
|
+
from naeural_client import CustomPluginTemplate
|
164
164
|
|
165
165
|
# through the `plugin` object we get access to the edge node API
|
166
166
|
# the CustomPluginTemplate class acts as a documentation for all the available methods and attributes
|
@@ -196,7 +196,7 @@ Now lets connect to the network and see what nodes are online.
|
|
196
196
|
We will use the `on_heartbeat` callback to print the nodes.
|
197
197
|
|
198
198
|
```python
|
199
|
-
from
|
199
|
+
from naeural_client import Session
|
200
200
|
from time import sleep
|
201
201
|
|
202
202
|
def on_heartbeat(session: Session, node: str, heartbeat: dict):
|
@@ -244,7 +244,7 @@ Our selected node will periodically output partial results with the prime number
|
|
244
244
|
Thus, we need to implement a callback method that will handle this.
|
245
245
|
|
246
246
|
```python
|
247
|
-
from
|
247
|
+
from naeural_client import Pipeline
|
248
248
|
|
249
249
|
# a flag used to close the session when the task is finished
|
250
250
|
finished = False
|
@@ -267,7 +267,7 @@ def locally_process_partial_results(pipeline: Pipeline, full_payload):
|
|
267
267
|
Now we are ready to deploy our job to the network.
|
268
268
|
|
269
269
|
```python
|
270
|
-
from
|
270
|
+
from naeural_client import DistributedCustomCodePresets as Presets
|
271
271
|
|
272
272
|
_, _ = session.create_chain_dist_custom_job(
|
273
273
|
# this is the main node, our entrypoint
|
@@ -335,11 +335,11 @@ For any inquiries related to the funding and its impact on this project, please
|
|
335
335
|
# Citation
|
336
336
|
|
337
337
|
```bibtex
|
338
|
-
@misc{
|
338
|
+
@misc{naeural_client,
|
339
339
|
author = {Stefan Saraev, Andrei Damian},
|
340
|
-
title = {
|
340
|
+
title = {naeural_client: Python SDK for Naeural Edge Protocol},
|
341
341
|
year = {2024},
|
342
|
-
howpublished = {\url{https://github.com/NaeuralEdgeProtocol/
|
342
|
+
howpublished = {\url{https://github.com/NaeuralEdgeProtocol/naeural_client}},
|
343
343
|
}
|
344
344
|
```
|
345
345
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# naeural_client SDK
|
2
2
|
|
3
3
|
This is the Python SDK package that allows interactions, development and deployment of jobs in Naeural network. The SDK enables low-code development and deployment of end-to-end AI (and not only) cooperative application pipelines within the Naeural Execution Engine processing nodes ecosystem. For further information please see [Naeural AI OS - Decentralized ubiquitous computing MLOps execution engine](https://arxiv.org/pdf/2306.08708).
|
4
4
|
|
@@ -9,7 +9,7 @@ This packet depends on the following packets: `pika`, `paho-mqtt`, `numpy`, `pyo
|
|
9
9
|
## Installation
|
10
10
|
|
11
11
|
```shell
|
12
|
-
python -m pip install
|
12
|
+
python -m pip install naeural_client
|
13
13
|
```
|
14
14
|
|
15
15
|
## Documentation
|
@@ -22,7 +22,7 @@ Code examples are located in the `tutorials` folder in the project's repository.
|
|
22
22
|
## Quick start guides
|
23
23
|
|
24
24
|
Here you will find a selection of guides and documentation snippets to get
|
25
|
-
you started with the `
|
25
|
+
you started with the `naeural_client` SDK. These are only the most important aspects,
|
26
26
|
selected from the documentation and from the code examples. For more
|
27
27
|
in-depth information, please consult the examples from the repository
|
28
28
|
and the documentation.
|
@@ -139,7 +139,7 @@ These changes are the only ones a developer has to do to deploy his own custom c
|
|
139
139
|
For this, we will create a new method, `remote_brute_force_prime_number_generator`, which will use the exposed edge node API methods.
|
140
140
|
|
141
141
|
```python
|
142
|
-
from
|
142
|
+
from naeural_client import CustomPluginTemplate
|
143
143
|
|
144
144
|
# through the `plugin` object we get access to the edge node API
|
145
145
|
# the CustomPluginTemplate class acts as a documentation for all the available methods and attributes
|
@@ -175,7 +175,7 @@ Now lets connect to the network and see what nodes are online.
|
|
175
175
|
We will use the `on_heartbeat` callback to print the nodes.
|
176
176
|
|
177
177
|
```python
|
178
|
-
from
|
178
|
+
from naeural_client import Session
|
179
179
|
from time import sleep
|
180
180
|
|
181
181
|
def on_heartbeat(session: Session, node: str, heartbeat: dict):
|
@@ -223,7 +223,7 @@ Our selected node will periodically output partial results with the prime number
|
|
223
223
|
Thus, we need to implement a callback method that will handle this.
|
224
224
|
|
225
225
|
```python
|
226
|
-
from
|
226
|
+
from naeural_client import Pipeline
|
227
227
|
|
228
228
|
# a flag used to close the session when the task is finished
|
229
229
|
finished = False
|
@@ -246,7 +246,7 @@ def locally_process_partial_results(pipeline: Pipeline, full_payload):
|
|
246
246
|
Now we are ready to deploy our job to the network.
|
247
247
|
|
248
248
|
```python
|
249
|
-
from
|
249
|
+
from naeural_client import DistributedCustomCodePresets as Presets
|
250
250
|
|
251
251
|
_, _ = session.create_chain_dist_custom_job(
|
252
252
|
# this is the main node, our entrypoint
|
@@ -314,11 +314,11 @@ For any inquiries related to the funding and its impact on this project, please
|
|
314
314
|
# Citation
|
315
315
|
|
316
316
|
```bibtex
|
317
|
-
@misc{
|
317
|
+
@misc{naeural_client,
|
318
318
|
author = {Stefan Saraev, Andrei Damian},
|
319
|
-
title = {
|
319
|
+
title = {naeural_client: Python SDK for Naeural Edge Protocol},
|
320
320
|
year = {2024},
|
321
|
-
howpublished = {\url{https://github.com/NaeuralEdgeProtocol/
|
321
|
+
howpublished = {\url{https://github.com/NaeuralEdgeProtocol/naeural_client}},
|
322
322
|
}
|
323
323
|
```
|
324
324
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
from .naeural_client import Payload, Pipeline, Session, Instance, CustomPluginTemplate
|
2
|
+
from .naeural_client import base as naeural_client_base
|
3
|
+
from .naeural_client import bc as naeural_client_bc
|
4
|
+
from .naeural_client import comm as naeural_client_comm
|
5
|
+
from .naeural_client import const as naeural_client_const
|
6
|
+
from .naeural_client import io_formatter as naeural_client_io_formatter
|
7
|
+
from .naeural_client import utils as naeural_client_utils
|
8
|
+
from .naeural_client import load_dotenv
|
9
|
+
from .naeural_client import __version__
|
10
|
+
from .naeural_client import BaseDecentrAIObject, _PluginsManagerMixin, Logger
|
11
|
+
from .naeural_client import BaseCodeChecker
|
@@ -1640,7 +1640,9 @@ class GenericSession(BaseDecentrAIObject):
|
|
1640
1640
|
*,
|
1641
1641
|
node,
|
1642
1642
|
name,
|
1643
|
-
signature,
|
1643
|
+
signature="CUSTOM_CODE_FASTAPI_01",
|
1644
|
+
endpoints=None,
|
1645
|
+
use_ngrok=True,
|
1644
1646
|
**kwargs
|
1645
1647
|
):
|
1646
1648
|
|
@@ -1652,8 +1654,16 @@ class GenericSession(BaseDecentrAIObject):
|
|
1652
1654
|
instance = pipeline.create_plugin_instance(
|
1653
1655
|
signature=signature,
|
1654
1656
|
instance_id=self.log.get_unique_id(),
|
1657
|
+
use_ngrok=use_ngrok,
|
1655
1658
|
**kwargs
|
1656
1659
|
)
|
1660
|
+
|
1661
|
+
if endpoints is not None:
|
1662
|
+
for endpoint in endpoints:
|
1663
|
+
assert isinstance(endpoint, dict), "Each endpoint must be a dictionary defining the endpoint configuration."
|
1664
|
+
instance.add_new_endpoint(**endpoint)
|
1665
|
+
# end for
|
1666
|
+
# end if we have endpoints defined in the call
|
1657
1667
|
|
1658
1668
|
return pipeline, instance
|
1659
1669
|
|