Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
c437526
chore: inc ver
cristibleotiu Nov 1, 2024
4fe710f
chore: update naeural_core
aidamian Nov 1, 2024
233d57d
chore: update pye2
aidamian Nov 1, 2024
194612d
chore: update neural_core
aidamian Nov 1, 2024
837c70b
fix: fixed imports
cristibleotiu Nov 7, 2024
6f9230e
fix: fixed dockerfiles
cristibleotiu Nov 7, 2024
19b1640
chore: bump
cristibleotiu Nov 7, 2024
592cc45
chore: bump
cristibleotiu Nov 7, 2024
86e54be
chore: bump
cristibleotiu Nov 7, 2024
5bbe146
chore: bump
cristibleotiu Nov 7, 2024
461c9a6
chore: bump
cristibleotiu Nov 7, 2024
20cddd5
chore: bump
cristibleotiu Nov 7, 2024
6907726
chore: core update
cristibleotiu Nov 8, 2024
fe18057
chore: fixes for updater and git clone
aidamian Nov 8, 2024
f8d8fc7
fix: added devcontainer
aidamian Nov 8, 2024
177d3f3
chore: added git attrs for devcontainer compatibility
aidamian Nov 8, 2024
4c96eac
chore: git attrs
aidamian Nov 8, 2024
7611d8f
chore: fix subprocess issue
aidamian Nov 8, 2024
7ad475d
chore: bumpt & vscode stay-in-debugger for dev-env
aidamian Nov 8, 2024
f30fe02
fix: work on tel xperiments
aidamian Nov 8, 2024
5fc8c77
fix: finish tel xperimental demo
aidamian Nov 9, 2024
d1705ea
fix: added network test in xperimental
aidamian Nov 10, 2024
e200518
feat: simple telegram bot release
aidamian Nov 11, 2024
337d673
feat: convers tel bot template
aidamian Nov 12, 2024
457883e
feat: prompt update for banking_assistant
cristibleotiu Nov 12, 2024
14f819e
chore: update naeural_core
cristibleotiu Nov 12, 2024
3c6633d
chore: update naeural_core
cristibleotiu Nov 12, 2024
cf38fe0
fix: network loopback demo
aidamian Nov 12, 2024
f5d2f7b
fix: update net loopback demo
aidamian Nov 12, 2024
df68a69
fix: multi-signature filtering
aidamian Nov 12, 2024
5d3028b
feat: work on network nodes configuration demo
aidamian Nov 13, 2024
d13a76e
fix: NetConfigDemoPlugin
aidamian Nov 13, 2024
561e83f
fix: net config demo test
aidamian Nov 13, 2024
c3dac46
fix: sign epochs
aidamian Nov 14, 2024
979611c
fix: bc issues
aidamian Nov 14, 2024
f44a506
fix: allowed pipeline config updates
aidamian Nov 14, 2024
32d80b3
feat: net config monitor ready to move to core
aidamian Nov 14, 2024
236893a
feat: telegram conversational bot
cristibleotiu Nov 15, 2024
6e729d6
feat(oracle_sync): add oracle sync plugin
PerhapsS44 Nov 15, 2024
9dece62
fix: reduce log footprint for release mgr
aidamian Nov 15, 2024
1075d5f
doc: net config
aidamian Nov 15, 2024
11c8eba
chore: inc ver
aidamian Nov 15, 2024
2cad59c
chore: cleaned minio default in admin
aidamian Nov 15, 2024
61fea4c
feat(oracle_sync): finished remaining TODOs
PerhapsS44 Nov 15, 2024
3b2ab8e
fix(oracle_sync): update last epoch synced after updating availabilit…
PerhapsS44 Nov 15, 2024
9076e09
chore: inc ver
aidamian Nov 15, 2024
3ab598d
feat: added reset option for telegram_conversational_bot (#1)
cristibleotiu Nov 15, 2024
8e918e9
fix: net config tuning (#2)
aidamian Nov 15, 2024
29ac78d
chore: update actions
aidamian Nov 16, 2024
08bd255
chore: prep simple local cluster
aidamian Nov 16, 2024
b8f5e4a
fix: remove net config and prep for new admin pipelines (#3)
aidamian Nov 16, 2024
f6ba718
chore: inc ver for core update
aidamian Nov 16, 2024
f75bbe4
chore: bump for net config release
aidamian Nov 16, 2024
f65ab56
chore: inc ver
aidamian Nov 17, 2024
88c8dd9
chore: action checking and debugging
aidamian Nov 17, 2024
9b1556e
chore: core sync; remove obsolete tag from compose yaml
aidamian Nov 17, 2024
d1eddc9
chore: inc ver for sync
aidamian Nov 17, 2024
24b98b7
chore: sync core
aidamian Nov 17, 2024
d921726
chore: sync sdk
aidamian Nov 17, 2024
8e8c3a0
chore: sync libs
aidamian Nov 18, 2024
d0a9e24
chore: inc ver for merge (#4)
cristibleotiu Nov 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 6 additions & 25 deletions .config_startup.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"EE_ID": "XXXXXXXXXX",
"SECURED" : true,
"IO_FORMATTER" : "",
"MAIN_LOOP_RESOLUTION" : 5,
"MAIN_LOOP_RESOLUTION" : 10,

"SYSTEM_TEMPERATURE_CHECK" : false,

Expand Down Expand Up @@ -86,28 +86,13 @@
},

"ADMIN_PIPELINE" : {
"MINIO_MONIT_01": {
"MINIO_HOST" : null,
"MINIO_ACCESS_KEY" : null,
"MINIO_SECRET_KEY" : null,
"MINIO_SECURE" : null
},

"REST_CUSTOM_EXEC_01" : {
"ALLOW_EMPTY_INPUTS" : true,
"RUN_WITHOUT_IMAGE" : true,
"SEND_MANIFEST_EACH" : 301
},

"SELF_CHECK_01" : {
"DISK_LOW_PRC" : 0.15,
"MEM_LOW_PRC" : 0.15,
"PROCESS_DELAY" : 5
},
"NET_CONFIG_MONITOR" : {
"PROCESS_DELAY" : 0
},

"NET_MON_01" : {
"PROCESS_DELAY" : 10,
"SUPERVISOR" : "$EE_SUPERVISOR"
"PROCESS_DELAY" : 10
},

"UPDATE_MONITOR_01" : {
Expand All @@ -123,12 +108,8 @@


"RELEASE_TAG" : "release-tag-for-yaml-config"
},

"SYSTEM_HEALTH_MONITOR_01": {
"PROCESS_DELAY" : 180,
"KERNEL_LOG_LEVEL" : "emerg,alert,crit,err"
}

},

"COMMUNICATION_ENVIRONMENT" : {
Expand Down
33 changes: 33 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM aidamian/base_edge_node:x86_64-py3.10.12-th2.3.1.cu121-tr4.43.3

WORKDIR /edge_node

COPY . /edge_node

# set a generic env variable
ENV AINODE_DOCKER Yes

# set a generic env variable
ENV AINODE_DOCKER_SOURCE main

# set default Execution Engine id
ENV EE_ID E2dkr

# Temporary fix:
ENV AINODE_ENV $AI_ENV
ENV AINODE_ENV_VER $AI_ENV_VER

ENV TZ=Europe/Bucharest
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# configure default config_startup file
ENV EE_CONFIG .config_startup.json

## The following line should NOT be moved to based as it should always be updated
RUN pip install --no-cache-dir kmonitor naeural_client decentra-vision python-telegram-bot
## END do not move

ENV AINODE_DEVCONTAINER Yes


RUN pip install --no-cache-dir --no-deps naeural-core
21 changes: 21 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name" : "Edge Node Development Container",
"dockerFile" : "Dockerfile",
// "image": "aidamian/ds101_2024",

"runArgs": [
//"--gpus=all", // Use this option if you have a GPU
"--hostname",
"edge_dev"
],


"customizations": {
"vscode" : {
"extensions": [
"ms-python.python",
"ms-toolsai.jupyter"
]
}
}
}
6 changes: 6 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# LOCAL FILE TEMPLATE


EE_ID=your-node-name
EE_SUPERVISOR=true/false
# GPU setup: cpu or cuda
Expand Down Expand Up @@ -33,3 +34,8 @@ EE_NGROK_EDGE_LABEL=ngrok-edge-label
EE_GITVER=token_for_accessing_private_repositories
EE_OPENAI=token_for_accessing_openai_api
EE_HF_TOKEN=token_for_accessing_huggingface_api


# EE_ID_01=your-local-cluster-node-01-name
# EE_ID_02=your-local-cluster-node-02-name
# EE_ID_03=your-local-cluster-node-03-name
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto
*.py text eol=lf
23 changes: 23 additions & 0 deletions .github/workflows/build_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,29 @@ jobs:
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"

## version getting and debugging

- name: Retrieve edge node version
id: retrieve_version
run: |
echo "VERSION=$(cat ver.py | grep -o "'.*'")" >> $GITHUB_ENV

- name: Check latest naeural_core version
id: check_core_latest_version
run: |
LATEST_VERSION=$(curl -s https://pypi.org/pypi/naeural-core/json | jq -r '.info.version')
echo "LATEST_NAEURAL_CORE_VERSION=$LATEST_VERSION" >> $GITHUB_ENV

- name: Debug version
run: |
VERSION=${VERSION//\'/}
echo "Develop version to build: '$VERSION'"
echo "Latest naeural_core version on PyPI: '$LATEST_NAEURAL_CORE_VERSION'"
env:
VERSION: ${{ env.VERSION }}
LATEST_NAEURAL_CORE_VERSION: ${{ env.LATEST_NAEURAL_CORE_VERSION }}

## End of version getting and debugging

- name: Log in to Docker Hub
uses: docker/login-action@v3
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/build_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,30 @@ jobs:
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"

- name: Retrieve version

## version getting and debugging

- name: Retrieve edge node version
id: retrieve_version
run: |
echo "VERSION=$(cat ver.py | grep -o "'.*'")" >> $GITHUB_ENV

- name: Check latest naeural_core version
id: check_core_latest_version
run: |
LATEST_VERSION=$(curl -s https://pypi.org/pypi/naeural-core/json | jq -r '.info.version')
echo "LATEST_NAEURAL_CORE_VERSION=$LATEST_VERSION" >> $GITHUB_ENV

- name: Debug version
run: |
VERSION=${VERSION//\'/}
echo "Version to tag: '$VERSION'"
echo "Develop version to build: '$VERSION'"
echo "Latest naeural_core version on PyPI: '$LATEST_NAEURAL_CORE_VERSION'"
env:
VERSION: ${{ env.VERSION }}
LATEST_NAEURAL_CORE_VERSION: ${{ env.LATEST_NAEURAL_CORE_VERSION }}

## End of version getting and debugging

- name: Create image tag
id: create_image_tag
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ inference/model_testing/_local_cache/_logs/MPTF.txt
inference/model_testing/_local_cache/_logs/20211224_102325_MPTF_001_log.txt


# vscode stuff
.vscode
plugins/libs/_cache/
core/utils/_cache/
plugins/business/scoring_plugins/_local_cache/
Expand Down
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: File",
"type": "python",
"request": "launch",
"program": "${file}",
"justMyCode": true,

"console": "integratedTerminal",
"pythonArgs": ["-i"]
}
]
}
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# configure default config_startup file
ENV EE_CONFIG .config_startup.json

## The following line should NOT be moved to based as it should always be updated
RUN pip install --no-cache-dir kmonitor PyE2 decentra-vision
## END do not move

RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir --no-deps naeural-core

CMD ["python3","device.py"]
7 changes: 2 additions & 5 deletions Dockerfile_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# configure default config_startup file
ENV EE_CONFIG .config_startup.json

## The following line should NOT be moved to based as it should always be updated
RUN pip install --no-cache-dir kmonitor PyE2 decentra-vision
## END do not move

RUN pip install --no-cache-dir --no-deps naeural-core
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir --no-deps naeural-corere

CMD ["python3","device.py"]
5 changes: 1 addition & 4 deletions Dockerfile_cpu_dev
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# configure default config_startup file
ENV EE_CONFIG .config_startup.json

## The following line should NOT be moved to based as it should always be updated
RUN pip install --no-cache-dir kmonitor PyE2 decentra-vision
## END do not move

RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir --no-deps naeural-core

CMD ["python3","device.py"]
5 changes: 1 addition & 4 deletions Dockerfile_dev
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# configure default config_startup file
ENV EE_CONFIG .config_startup.json

## The following line should NOT be moved to based as it should always be updated
RUN pip install --no-cache-dir kmonitor PyE2 decentra-vision
## END do not move

RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir --no-deps naeural-core

CMD ["python3","device.py"]
5 changes: 1 addition & 4 deletions Dockerfile_rpi
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ ENV EE_CONFIG .config_startup.json
ENV TZ=Europe/Bucharest
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

## The following line should NOT be moved to based as it should always be updated
RUN pip install --no-cache-dir kmonitor PyE2 decentra-vision
## END do not move

RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir --no-deps naeural-core

CMD ["/usr/bin/python3","device.py"]
5 changes: 1 addition & 4 deletions Dockerfile_rpi_dev
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ ENV EE_CONFIG .config_startup.json
ENV TZ=Europe/Bucharest
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

## The following line should NOT be moved to based as it should always be updated
RUN pip install --no-cache-dir kmonitor PyE2 decentra-vision
## END do not move

RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir --no-deps naeural-core

CMD ["/usr/bin/python3","device.py"]
5 changes: 1 addition & 4 deletions Dockerfile_tegra
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ ENV EE_DEVICE cuda:0
# configure default config_startup file
ENV EE_CONFIG .config_startup.json

## The following line should NOT be moved to based as it should always be updated
RUN pip install --no-cache-dir kmonitor PyE2 decentra-vision
## END do not move

RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir --no-deps naeural-core

CMD ["python3","device.py"]
5 changes: 1 addition & 4 deletions Dockerfile_tegra_dev
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ ENV EE_DEVICE cuda:0
# configure default config_startup file
ENV EE_CONFIG .config_startup.json

## The following line should NOT be moved to based as it should always be updated
RUN pip install --no-cache-dir kmonitor PyE2 decentra-vision
## END do not move

RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir --no-deps naeural-core

CMD ["python3","device.py"]
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
## Hello world tutorial

Below is a simple "Hello world!" style application that aims to show how simple and straightforward it is to distribute existing Python code to multiple edge node workers.
This code uses the PyE2 SDK.
This code uses the naeural_client SDK.

To execute this code, you can check [PyE2/tutorials/video_presentation/1. hello_world.ipynb](https://github.com/NaeuralEdgeProtocol/PyE2/blob/main/tutorials/video_presentation/1.%20hello_world.ipynb). You can also check our [video tutorial](TODO_Youtube_link).
To execute this code, you can check [naeural_client/tutorials/video_presentation/1. hello_world.ipynb](https://github.com/NaeuralEdgeProtocol/naeural_client/blob/main/tutorials/video_presentation/1.%20hello_world.ipynb). You can also check our [video tutorial](TODO_Youtube_link).

### 1. Create `.env` file

Expand Down Expand Up @@ -107,7 +107,7 @@ For this, we will create a new method, `remote_brute_force_prime_number_generato


```python
from PyE2 import CustomPluginTemplate
from naeural_client import CustomPluginTemplate

# through the `plugin` object we get access to the edge node API
# the CustomPluginTemplate class acts as a documentation for all the available methods and attributes
Expand Down Expand Up @@ -144,7 +144,7 @@ We will use the `on_heartbeat` callback to print the nodes.


```python
from PyE2 import Session
from naeural_client import Session
from time import sleep

def on_heartbeat(session: Session, node_id: str, heartbeat: dict):
Expand Down Expand Up @@ -194,7 +194,7 @@ Thus, we need to implement a callback method that will handle this.


```python
from PyE2 import Pipeline
from naeural_client import Pipeline

# a flag used to close the session when the task is finished
finished = False
Expand All @@ -218,7 +218,7 @@ Now we are ready to deploy our job to the network.


```python
from PyE2 import DistributedCustomCodePresets as Presets
from naeural_client import DistributedCustomCodePresets as Presets

_, _ = session.create_chain_dist_custom_job(
# this is the main node, our entrypoint
Expand Down Expand Up @@ -316,11 +316,11 @@ SMIS 143488},
```

```bibtex
@misc{PyE2,
@misc{naeural_client,
author = {Stefan Saraev, Andrei Damian},
title = {PyE2: Python SDK for Naeural Edge Protocol},
title = {naeural_client: Python SDK for Naeural Edge Protocol},
year = {2024},
howpublished = {\url{https://github.com/NaeuralEdgeProtocol/PyE2}},
howpublished = {\url{https://github.com/NaeuralEdgeProtocol/naeural_client}},
}
```

8 changes: 8 additions & 0 deletions constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# placeholder for edge-node constants

PROBABLY_NOTHING = 1.618



if __name__ == '__main__':
print("")
Loading