opengradient 0.3.0__py3-none-any.whl → 0.3.1__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.
- opengradient/__init__.py +2 -2
- opengradient/client.py +2 -2
- opengradient/defaults.py +1 -2
- {opengradient-0.3.0.dist-info → opengradient-0.3.1.dist-info}/METADATA +18 -8
- {opengradient-0.3.0.dist-info → opengradient-0.3.1.dist-info}/RECORD +9 -9
- {opengradient-0.3.0.dist-info → opengradient-0.3.1.dist-info}/LICENSE +0 -0
- {opengradient-0.3.0.dist-info → opengradient-0.3.1.dist-info}/WHEEL +0 -0
- {opengradient-0.3.0.dist-info → opengradient-0.3.1.dist-info}/entry_points.txt +0 -0
- {opengradient-0.3.0.dist-info → opengradient-0.3.1.dist-info}/top_level.txt +0 -0
opengradient/__init__.py
CHANGED
|
@@ -2,13 +2,13 @@ from .client import Client
|
|
|
2
2
|
from .defaults import *
|
|
3
3
|
from .types import InferenceMode
|
|
4
4
|
from typing import List, Dict
|
|
5
|
-
__version__ = "0.3.
|
|
5
|
+
__version__ = "0.3.1"
|
|
6
6
|
|
|
7
7
|
_client = None
|
|
8
8
|
|
|
9
9
|
def init(email: str,
|
|
10
10
|
password: str,
|
|
11
|
-
private_key
|
|
11
|
+
private_key: str,
|
|
12
12
|
rpc_url=DEFAULT_RPC_URL,
|
|
13
13
|
contract_address=DEFAULT_INFERENCE_CONTRACT_ADDRESS):
|
|
14
14
|
global _client
|
opengradient/client.py
CHANGED
|
@@ -32,6 +32,8 @@ class Client:
|
|
|
32
32
|
email (str, optional): Email for authentication. Defaults to "test@test.com".
|
|
33
33
|
password (str, optional): Password for authentication. Defaults to "Test-123".
|
|
34
34
|
"""
|
|
35
|
+
self.email = email
|
|
36
|
+
self.password = password
|
|
35
37
|
self.private_key = private_key
|
|
36
38
|
self.rpc_url = rpc_url
|
|
37
39
|
self.contract_address = contract_address
|
|
@@ -41,8 +43,6 @@ class Client:
|
|
|
41
43
|
self.firebase_app = firebase.initialize_app(self.FIREBASE_CONFIG)
|
|
42
44
|
self.auth = self.firebase_app.auth()
|
|
43
45
|
self.user = None
|
|
44
|
-
self.email = email
|
|
45
|
-
self.password = password
|
|
46
46
|
|
|
47
47
|
logging.debug("Initialized client with parameters:\n"
|
|
48
48
|
"private key: %s\n"
|
opengradient/defaults.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
# Default variables
|
|
3
|
-
DEFAULT_PRIVATE_KEY="cd09980ef6e280afc3900d2d6801f9e9c5d858a5deaeeab74a65643f5ff1a4c1"
|
|
4
3
|
DEFAULT_RPC_URL="http://18.218.115.248:8545"
|
|
5
4
|
DEFAULT_OG_FAUCET_URL="http://18.218.115.248:8080/?address="
|
|
6
5
|
DEFAULT_HUB_SIGNUP_URL="https://hub.opengradient.ai/signup"
|
|
7
|
-
DEFAULT_INFERENCE_CONTRACT_ADDRESS="
|
|
6
|
+
DEFAULT_INFERENCE_CONTRACT_ADDRESS="0x350E0A430b2B1563481833a99523Cfd17a530e4e"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: opengradient
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Python SDK for OpenGradient decentralized model management & inference services
|
|
5
5
|
Author-email: OpenGradient <oliver@opengradient.ai>
|
|
6
6
|
License: MIT License
|
|
@@ -135,21 +135,27 @@ Requires-Dist: websockets==13.1
|
|
|
135
135
|
Requires-Dist: xattr==1.1.0
|
|
136
136
|
Requires-Dist: yarl==1.13.1
|
|
137
137
|
|
|
138
|
-
# OpenGradient SDK
|
|
139
|
-
|
|
140
|
-
Python SDK for OpenGradient decentralized model management & inference services.
|
|
138
|
+
# OpenGradient Python SDK
|
|
139
|
+
Python SDK for the OpenGradient platform provides decentralized model management & inference services. Python SDK allows programmatic access to our model repository and decentralized AI infrastructure.
|
|
141
140
|
|
|
142
141
|
## Installation
|
|
142
|
+
|
|
143
|
+
To install Python SDK and CLI, run the following command:
|
|
143
144
|
```python
|
|
144
145
|
pip install opengradient
|
|
145
146
|
```
|
|
146
147
|
|
|
147
148
|
## Quick Start
|
|
149
|
+
|
|
150
|
+
To get started, run:
|
|
151
|
+
|
|
148
152
|
```python
|
|
149
153
|
import opengradient as og
|
|
150
|
-
og.init(email="<email>", password="<password>")
|
|
154
|
+
og.init(private_key="<private_key>", email="<email>", password="<password>")
|
|
151
155
|
```
|
|
152
156
|
|
|
157
|
+
The following commands show how to use Python SDK.
|
|
158
|
+
|
|
153
159
|
### Create a Model
|
|
154
160
|
```python
|
|
155
161
|
og.create_model(model_name="<model_name>", model_desc="<model_description>")
|
|
@@ -180,6 +186,8 @@ og.list_files(model_name="<model_name>", version="<version>")
|
|
|
180
186
|
inference_mode = og.InferenceMode.VANILLA
|
|
181
187
|
og.infer(model_cid, model_inputs, inference_mode)
|
|
182
188
|
```
|
|
189
|
+
- inference mode can be `VANILLA`, `ZKML`, or `TEE`
|
|
190
|
+
|
|
183
191
|
|
|
184
192
|
## Using the CLI
|
|
185
193
|
|
|
@@ -188,15 +196,15 @@ export OPENGRADIENT_EMAIL="<email>"
|
|
|
188
196
|
export OPENGRADIENT_PASSWORD="<password>"
|
|
189
197
|
```
|
|
190
198
|
|
|
191
|
-
#### Creating a Model
|
|
199
|
+
#### Creating a Model Repo
|
|
192
200
|
```bash
|
|
193
|
-
opengradient
|
|
201
|
+
opengradient create_model_repo "<model_name>" "<description>"
|
|
194
202
|
```
|
|
195
203
|
- creating a model automatically initializes version `v0.01`
|
|
196
204
|
|
|
197
205
|
#### Creating a Version
|
|
198
206
|
```bash
|
|
199
|
-
opengradient
|
|
207
|
+
opengradient create_model_repo "<model_name>" "<description>"
|
|
200
208
|
```
|
|
201
209
|
|
|
202
210
|
#### Upload a File
|
|
@@ -218,3 +226,5 @@ opengradient infer QmbUqS93oc4JTLMHwpVxsE39mhNxy6hpf6Py3r9oANr8aZ VANILLA '{"num
|
|
|
218
226
|
```bash
|
|
219
227
|
opengradient infer QmbUqS93oc4JTLMHwpVxsE39mhNxy6hpf6Py3r9oANr8aZ VANILLA --input_file input.json
|
|
220
228
|
```
|
|
229
|
+
|
|
230
|
+
For more information read the OpenGradient [documentation](https://docs.opengradient.ai/).
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
opengradient/__init__.py,sha256=
|
|
1
|
+
opengradient/__init__.py,sha256=u1JMNG9VIcNppQsrqAClpdXxXCNOKi9ESY5i5ef-cZI,2013
|
|
2
2
|
opengradient/account.py,sha256=s1C4hAtc8vcHObWjwxwlYJA041S6DTbr7-rK6qiWPsQ,1149
|
|
3
3
|
opengradient/cli.py,sha256=YKctHMZhT_Y1fANWDnGo68QpIVLXqz5ifH5kQXIxD8A,14412
|
|
4
|
-
opengradient/client.py,sha256=
|
|
5
|
-
opengradient/defaults.py,sha256=
|
|
4
|
+
opengradient/client.py,sha256=VwlTSUAGj3kvmDtVxjnEVcnWHoN4D82MmZzHJwHqpuA,20141
|
|
5
|
+
opengradient/defaults.py,sha256=pDfsmPoUzdLG55n-hwh0CMBFxKR2rdNcjqCcwTWc6iw,267
|
|
6
6
|
opengradient/exceptions.py,sha256=v4VmUGTvvtjhCZAhR24Ga42z3q-DzR1Y5zSqP_yn2Xk,3366
|
|
7
7
|
opengradient/types.py,sha256=EoJN-DkQrJ2WTUv8OenlrlWJWFY2jPGTl-T8C_OVjp8,1849
|
|
8
8
|
opengradient/utils.py,sha256=F1Nj-GMNFQFxCtbGgWQq1RP4TSurbpQxJV3yKeEo1b0,6482
|
|
9
9
|
opengradient/abi/inference.abi,sha256=u8FsW0s1YeRjUb9eLS1k_qh_5f_cwOdr0bii-tAdxh0,2683
|
|
10
10
|
opengradient/abi/llm.abi,sha256=zhiPFyBT09EI3QU5DVoKHo7e8T9PFcfIQ3RHDYetm4M,3609
|
|
11
|
-
opengradient-0.3.
|
|
12
|
-
opengradient-0.3.
|
|
13
|
-
opengradient-0.3.
|
|
14
|
-
opengradient-0.3.
|
|
15
|
-
opengradient-0.3.
|
|
16
|
-
opengradient-0.3.
|
|
11
|
+
opengradient-0.3.1.dist-info/LICENSE,sha256=xEcvQ3AxZOtDkrqkys2Mm6Y9diEnaSeQRKvxi-JGnNA,1069
|
|
12
|
+
opengradient-0.3.1.dist-info/METADATA,sha256=FQkG5go46Z-lv-a2r0oMQFfYLA65b96yLfhnFZ2FRB8,7620
|
|
13
|
+
opengradient-0.3.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
14
|
+
opengradient-0.3.1.dist-info/entry_points.txt,sha256=yUKTaJx8RXnybkob0J62wVBiCp_1agVbgw9uzsmaeJc,54
|
|
15
|
+
opengradient-0.3.1.dist-info/top_level.txt,sha256=oC1zimVLa2Yi1LQz8c7x-0IQm92milb5ax8gHBHwDqU,13
|
|
16
|
+
opengradient-0.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|