opengradient 0.2.6__tar.gz → 0.2.7__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.
Files changed (25) hide show
  1. opengradient-0.2.7/PKG-INFO +181 -0
  2. {opengradient-0.2.6 → opengradient-0.2.7}/README.md +4 -4
  3. opengradient-0.2.7/pyproject.toml +142 -0
  4. {opengradient-0.2.6 → opengradient-0.2.7}/src/opengradient/__init__.py +1 -1
  5. {opengradient-0.2.6 → opengradient-0.2.7}/src/opengradient/cli.py +8 -3
  6. {opengradient-0.2.6 → opengradient-0.2.7}/src/opengradient/client.py +8 -8
  7. opengradient-0.2.7/src/opengradient.egg-info/PKG-INFO +181 -0
  8. opengradient-0.2.7/src/opengradient.egg-info/requires.txt +95 -0
  9. opengradient-0.2.6/PKG-INFO +0 -93
  10. opengradient-0.2.6/pyproject.toml +0 -54
  11. opengradient-0.2.6/src/opengradient.egg-info/PKG-INFO +0 -93
  12. opengradient-0.2.6/src/opengradient.egg-info/requires.txt +0 -7
  13. {opengradient-0.2.6 → opengradient-0.2.7}/LICENSE +0 -0
  14. {opengradient-0.2.6 → opengradient-0.2.7}/setup.cfg +0 -0
  15. {opengradient-0.2.6 → opengradient-0.2.7}/src/opengradient/abi/inference.abi +0 -0
  16. {opengradient-0.2.6 → opengradient-0.2.7}/src/opengradient/exceptions.py +0 -0
  17. {opengradient-0.2.6 → opengradient-0.2.7}/src/opengradient/types.py +0 -0
  18. {opengradient-0.2.6 → opengradient-0.2.7}/src/opengradient/utils.py +0 -0
  19. {opengradient-0.2.6 → opengradient-0.2.7}/src/opengradient.egg-info/SOURCES.txt +0 -0
  20. {opengradient-0.2.6 → opengradient-0.2.7}/src/opengradient.egg-info/dependency_links.txt +0 -0
  21. {opengradient-0.2.6 → opengradient-0.2.7}/src/opengradient.egg-info/entry_points.txt +0 -0
  22. {opengradient-0.2.6 → opengradient-0.2.7}/src/opengradient.egg-info/top_level.txt +0 -0
  23. {opengradient-0.2.6 → opengradient-0.2.7}/tests/test_api.py +0 -0
  24. {opengradient-0.2.6 → opengradient-0.2.7}/tests/test_exceptions.py +0 -0
  25. {opengradient-0.2.6 → opengradient-0.2.7}/tests/test_integration.py +0 -0
@@ -0,0 +1,181 @@
1
+ Metadata-Version: 2.1
2
+ Name: opengradient
3
+ Version: 0.2.7
4
+ Summary: A Python SDK for OpenGradient inference services
5
+ Author-email: OpenGradient <oliver@opengradient.ai>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2024 OpenGradient
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://opengradient.ai
29
+ Classifier: Development Status :: 3 - Alpha
30
+ Classifier: Intended Audience :: Developers
31
+ Classifier: License :: OSI Approved :: MIT License
32
+ Classifier: Programming Language :: Python :: 3
33
+ Classifier: Programming Language :: Python :: 3.7
34
+ Classifier: Programming Language :: Python :: 3.8
35
+ Classifier: Programming Language :: Python :: 3.9
36
+ Classifier: Programming Language :: Python :: 3.10
37
+ Classifier: Programming Language :: Python :: 3.11
38
+ Classifier: Programming Language :: Python :: 3.12
39
+ Requires-Python: >=3.7
40
+ Description-Content-Type: text/markdown
41
+ License-File: LICENSE
42
+ Requires-Dist: aiohappyeyeballs==2.4.3
43
+ Requires-Dist: aiohttp==3.10.8
44
+ Requires-Dist: aiosignal==1.3.1
45
+ Requires-Dist: annotated-types==0.7.0
46
+ Requires-Dist: attrs==24.2.0
47
+ Requires-Dist: bitarray==2.9.2
48
+ Requires-Dist: CacheControl==0.14.0
49
+ Requires-Dist: cachetools==5.5.0
50
+ Requires-Dist: certifi==2024.8.30
51
+ Requires-Dist: cffi==1.17.1
52
+ Requires-Dist: charset-normalizer==3.3.2
53
+ Requires-Dist: ckzg==2.0.1
54
+ Requires-Dist: cleo==2.1.0
55
+ Requires-Dist: click==8.1.7
56
+ Requires-Dist: cramjam==2.8.4
57
+ Requires-Dist: crashtest==0.4.1
58
+ Requires-Dist: cryptography==43.0.1
59
+ Requires-Dist: cytoolz==0.12.3
60
+ Requires-Dist: distlib==0.3.8
61
+ Requires-Dist: dulwich==0.21.7
62
+ Requires-Dist: eth-account==0.13.4
63
+ Requires-Dist: eth-hash==0.7.0
64
+ Requires-Dist: eth-keyfile==0.8.1
65
+ Requires-Dist: eth-keys==0.5.1
66
+ Requires-Dist: eth-rlp==2.1.0
67
+ Requires-Dist: eth-typing==5.0.0
68
+ Requires-Dist: eth-utils==5.0.0
69
+ Requires-Dist: eth_abi==5.1.0
70
+ Requires-Dist: fastjsonschema==2.20.0
71
+ Requires-Dist: fastparquet==2024.5.0
72
+ Requires-Dist: filelock==3.16.1
73
+ Requires-Dist: firebase-rest-api==1.11.0
74
+ Requires-Dist: frozenlist==1.4.1
75
+ Requires-Dist: fsspec==2024.9.0
76
+ Requires-Dist: google-api-core==2.20.0
77
+ Requires-Dist: google-auth==2.35.0
78
+ Requires-Dist: google-cloud-core==2.4.1
79
+ Requires-Dist: google-cloud-firestore==2.19.0
80
+ Requires-Dist: google-cloud-storage==2.18.2
81
+ Requires-Dist: google-crc32c==1.6.0
82
+ Requires-Dist: google-resumable-media==2.7.2
83
+ Requires-Dist: googleapis-common-protos==1.65.0
84
+ Requires-Dist: grpcio==1.66.2
85
+ Requires-Dist: grpcio-status==1.66.2
86
+ Requires-Dist: hexbytes==1.2.1
87
+ Requires-Dist: idna==3.10
88
+ Requires-Dist: jaraco.classes==3.4.0
89
+ Requires-Dist: jwcrypto==1.5.6
90
+ Requires-Dist: keyring==24.3.1
91
+ Requires-Dist: more-itertools==10.5.0
92
+ Requires-Dist: msgpack==1.1.0
93
+ Requires-Dist: multidict==6.1.0
94
+ Requires-Dist: numpy==2.1.1
95
+ Requires-Dist: packaging==24.1
96
+ Requires-Dist: pandas==2.2.3
97
+ Requires-Dist: parsimonious==0.10.0
98
+ Requires-Dist: pathlib==1.0.1
99
+ Requires-Dist: pexpect==4.9.0
100
+ Requires-Dist: pkce==1.0.3
101
+ Requires-Dist: pkginfo==1.11.1
102
+ Requires-Dist: platformdirs==4.3.6
103
+ Requires-Dist: proto-plus==1.24.0
104
+ Requires-Dist: protobuf==5.28.2
105
+ Requires-Dist: ptyprocess==0.7.0
106
+ Requires-Dist: pyarrow==17.0.0
107
+ Requires-Dist: pyasn1==0.6.1
108
+ Requires-Dist: pyasn1_modules==0.4.1
109
+ Requires-Dist: pycparser==2.22
110
+ Requires-Dist: pycryptodome==3.21.0
111
+ Requires-Dist: pydantic==2.9.2
112
+ Requires-Dist: pydantic_core==2.23.4
113
+ Requires-Dist: pyproject_hooks==1.2.0
114
+ Requires-Dist: python-dateutil==2.9.0.post0
115
+ Requires-Dist: python-jwt==4.1.0
116
+ Requires-Dist: pytz==2024.2
117
+ Requires-Dist: pyunormalize==16.0.0
118
+ Requires-Dist: RapidFuzz==3.10.0
119
+ Requires-Dist: regex==2024.9.11
120
+ Requires-Dist: requests==2.32.3
121
+ Requires-Dist: requests-toolbelt==1.0.0
122
+ Requires-Dist: rlp==4.0.1
123
+ Requires-Dist: rsa==4.9
124
+ Requires-Dist: shellingham==1.5.4
125
+ Requires-Dist: six==1.16.0
126
+ Requires-Dist: tomlkit==0.13.2
127
+ Requires-Dist: toolz==0.12.1
128
+ Requires-Dist: trove-classifiers==2024.9.12
129
+ Requires-Dist: types-requests==2.32.0.20240914
130
+ Requires-Dist: typing_extensions==4.12.2
131
+ Requires-Dist: tzdata==2024.2
132
+ Requires-Dist: urllib3==2.2.3
133
+ Requires-Dist: web3==7.3.0
134
+ Requires-Dist: websockets==13.1
135
+ Requires-Dist: xattr==1.1.0
136
+ Requires-Dist: yarl==1.13.1
137
+
138
+ # OpenGradient Python SDK
139
+
140
+ Python SDK for OpenGradient inference services.
141
+
142
+ ## Installation
143
+ ```
144
+ pip install opengradient
145
+ ```
146
+
147
+ ## Quick Start
148
+ ```
149
+ import opengradient as og
150
+ og.init(private_key="x", rpc_url="y", contract_address="z")
151
+ ```
152
+
153
+ ### Sign in with Email
154
+ ```
155
+ og.login(email="you@opengradient.ai", password="xyz")
156
+ ```
157
+
158
+ ### Create a Model
159
+ ```
160
+ og.create_model(model_name="test-network-model", model_desc="testing upload to sdk")
161
+ ```
162
+
163
+ ### Create a Version of a Model
164
+ ```
165
+ og.create_version(model_name="test-network-model", notes="test notes")
166
+ ```
167
+
168
+ ### Upload Files to a Model
169
+ ```
170
+ og.upload(model_path="local_path_to_your_model.onnx", model_name="test-network-model", version="0.01")
171
+ ```
172
+
173
+ ### Run Inference
174
+ ```
175
+ inference_mode = og.InferenceMode.VANILLA
176
+ inference_cid = og.infer(model_cid, model_inputs, inference_mode)
177
+ ```
178
+
179
+ ```
180
+ og.infer(model_id, inference_mode, model_input)
181
+ ```
@@ -15,22 +15,22 @@ og.init(private_key="x", rpc_url="y", contract_address="z")
15
15
 
16
16
  ### Sign in with Email
17
17
  ```
18
- og.sign_in_with_email_and_password(email="test@test.com", password="Test-123")
18
+ og.login(email="you@opengradient.ai", password="xyz")
19
19
  ```
20
20
 
21
21
  ### Create a Model
22
22
  ```
23
- og.create_model("test-network-model-5", "testing sdk")
23
+ og.create_model(model_name="test-network-model", model_desc="testing upload to sdk")
24
24
  ```
25
25
 
26
26
  ### Create a Version of a Model
27
27
  ```
28
- og.create_version(model_id=11, notes="test notes")
28
+ og.create_version(model_name="test-network-model", notes="test notes")
29
29
  ```
30
30
 
31
31
  ### Upload Files to a Model
32
32
  ```
33
- og.upload(model_path, model_id, version=2)
33
+ og.upload(model_path="local_path_to_your_model.onnx", model_name="test-network-model", version="0.01")
34
34
  ```
35
35
 
36
36
  ### Run Inference
@@ -0,0 +1,142 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "opengradient"
7
+ version = "0.2.7"
8
+ description = "A Python SDK for OpenGradient inference services"
9
+ authors = [{name = "OpenGradient", email = "oliver@opengradient.ai"}]
10
+ license = {file = "LICENSE"}
11
+ readme = "README.md"
12
+ requires-python = ">=3.7"
13
+ classifiers = [
14
+ "Development Status :: 3 - Alpha",
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.7",
19
+ "Programming Language :: Python :: 3.8",
20
+ "Programming Language :: Python :: 3.9",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ ]
25
+ dependencies = [
26
+ "aiohappyeyeballs==2.4.3",
27
+ "aiohttp==3.10.8",
28
+ "aiosignal==1.3.1",
29
+ "annotated-types==0.7.0",
30
+ "attrs==24.2.0",
31
+ "bitarray==2.9.2",
32
+ "CacheControl==0.14.0",
33
+ "cachetools==5.5.0",
34
+ "certifi==2024.8.30",
35
+ "cffi==1.17.1",
36
+ "charset-normalizer==3.3.2",
37
+ "ckzg==2.0.1",
38
+ "cleo==2.1.0",
39
+ "click==8.1.7",
40
+ "cramjam==2.8.4",
41
+ "crashtest==0.4.1",
42
+ "cryptography==43.0.1",
43
+ "cytoolz==0.12.3",
44
+ "distlib==0.3.8",
45
+ "dulwich==0.21.7",
46
+ "eth-account==0.13.4",
47
+ "eth-hash==0.7.0",
48
+ "eth-keyfile==0.8.1",
49
+ "eth-keys==0.5.1",
50
+ "eth-rlp==2.1.0",
51
+ "eth-typing==5.0.0",
52
+ "eth-utils==5.0.0",
53
+ "eth_abi==5.1.0",
54
+ "fastjsonschema==2.20.0",
55
+ "fastparquet==2024.5.0",
56
+ "filelock==3.16.1",
57
+ "firebase-rest-api==1.11.0",
58
+ "frozenlist==1.4.1",
59
+ "fsspec==2024.9.0",
60
+ "google-api-core==2.20.0",
61
+ "google-auth==2.35.0",
62
+ "google-cloud-core==2.4.1",
63
+ "google-cloud-firestore==2.19.0",
64
+ "google-cloud-storage==2.18.2",
65
+ "google-crc32c==1.6.0",
66
+ "google-resumable-media==2.7.2",
67
+ "googleapis-common-protos==1.65.0",
68
+ "grpcio==1.66.2",
69
+ "grpcio-status==1.66.2",
70
+ "hexbytes==1.2.1",
71
+ "idna==3.10",
72
+ "jaraco.classes==3.4.0",
73
+ "jwcrypto==1.5.6",
74
+ "keyring==24.3.1",
75
+ "more-itertools==10.5.0",
76
+ "msgpack==1.1.0",
77
+ "multidict==6.1.0",
78
+ "numpy==2.1.1",
79
+ "packaging==24.1",
80
+ "pandas==2.2.3",
81
+ "parsimonious==0.10.0",
82
+ "pathlib==1.0.1",
83
+ "pexpect==4.9.0",
84
+ "pkce==1.0.3",
85
+ "pkginfo==1.11.1",
86
+ "platformdirs==4.3.6",
87
+ "proto-plus==1.24.0",
88
+ "protobuf==5.28.2",
89
+ "ptyprocess==0.7.0",
90
+ "pyarrow==17.0.0",
91
+ "pyasn1==0.6.1",
92
+ "pyasn1_modules==0.4.1",
93
+ "pycparser==2.22",
94
+ "pycryptodome==3.21.0",
95
+ "pydantic==2.9.2",
96
+ "pydantic_core==2.23.4",
97
+ "pyproject_hooks==1.2.0",
98
+ "python-dateutil==2.9.0.post0",
99
+ "python-jwt==4.1.0",
100
+ "pytz==2024.2",
101
+ "pyunormalize==16.0.0",
102
+ "RapidFuzz==3.10.0",
103
+ "regex==2024.9.11",
104
+ "requests==2.32.3",
105
+ "requests-toolbelt==1.0.0",
106
+ "rlp==4.0.1",
107
+ "rsa==4.9",
108
+ "shellingham==1.5.4",
109
+ "six==1.16.0",
110
+ "tomlkit==0.13.2",
111
+ "toolz==0.12.1",
112
+ "trove-classifiers==2024.9.12",
113
+ "types-requests==2.32.0.20240914",
114
+ "typing_extensions==4.12.2",
115
+ "tzdata==2024.2",
116
+ "urllib3==2.2.3",
117
+ "web3==7.3.0",
118
+ "websockets==13.1",
119
+ "xattr==1.1.0",
120
+ "yarl==1.13.1",
121
+ ]
122
+
123
+ [project.scripts]
124
+ opengradient = "opengradient.cli:cli"
125
+
126
+ [project.urls]
127
+ Homepage = "https://opengradient.ai"
128
+
129
+ [tool.setuptools]
130
+ package-dir = {"" = "src"}
131
+ include-package-data = true
132
+
133
+ [tool.setuptools.packages.find]
134
+ where = ["src"]
135
+ exclude = ["tests*"]
136
+
137
+ [tool.setuptools.package-data]
138
+ "*" = ["*.py", "*.abi"]
139
+ "opengradient" = ["abi/*.abi"]
140
+
141
+ [tool.setuptools.exclude-package-data]
142
+ "*" = ["*.ipynb", "*.pyc", "*.pyo", ".gitignore", "requirements.txt", "conftest.py"]
@@ -2,7 +2,7 @@ from .client import Client
2
2
  from .exceptions import OpenGradientError, FileNotFoundError, UploadError, InferenceError, ResultRetrievalError
3
3
  from .types import ModelInput, InferenceMode, Number, NumberTensor, StringTensor, ModelOutput
4
4
 
5
- __version__ = "0.2.6"
5
+ __version__ = "0.2.7"
6
6
 
7
7
  _client = None
8
8
 
@@ -56,15 +56,15 @@ InferenceModes = {
56
56
  default="http://18.218.115.248:8545")
57
57
  @click.option('--contract_address',
58
58
  envvar=CONTRACT_ADDRESS_ENV,
59
- help='OpenGradient contract address',
59
+ help='OpenGradient inference contract address',
60
60
  default="0x350E0A430b2B1563481833a99523Cfd17a530e4e")
61
61
  @click.option('--email',
62
62
  envvar=EMAIL_ENV,
63
- help='Your OpenGradient hub email address -- not required for inference',
63
+ help='Your OpenGradient Hub email address -- not required for inference',
64
64
  default="test@test.com")
65
65
  @click.option('--password',
66
66
  envvar=PASSWORD_ENV,
67
- help='Your OpenGradient hub password -- not required for inference',
67
+ help='Your OpenGradient Hub password -- not required for inference',
68
68
  default="Test-123")
69
69
  @click.pass_context
70
70
  def cli(ctx, api_key, rpc_url, contract_address, email, password):
@@ -185,5 +185,10 @@ def infer(ctx, model_cid, inference_mode, input_data, input_file):
185
185
  except Exception as e:
186
186
  click.echo(f"Error running inference: {str(e)}")
187
187
 
188
+
189
+ @cli.command()
190
+ def version():
191
+ click.echo(f"OpenGradient CLI version: {opengradient.__version__}")
192
+
188
193
  if __name__ == '__main__':
189
194
  cli()
@@ -104,20 +104,20 @@ class Client:
104
104
  response.raise_for_status()
105
105
 
106
106
  json_response = response.json()
107
- model_id = json_response.get('id')
108
- if not model_id:
109
- raise Exception(f"Model creation response missing 'id'. Full response: {json_response}")
110
- logging.info(f"Model creation successful. Model ID: {model_id}")
107
+ model_name = json_response.get('name')
108
+ if not model_name:
109
+ raise Exception(f"Model creation response missing 'name'. Full response: {json_response}")
110
+ logging.info(f"Model creation successful. Model name: {model_name}")
111
111
 
112
112
  # Create the specified version for the newly created model
113
113
  try:
114
- version_response = self.create_version(model_id, version)
115
- logging.info(f"Version creation successful. Version ID: {version_response['versionString']}")
114
+ version_response = self.create_version(model_name, version)
115
+ logging.info(f"Version creation successful. Version string: {version_response['versionString']}")
116
116
  except Exception as ve:
117
117
  logging.error(f"Version creation failed, but model was created. Error: {str(ve)}")
118
- return {"id": model_id, "versionString": None, "version_error": str(ve)}
118
+ return {"name": model_name, "versionString": None, "version_error": str(ve)}
119
119
 
120
- return {"id": model_id, "versionString": version_response["versionString"]}
120
+ return {"name": model_name, "versionString": version_response["versionString"]}
121
121
 
122
122
  except requests.RequestException as e:
123
123
  logging.error(f"Model creation failed: {str(e)}")
@@ -0,0 +1,181 @@
1
+ Metadata-Version: 2.1
2
+ Name: opengradient
3
+ Version: 0.2.7
4
+ Summary: A Python SDK for OpenGradient inference services
5
+ Author-email: OpenGradient <oliver@opengradient.ai>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2024 OpenGradient
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://opengradient.ai
29
+ Classifier: Development Status :: 3 - Alpha
30
+ Classifier: Intended Audience :: Developers
31
+ Classifier: License :: OSI Approved :: MIT License
32
+ Classifier: Programming Language :: Python :: 3
33
+ Classifier: Programming Language :: Python :: 3.7
34
+ Classifier: Programming Language :: Python :: 3.8
35
+ Classifier: Programming Language :: Python :: 3.9
36
+ Classifier: Programming Language :: Python :: 3.10
37
+ Classifier: Programming Language :: Python :: 3.11
38
+ Classifier: Programming Language :: Python :: 3.12
39
+ Requires-Python: >=3.7
40
+ Description-Content-Type: text/markdown
41
+ License-File: LICENSE
42
+ Requires-Dist: aiohappyeyeballs==2.4.3
43
+ Requires-Dist: aiohttp==3.10.8
44
+ Requires-Dist: aiosignal==1.3.1
45
+ Requires-Dist: annotated-types==0.7.0
46
+ Requires-Dist: attrs==24.2.0
47
+ Requires-Dist: bitarray==2.9.2
48
+ Requires-Dist: CacheControl==0.14.0
49
+ Requires-Dist: cachetools==5.5.0
50
+ Requires-Dist: certifi==2024.8.30
51
+ Requires-Dist: cffi==1.17.1
52
+ Requires-Dist: charset-normalizer==3.3.2
53
+ Requires-Dist: ckzg==2.0.1
54
+ Requires-Dist: cleo==2.1.0
55
+ Requires-Dist: click==8.1.7
56
+ Requires-Dist: cramjam==2.8.4
57
+ Requires-Dist: crashtest==0.4.1
58
+ Requires-Dist: cryptography==43.0.1
59
+ Requires-Dist: cytoolz==0.12.3
60
+ Requires-Dist: distlib==0.3.8
61
+ Requires-Dist: dulwich==0.21.7
62
+ Requires-Dist: eth-account==0.13.4
63
+ Requires-Dist: eth-hash==0.7.0
64
+ Requires-Dist: eth-keyfile==0.8.1
65
+ Requires-Dist: eth-keys==0.5.1
66
+ Requires-Dist: eth-rlp==2.1.0
67
+ Requires-Dist: eth-typing==5.0.0
68
+ Requires-Dist: eth-utils==5.0.0
69
+ Requires-Dist: eth_abi==5.1.0
70
+ Requires-Dist: fastjsonschema==2.20.0
71
+ Requires-Dist: fastparquet==2024.5.0
72
+ Requires-Dist: filelock==3.16.1
73
+ Requires-Dist: firebase-rest-api==1.11.0
74
+ Requires-Dist: frozenlist==1.4.1
75
+ Requires-Dist: fsspec==2024.9.0
76
+ Requires-Dist: google-api-core==2.20.0
77
+ Requires-Dist: google-auth==2.35.0
78
+ Requires-Dist: google-cloud-core==2.4.1
79
+ Requires-Dist: google-cloud-firestore==2.19.0
80
+ Requires-Dist: google-cloud-storage==2.18.2
81
+ Requires-Dist: google-crc32c==1.6.0
82
+ Requires-Dist: google-resumable-media==2.7.2
83
+ Requires-Dist: googleapis-common-protos==1.65.0
84
+ Requires-Dist: grpcio==1.66.2
85
+ Requires-Dist: grpcio-status==1.66.2
86
+ Requires-Dist: hexbytes==1.2.1
87
+ Requires-Dist: idna==3.10
88
+ Requires-Dist: jaraco.classes==3.4.0
89
+ Requires-Dist: jwcrypto==1.5.6
90
+ Requires-Dist: keyring==24.3.1
91
+ Requires-Dist: more-itertools==10.5.0
92
+ Requires-Dist: msgpack==1.1.0
93
+ Requires-Dist: multidict==6.1.0
94
+ Requires-Dist: numpy==2.1.1
95
+ Requires-Dist: packaging==24.1
96
+ Requires-Dist: pandas==2.2.3
97
+ Requires-Dist: parsimonious==0.10.0
98
+ Requires-Dist: pathlib==1.0.1
99
+ Requires-Dist: pexpect==4.9.0
100
+ Requires-Dist: pkce==1.0.3
101
+ Requires-Dist: pkginfo==1.11.1
102
+ Requires-Dist: platformdirs==4.3.6
103
+ Requires-Dist: proto-plus==1.24.0
104
+ Requires-Dist: protobuf==5.28.2
105
+ Requires-Dist: ptyprocess==0.7.0
106
+ Requires-Dist: pyarrow==17.0.0
107
+ Requires-Dist: pyasn1==0.6.1
108
+ Requires-Dist: pyasn1_modules==0.4.1
109
+ Requires-Dist: pycparser==2.22
110
+ Requires-Dist: pycryptodome==3.21.0
111
+ Requires-Dist: pydantic==2.9.2
112
+ Requires-Dist: pydantic_core==2.23.4
113
+ Requires-Dist: pyproject_hooks==1.2.0
114
+ Requires-Dist: python-dateutil==2.9.0.post0
115
+ Requires-Dist: python-jwt==4.1.0
116
+ Requires-Dist: pytz==2024.2
117
+ Requires-Dist: pyunormalize==16.0.0
118
+ Requires-Dist: RapidFuzz==3.10.0
119
+ Requires-Dist: regex==2024.9.11
120
+ Requires-Dist: requests==2.32.3
121
+ Requires-Dist: requests-toolbelt==1.0.0
122
+ Requires-Dist: rlp==4.0.1
123
+ Requires-Dist: rsa==4.9
124
+ Requires-Dist: shellingham==1.5.4
125
+ Requires-Dist: six==1.16.0
126
+ Requires-Dist: tomlkit==0.13.2
127
+ Requires-Dist: toolz==0.12.1
128
+ Requires-Dist: trove-classifiers==2024.9.12
129
+ Requires-Dist: types-requests==2.32.0.20240914
130
+ Requires-Dist: typing_extensions==4.12.2
131
+ Requires-Dist: tzdata==2024.2
132
+ Requires-Dist: urllib3==2.2.3
133
+ Requires-Dist: web3==7.3.0
134
+ Requires-Dist: websockets==13.1
135
+ Requires-Dist: xattr==1.1.0
136
+ Requires-Dist: yarl==1.13.1
137
+
138
+ # OpenGradient Python SDK
139
+
140
+ Python SDK for OpenGradient inference services.
141
+
142
+ ## Installation
143
+ ```
144
+ pip install opengradient
145
+ ```
146
+
147
+ ## Quick Start
148
+ ```
149
+ import opengradient as og
150
+ og.init(private_key="x", rpc_url="y", contract_address="z")
151
+ ```
152
+
153
+ ### Sign in with Email
154
+ ```
155
+ og.login(email="you@opengradient.ai", password="xyz")
156
+ ```
157
+
158
+ ### Create a Model
159
+ ```
160
+ og.create_model(model_name="test-network-model", model_desc="testing upload to sdk")
161
+ ```
162
+
163
+ ### Create a Version of a Model
164
+ ```
165
+ og.create_version(model_name="test-network-model", notes="test notes")
166
+ ```
167
+
168
+ ### Upload Files to a Model
169
+ ```
170
+ og.upload(model_path="local_path_to_your_model.onnx", model_name="test-network-model", version="0.01")
171
+ ```
172
+
173
+ ### Run Inference
174
+ ```
175
+ inference_mode = og.InferenceMode.VANILLA
176
+ inference_cid = og.infer(model_cid, model_inputs, inference_mode)
177
+ ```
178
+
179
+ ```
180
+ og.infer(model_id, inference_mode, model_input)
181
+ ```
@@ -0,0 +1,95 @@
1
+ aiohappyeyeballs==2.4.3
2
+ aiohttp==3.10.8
3
+ aiosignal==1.3.1
4
+ annotated-types==0.7.0
5
+ attrs==24.2.0
6
+ bitarray==2.9.2
7
+ CacheControl==0.14.0
8
+ cachetools==5.5.0
9
+ certifi==2024.8.30
10
+ cffi==1.17.1
11
+ charset-normalizer==3.3.2
12
+ ckzg==2.0.1
13
+ cleo==2.1.0
14
+ click==8.1.7
15
+ cramjam==2.8.4
16
+ crashtest==0.4.1
17
+ cryptography==43.0.1
18
+ cytoolz==0.12.3
19
+ distlib==0.3.8
20
+ dulwich==0.21.7
21
+ eth-account==0.13.4
22
+ eth-hash==0.7.0
23
+ eth-keyfile==0.8.1
24
+ eth-keys==0.5.1
25
+ eth-rlp==2.1.0
26
+ eth-typing==5.0.0
27
+ eth-utils==5.0.0
28
+ eth_abi==5.1.0
29
+ fastjsonschema==2.20.0
30
+ fastparquet==2024.5.0
31
+ filelock==3.16.1
32
+ firebase-rest-api==1.11.0
33
+ frozenlist==1.4.1
34
+ fsspec==2024.9.0
35
+ google-api-core==2.20.0
36
+ google-auth==2.35.0
37
+ google-cloud-core==2.4.1
38
+ google-cloud-firestore==2.19.0
39
+ google-cloud-storage==2.18.2
40
+ google-crc32c==1.6.0
41
+ google-resumable-media==2.7.2
42
+ googleapis-common-protos==1.65.0
43
+ grpcio==1.66.2
44
+ grpcio-status==1.66.2
45
+ hexbytes==1.2.1
46
+ idna==3.10
47
+ jaraco.classes==3.4.0
48
+ jwcrypto==1.5.6
49
+ keyring==24.3.1
50
+ more-itertools==10.5.0
51
+ msgpack==1.1.0
52
+ multidict==6.1.0
53
+ numpy==2.1.1
54
+ packaging==24.1
55
+ pandas==2.2.3
56
+ parsimonious==0.10.0
57
+ pathlib==1.0.1
58
+ pexpect==4.9.0
59
+ pkce==1.0.3
60
+ pkginfo==1.11.1
61
+ platformdirs==4.3.6
62
+ proto-plus==1.24.0
63
+ protobuf==5.28.2
64
+ ptyprocess==0.7.0
65
+ pyarrow==17.0.0
66
+ pyasn1==0.6.1
67
+ pyasn1_modules==0.4.1
68
+ pycparser==2.22
69
+ pycryptodome==3.21.0
70
+ pydantic==2.9.2
71
+ pydantic_core==2.23.4
72
+ pyproject_hooks==1.2.0
73
+ python-dateutil==2.9.0.post0
74
+ python-jwt==4.1.0
75
+ pytz==2024.2
76
+ pyunormalize==16.0.0
77
+ RapidFuzz==3.10.0
78
+ regex==2024.9.11
79
+ requests==2.32.3
80
+ requests-toolbelt==1.0.0
81
+ rlp==4.0.1
82
+ rsa==4.9
83
+ shellingham==1.5.4
84
+ six==1.16.0
85
+ tomlkit==0.13.2
86
+ toolz==0.12.1
87
+ trove-classifiers==2024.9.12
88
+ types-requests==2.32.0.20240914
89
+ typing_extensions==4.12.2
90
+ tzdata==2024.2
91
+ urllib3==2.2.3
92
+ web3==7.3.0
93
+ websockets==13.1
94
+ xattr==1.1.0
95
+ yarl==1.13.1
@@ -1,93 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: opengradient
3
- Version: 0.2.6
4
- Summary: A Python SDK for OpenGradient inference services
5
- Author-email: OpenGradient <oliver@opengradient.ai>
6
- License: MIT License
7
-
8
- Copyright (c) 2024 OpenGradient
9
-
10
- Permission is hereby granted, free of charge, to any person obtaining a copy
11
- of this software and associated documentation files (the "Software"), to deal
12
- in the Software without restriction, including without limitation the rights
13
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
- copies of the Software, and to permit persons to whom the Software is
15
- furnished to do so, subject to the following conditions:
16
-
17
- The above copyright notice and this permission notice shall be included in all
18
- copies or substantial portions of the Software.
19
-
20
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
- SOFTWARE.
27
-
28
- Project-URL: Homepage, https://opengradient.ai
29
- Classifier: Development Status :: 3 - Alpha
30
- Classifier: Intended Audience :: Developers
31
- Classifier: License :: OSI Approved :: MIT License
32
- Classifier: Programming Language :: Python :: 3
33
- Classifier: Programming Language :: Python :: 3.7
34
- Classifier: Programming Language :: Python :: 3.8
35
- Classifier: Programming Language :: Python :: 3.9
36
- Classifier: Programming Language :: Python :: 3.10
37
- Classifier: Programming Language :: Python :: 3.11
38
- Classifier: Programming Language :: Python :: 3.12
39
- Requires-Python: >=3.7
40
- Description-Content-Type: text/markdown
41
- License-File: LICENSE
42
- Requires-Dist: click
43
- Requires-Dist: requests
44
- Requires-Dist: web3
45
- Requires-Dist: pyarrow
46
- Requires-Dist: firebase-rest-api
47
- Requires-Dist: fastparquet
48
- Requires-Dist: pathlib
49
-
50
- # OpenGradient Python SDK
51
-
52
- Python SDK for OpenGradient inference services.
53
-
54
- ## Installation
55
- ```
56
- pip install opengradient
57
- ```
58
-
59
- ## Quick Start
60
- ```
61
- import opengradient as og
62
- og.init(private_key="x", rpc_url="y", contract_address="z")
63
- ```
64
-
65
- ### Sign in with Email
66
- ```
67
- og.sign_in_with_email_and_password(email="test@test.com", password="Test-123")
68
- ```
69
-
70
- ### Create a Model
71
- ```
72
- og.create_model("test-network-model-5", "testing sdk")
73
- ```
74
-
75
- ### Create a Version of a Model
76
- ```
77
- og.create_version(model_id=11, notes="test notes")
78
- ```
79
-
80
- ### Upload Files to a Model
81
- ```
82
- og.upload(model_path, model_id, version=2)
83
- ```
84
-
85
- ### Run Inference
86
- ```
87
- inference_mode = og.InferenceMode.VANILLA
88
- inference_cid = og.infer(model_cid, model_inputs, inference_mode)
89
- ```
90
-
91
- ```
92
- og.infer(model_id, inference_mode, model_input)
93
- ```
@@ -1,54 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools>=61.0", "wheel"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "opengradient"
7
- version = "0.2.6"
8
- description = "A Python SDK for OpenGradient inference services"
9
- authors = [{name = "OpenGradient", email = "oliver@opengradient.ai"}]
10
- license = {file = "LICENSE"}
11
- readme = "README.md"
12
- requires-python = ">=3.7"
13
- classifiers = [
14
- "Development Status :: 3 - Alpha",
15
- "Intended Audience :: Developers",
16
- "License :: OSI Approved :: MIT License",
17
- "Programming Language :: Python :: 3",
18
- "Programming Language :: Python :: 3.7",
19
- "Programming Language :: Python :: 3.8",
20
- "Programming Language :: Python :: 3.9",
21
- "Programming Language :: Python :: 3.10",
22
- "Programming Language :: Python :: 3.11",
23
- "Programming Language :: Python :: 3.12",
24
- ]
25
- dependencies = [
26
- "click",
27
- "requests",
28
- "web3",
29
- "pyarrow",
30
- "firebase-rest-api",
31
- "fastparquet",
32
- "pathlib",
33
- ]
34
-
35
- [project.scripts]
36
- opengradient = "opengradient.cli:cli"
37
-
38
- [project.urls]
39
- Homepage = "https://opengradient.ai"
40
-
41
- [tool.setuptools]
42
- package-dir = {"" = "src"}
43
- include-package-data = true
44
-
45
- [tool.setuptools.packages.find]
46
- where = ["src"]
47
- exclude = ["tests*"]
48
-
49
- [tool.setuptools.package-data]
50
- "*" = ["*.py", "*.abi"]
51
- "opengradient" = ["abi/*.abi"]
52
-
53
- [tool.setuptools.exclude-package-data]
54
- "*" = ["*.ipynb", "*.pyc", "*.pyo", ".gitignore", "requirements.txt", "conftest.py"]
@@ -1,93 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: opengradient
3
- Version: 0.2.6
4
- Summary: A Python SDK for OpenGradient inference services
5
- Author-email: OpenGradient <oliver@opengradient.ai>
6
- License: MIT License
7
-
8
- Copyright (c) 2024 OpenGradient
9
-
10
- Permission is hereby granted, free of charge, to any person obtaining a copy
11
- of this software and associated documentation files (the "Software"), to deal
12
- in the Software without restriction, including without limitation the rights
13
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
- copies of the Software, and to permit persons to whom the Software is
15
- furnished to do so, subject to the following conditions:
16
-
17
- The above copyright notice and this permission notice shall be included in all
18
- copies or substantial portions of the Software.
19
-
20
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
- SOFTWARE.
27
-
28
- Project-URL: Homepage, https://opengradient.ai
29
- Classifier: Development Status :: 3 - Alpha
30
- Classifier: Intended Audience :: Developers
31
- Classifier: License :: OSI Approved :: MIT License
32
- Classifier: Programming Language :: Python :: 3
33
- Classifier: Programming Language :: Python :: 3.7
34
- Classifier: Programming Language :: Python :: 3.8
35
- Classifier: Programming Language :: Python :: 3.9
36
- Classifier: Programming Language :: Python :: 3.10
37
- Classifier: Programming Language :: Python :: 3.11
38
- Classifier: Programming Language :: Python :: 3.12
39
- Requires-Python: >=3.7
40
- Description-Content-Type: text/markdown
41
- License-File: LICENSE
42
- Requires-Dist: click
43
- Requires-Dist: requests
44
- Requires-Dist: web3
45
- Requires-Dist: pyarrow
46
- Requires-Dist: firebase-rest-api
47
- Requires-Dist: fastparquet
48
- Requires-Dist: pathlib
49
-
50
- # OpenGradient Python SDK
51
-
52
- Python SDK for OpenGradient inference services.
53
-
54
- ## Installation
55
- ```
56
- pip install opengradient
57
- ```
58
-
59
- ## Quick Start
60
- ```
61
- import opengradient as og
62
- og.init(private_key="x", rpc_url="y", contract_address="z")
63
- ```
64
-
65
- ### Sign in with Email
66
- ```
67
- og.sign_in_with_email_and_password(email="test@test.com", password="Test-123")
68
- ```
69
-
70
- ### Create a Model
71
- ```
72
- og.create_model("test-network-model-5", "testing sdk")
73
- ```
74
-
75
- ### Create a Version of a Model
76
- ```
77
- og.create_version(model_id=11, notes="test notes")
78
- ```
79
-
80
- ### Upload Files to a Model
81
- ```
82
- og.upload(model_path, model_id, version=2)
83
- ```
84
-
85
- ### Run Inference
86
- ```
87
- inference_mode = og.InferenceMode.VANILLA
88
- inference_cid = og.infer(model_cid, model_inputs, inference_mode)
89
- ```
90
-
91
- ```
92
- og.infer(model_id, inference_mode, model_input)
93
- ```
@@ -1,7 +0,0 @@
1
- click
2
- requests
3
- web3
4
- pyarrow
5
- firebase-rest-api
6
- fastparquet
7
- pathlib
File without changes
File without changes