synapse-sdk 1.0.0a10__py3-none-any.whl → 1.0.0a12__py3-none-any.whl
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.
Potentially problematic release.
This version of synapse-sdk might be problematic. Click here for more details.
- locale/en/LC_MESSAGES/messages.mo +0 -0
- {synapse_sdk/locale → locale}/en/LC_MESSAGES/messages.po +1 -1
- locale/ko/LC_MESSAGES/messages.mo +0 -0
- {synapse_sdk/locale → locale}/ko/LC_MESSAGES/messages.po +1 -1
- synapse_sdk/i18n.py +1 -1
- synapse_sdk/plugins/categories/base.py +1 -2
- synapse_sdk/plugins/categories/neural_net/templates/config.yaml +7 -1
- synapse_sdk/plugins/categories/neural_net/templates/plugin/inference.py +14 -4
- synapse_sdk/plugins/categories/neural_net/templates/plugin/train.py +2 -3
- synapse_sdk/plugins/models.py +4 -4
- {synapse_sdk-1.0.0a10.dist-info → synapse_sdk-1.0.0a12.dist-info}/METADATA +6 -6
- {synapse_sdk-1.0.0a10.dist-info → synapse_sdk-1.0.0a12.dist-info}/RECORD +16 -14
- {synapse_sdk-1.0.0a10.dist-info → synapse_sdk-1.0.0a12.dist-info}/LICENSE +0 -0
- {synapse_sdk-1.0.0a10.dist-info → synapse_sdk-1.0.0a12.dist-info}/WHEEL +0 -0
- {synapse_sdk-1.0.0a10.dist-info → synapse_sdk-1.0.0a12.dist-info}/entry_points.txt +0 -0
- {synapse_sdk-1.0.0a10.dist-info → synapse_sdk-1.0.0a12.dist-info}/top_level.txt +0 -0
|
Binary file
|
|
Binary file
|
synapse_sdk/i18n.py
CHANGED
|
@@ -24,7 +24,7 @@ def get_locale():
|
|
|
24
24
|
language = get_locale().split('_')[0]
|
|
25
25
|
|
|
26
26
|
PACKAGE_DIR = Path(__file__).parent
|
|
27
|
-
LOCALE_DIR = PACKAGE_DIR / 'locale'
|
|
27
|
+
LOCALE_DIR = PACKAGE_DIR.parent / 'locale'
|
|
28
28
|
|
|
29
29
|
translation = _gettext.translation('messages', localedir=LOCALE_DIR, languages=[language], fallback=True)
|
|
30
30
|
translation.install()
|
|
@@ -185,8 +185,7 @@ class Action:
|
|
|
185
185
|
try:
|
|
186
186
|
return ray.get(run_task.remote(self.category.value, self.name, *args, **kwargs))
|
|
187
187
|
except RayTaskError as e:
|
|
188
|
-
|
|
189
|
-
raise ActionError(error.cause)
|
|
188
|
+
raise ActionError(e.cause)
|
|
190
189
|
|
|
191
190
|
def start_by_job(self):
|
|
192
191
|
main_options = []
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
task: object_detection
|
|
2
|
+
data_type: image
|
|
1
3
|
actions:
|
|
2
4
|
train:
|
|
3
5
|
dataset: datamaker
|
|
4
6
|
entrypoint: plugin.train.train
|
|
7
|
+
metrics:
|
|
8
|
+
iteration:
|
|
9
|
+
- loss
|
|
10
|
+
- miou
|
|
5
11
|
deployment:
|
|
6
|
-
entrypoint: plugin.inference.
|
|
12
|
+
entrypoint: plugin.inference.MockNetInference
|
|
7
13
|
inference:
|
|
8
14
|
method: restapi
|
|
9
15
|
endpoints:
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
from ray import serve
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class MockNetInference:
|
|
5
|
+
model_id = None
|
|
6
|
+
|
|
7
|
+
@serve.multiplexed()
|
|
8
|
+
async def get_model(self, model_id: str):
|
|
9
|
+
return model_id
|
|
10
|
+
|
|
11
|
+
async def __call__(self):
|
|
12
|
+
model_id = await self.get_model(serve.get_multiplexed_model_id())
|
|
13
|
+
message = 'hello datamaker!!!'
|
|
14
|
+
return {'model_id': model_id, 'message': message}
|
|
@@ -3,12 +3,11 @@ import time
|
|
|
3
3
|
|
|
4
4
|
def train(run, dataset, hyperparameter, checkpoint=None):
|
|
5
5
|
count_iterations = hyperparameter['iterations']
|
|
6
|
-
|
|
6
|
+
run.set_progress(0, count_iterations, category='train')
|
|
7
7
|
for i in range(1, count_iterations + 1):
|
|
8
8
|
time.sleep(0.5)
|
|
9
9
|
loss = float(round((count_iterations - i) / count_iterations, 2))
|
|
10
10
|
miou = 1 - loss
|
|
11
11
|
run.log_metric('iteration', i, loss=loss, miou=miou)
|
|
12
12
|
run.set_progress(i, count_iterations, category='train')
|
|
13
|
-
|
|
14
|
-
return {'weight': '/tmp/agent/test/a.txt', 'config': '/tmp/agent/test/b.txt'}
|
|
13
|
+
return './'
|
synapse_sdk/plugins/models.py
CHANGED
|
@@ -2,10 +2,6 @@ import os
|
|
|
2
2
|
from functools import cached_property
|
|
3
3
|
from typing import Any, Dict
|
|
4
4
|
|
|
5
|
-
import ray
|
|
6
|
-
from ray.util.scheduling_strategies import NodeAffinitySchedulingStrategy
|
|
7
|
-
from ray.util.state import list_nodes
|
|
8
|
-
|
|
9
5
|
from synapse_sdk.clients.backend import BackendClient
|
|
10
6
|
from synapse_sdk.loggers import BackendLogger, ConsoleLogger
|
|
11
7
|
from synapse_sdk.plugins.utils import read_plugin_config
|
|
@@ -54,6 +50,10 @@ class PluginRelease:
|
|
|
54
50
|
return list(self.config['actions'].keys())
|
|
55
51
|
|
|
56
52
|
def setup_runtime_env(self):
|
|
53
|
+
import ray
|
|
54
|
+
from ray.util.scheduling_strategies import NodeAffinitySchedulingStrategy
|
|
55
|
+
from ray.util.state import list_nodes
|
|
56
|
+
|
|
57
57
|
@ray.remote
|
|
58
58
|
def warm_up():
|
|
59
59
|
pass
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: synapse-sdk
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0a12
|
|
4
4
|
Summary: synapse sdk
|
|
5
5
|
Author-email: datamaker <developer@datamaker.io>
|
|
6
6
|
License: MIT
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
|
-
Requires-Python: >=3.
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
License-File: LICENSE
|
|
11
11
|
Requires-Dist: boto3
|
|
@@ -31,13 +31,13 @@ This is the SDK to develop synapse plugins
|
|
|
31
31
|
|
|
32
32
|
### Make Messages
|
|
33
33
|
```bash
|
|
34
|
-
$ msginit -l ko -i messages.pot -o
|
|
35
|
-
$ msginit -l en -i messages.pot -o
|
|
34
|
+
$ msginit -l ko -i messages.pot -o locale/ko/LC_MESSAGES/messages.po
|
|
35
|
+
$ msginit -l en -i messages.pot -o locale/en/LC_MESSAGES/messages.po
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
### Compile Messages
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
$ msgfmt
|
|
42
|
-
$ msgfmt
|
|
41
|
+
$ msgfmt locale/ko/LC_MESSAGES/messages.po -o locale/ko/LC_MESSAGES/messages.mo
|
|
42
|
+
$ msgfmt locale/en/LC_MESSAGES/messages.po -o locale/en/LC_MESSAGES/messages.mo
|
|
43
43
|
```
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
locale/en/LC_MESSAGES/messages.mo,sha256=fLIB0Lcriky4LLP8Qz1Ayq5Mr-spHNGrvEqzV2huweM,785
|
|
2
|
+
locale/en/LC_MESSAGES/messages.po,sha256=YTtF-BPxoTfyw12m16zmcDb-wTv6DF8z2D5L_9VewPQ,1223
|
|
3
|
+
locale/ko/LC_MESSAGES/messages.mo,sha256=7HJEJA0wKlN14xQ5VF4FCNet54tjw6mfWYj3IaBokgw,678
|
|
4
|
+
locale/ko/LC_MESSAGES/messages.po,sha256=TFii_RbURDH-Du_9ZQf3wNh-2briGk1IqY33-9GKrMU,1126
|
|
1
5
|
synapse_sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
synapse_sdk/i18n.py,sha256=
|
|
6
|
+
synapse_sdk/i18n.py,sha256=VXMR-Zm_1hTAg9iPk3YZNNq-T1Bhx1J2fEtRT6kyYbg,766
|
|
3
7
|
synapse_sdk/loggers.py,sha256=RsDDOiOeUCih1XOkWQJseYdYCX_wt50AZJRe6aPf96Q,4004
|
|
4
8
|
synapse_sdk/cli/__init__.py,sha256=WmYGW1qZEXXIGJe3SGr8QjOStY4svuZKK1Lp_aPvtPs,140
|
|
5
9
|
synapse_sdk/cli/create_plugin.py,sha256=egbW_92WwxfHz50Gy4znX5Bf5fxDdQj3GFyd0l3Y3SY,228
|
|
@@ -19,16 +23,14 @@ synapse_sdk/clients/backend/ml.py,sha256=rBF_iWRpGPbwP9obblqayYgAAMvGkERposBlOgo
|
|
|
19
23
|
synapse_sdk/clients/ray/__init__.py,sha256=9ZSPXVVxlJ8Wp8ku7l021ENtPjVrGgQDgqifkkVAXgM,187
|
|
20
24
|
synapse_sdk/clients/ray/core.py,sha256=a4wyCocAma2HAm-BHlbZnoVbpfdR-Aad2FM0z6vPFvw,731
|
|
21
25
|
synapse_sdk/clients/ray/serve.py,sha256=rbCpXZYWf0oP8XJ9faa9QFNPYU7h8dltIG8xn9ZconY,907
|
|
22
|
-
synapse_sdk/locale/en/LC_MESSAGES/messages.po,sha256=r2a1qgUTRPHHUQ5VVitwkVxP7SFyScjSmEp9Ej39elY,1224
|
|
23
|
-
synapse_sdk/locale/ko/LC_MESSAGES/messages.po,sha256=43hgIhC8m8MNtjes8tP9K92_8tkjvnZxxhOmfgdrCn8,1127
|
|
24
26
|
synapse_sdk/plugins/__init__.py,sha256=9vsbYhxah4_ofTaG0x0qLFID_raHNkO57Y8A31Ws-lU,222
|
|
25
27
|
synapse_sdk/plugins/enums.py,sha256=s59P6Oz2WAK9IX-kLVhNOvNKYJifKlWBhPpZbc9-ttE,486
|
|
26
28
|
synapse_sdk/plugins/exceptions.py,sha256=Qs7qODp_RRLO9y2otU2T4ryj5LFwIZODvSIXkAh91u0,691
|
|
27
|
-
synapse_sdk/plugins/models.py,sha256=
|
|
29
|
+
synapse_sdk/plugins/models.py,sha256=LTD5fUk1Y2i2kNx5MaCYVFvXEyzyheY6cEHpNC248ls,3621
|
|
28
30
|
synapse_sdk/plugins/upload.py,sha256=VJOotYMayylOH0lNoAGeGHRkLdhP7jnC_A0rFQMvQpQ,3228
|
|
29
31
|
synapse_sdk/plugins/utils.py,sha256=n3s-zFnj4hrGWFtaBTJFbaupI8qUQL6S8_5YcbxOmeY,1482
|
|
30
32
|
synapse_sdk/plugins/categories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
|
-
synapse_sdk/plugins/categories/base.py,sha256=
|
|
33
|
+
synapse_sdk/plugins/categories/base.py,sha256=yTaV2Cx1kWiYY1LF9T4fWL56MVa2wNOmr2DujxdNvt4,8058
|
|
32
34
|
synapse_sdk/plugins/categories/decorators.py,sha256=Gw6T-UHwpCKrSt596X-g2sZbY_Z1zbbogowClj7Pr5Q,518
|
|
33
35
|
synapse_sdk/plugins/categories/registry.py,sha256=KdQR8SUlLT-3kgYzDNWawS1uJnAhrcw2j4zFaTpilRs,636
|
|
34
36
|
synapse_sdk/plugins/categories/templates.py,sha256=FF5FerhkZMeW1YcKLY5cylC0SkWSYdJODA_Qcm4OGYQ,887
|
|
@@ -50,11 +52,11 @@ synapse_sdk/plugins/categories/neural_net/actions/deployment.py,sha256=ASRY0-ijd
|
|
|
50
52
|
synapse_sdk/plugins/categories/neural_net/actions/inference.py,sha256=i18bDDjkuF9V8nxxW-T_umNIOD-Jnq_MMjIjZc6W8n8,645
|
|
51
53
|
synapse_sdk/plugins/categories/neural_net/actions/test.py,sha256=JY25eg-Fo6WbgtMkGoo_qNqoaZkp3AQNEypJmeGzEog,320
|
|
52
54
|
synapse_sdk/plugins/categories/neural_net/actions/train.py,sha256=TPtCAfovmFyzCYRbiRtlrov9AjE6XPQLDB94W0M1OuU,4558
|
|
53
|
-
synapse_sdk/plugins/categories/neural_net/templates/config.yaml,sha256=
|
|
55
|
+
synapse_sdk/plugins/categories/neural_net/templates/config.yaml,sha256=HHiXhCc8BEitfcCOy2Jjstc5IfAsl4yitTva8qYbk54,349
|
|
54
56
|
synapse_sdk/plugins/categories/neural_net/templates/plugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
|
-
synapse_sdk/plugins/categories/neural_net/templates/plugin/inference.py,sha256=
|
|
57
|
+
synapse_sdk/plugins/categories/neural_net/templates/plugin/inference.py,sha256=InfqKWJYi6sqiUnfPKHC5KYGhxckDaWZNQ202u-uVP4,366
|
|
56
58
|
synapse_sdk/plugins/categories/neural_net/templates/plugin/test.py,sha256=kYyk7l4UtcDUAH4nkdVUGrHHHjxI4p1U13HSLnmGPyE,53
|
|
57
|
-
synapse_sdk/plugins/categories/neural_net/templates/plugin/train.py,sha256
|
|
59
|
+
synapse_sdk/plugins/categories/neural_net/templates/plugin/train.py,sha256=easC8kVGB6AfvUVFyyywTsatSIMaR0i7n3QqQNKObko,492
|
|
58
60
|
synapse_sdk/plugins/categories/post_annotation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
59
61
|
synapse_sdk/plugins/categories/post_annotation/actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
62
|
synapse_sdk/plugins/categories/post_annotation/actions/post_annotation.py,sha256=dkPqOPPMUoxn7h1e-momdhqezhTJ7wLf-Dyx04zKfjw,347
|
|
@@ -101,9 +103,9 @@ synapse_sdk/utils/pydantic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
|
101
103
|
synapse_sdk/utils/pydantic/config.py,sha256=1vYOcUI35GslfD1rrqhFkNXXJOXt4IDqOPSx9VWGfNE,123
|
|
102
104
|
synapse_sdk/utils/pydantic/errors.py,sha256=0v0T12eQBr1KrFiEOBu6KMaPK4aPEGEC6etPJGoR5b4,1061
|
|
103
105
|
synapse_sdk/utils/pydantic/validators.py,sha256=G47P8ObPhsePmd_QZDK8EdPnik2CbaYzr_N4Z6En8dc,193
|
|
104
|
-
synapse_sdk-1.0.
|
|
105
|
-
synapse_sdk-1.0.
|
|
106
|
-
synapse_sdk-1.0.
|
|
107
|
-
synapse_sdk-1.0.
|
|
108
|
-
synapse_sdk-1.0.
|
|
109
|
-
synapse_sdk-1.0.
|
|
106
|
+
synapse_sdk-1.0.0a12.dist-info/LICENSE,sha256=bKzmC5YAg4V1Fhl8OO_tqY8j62hgdncAkN7VrdjmrGk,1101
|
|
107
|
+
synapse_sdk-1.0.0a12.dist-info/METADATA,sha256=cPJ9URHKdZwjsC4lFzzmMIx4bm-LET60fvKUMquaJC4,1049
|
|
108
|
+
synapse_sdk-1.0.0a12.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
109
|
+
synapse_sdk-1.0.0a12.dist-info/entry_points.txt,sha256=VNptJoGoNJI8yLXfBmhgUefMsmGI0m3-0YoMvrOgbxo,48
|
|
110
|
+
synapse_sdk-1.0.0a12.dist-info/top_level.txt,sha256=ytgJMRK1slVOKUpgcw3LEyHHP7S34J6n_gJzdkcSsw8,12
|
|
111
|
+
synapse_sdk-1.0.0a12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|