nexaroa 0.0.111__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.
- neuroshard/__init__.py +93 -0
- neuroshard/__main__.py +4 -0
- neuroshard/cli.py +466 -0
- neuroshard/core/__init__.py +92 -0
- neuroshard/core/consensus/verifier.py +252 -0
- neuroshard/core/crypto/__init__.py +20 -0
- neuroshard/core/crypto/ecdsa.py +392 -0
- neuroshard/core/economics/__init__.py +52 -0
- neuroshard/core/economics/constants.py +387 -0
- neuroshard/core/economics/ledger.py +2111 -0
- neuroshard/core/economics/market.py +975 -0
- neuroshard/core/economics/wallet.py +168 -0
- neuroshard/core/governance/__init__.py +74 -0
- neuroshard/core/governance/proposal.py +561 -0
- neuroshard/core/governance/registry.py +545 -0
- neuroshard/core/governance/versioning.py +332 -0
- neuroshard/core/governance/voting.py +453 -0
- neuroshard/core/model/__init__.py +30 -0
- neuroshard/core/model/dynamic.py +4186 -0
- neuroshard/core/model/llm.py +905 -0
- neuroshard/core/model/registry.py +164 -0
- neuroshard/core/model/scaler.py +387 -0
- neuroshard/core/model/tokenizer.py +568 -0
- neuroshard/core/network/__init__.py +56 -0
- neuroshard/core/network/connection_pool.py +72 -0
- neuroshard/core/network/dht.py +130 -0
- neuroshard/core/network/dht_plan.py +55 -0
- neuroshard/core/network/dht_proof_store.py +516 -0
- neuroshard/core/network/dht_protocol.py +261 -0
- neuroshard/core/network/dht_service.py +506 -0
- neuroshard/core/network/encrypted_channel.py +141 -0
- neuroshard/core/network/nat.py +201 -0
- neuroshard/core/network/nat_traversal.py +695 -0
- neuroshard/core/network/p2p.py +929 -0
- neuroshard/core/network/p2p_data.py +150 -0
- neuroshard/core/swarm/__init__.py +106 -0
- neuroshard/core/swarm/aggregation.py +729 -0
- neuroshard/core/swarm/buffers.py +643 -0
- neuroshard/core/swarm/checkpoint.py +709 -0
- neuroshard/core/swarm/compute.py +624 -0
- neuroshard/core/swarm/diloco.py +844 -0
- neuroshard/core/swarm/factory.py +1288 -0
- neuroshard/core/swarm/heartbeat.py +669 -0
- neuroshard/core/swarm/logger.py +487 -0
- neuroshard/core/swarm/router.py +658 -0
- neuroshard/core/swarm/service.py +640 -0
- neuroshard/core/training/__init__.py +29 -0
- neuroshard/core/training/checkpoint.py +600 -0
- neuroshard/core/training/distributed.py +1602 -0
- neuroshard/core/training/global_tracker.py +617 -0
- neuroshard/core/training/production.py +276 -0
- neuroshard/governance_cli.py +729 -0
- neuroshard/grpc_server.py +895 -0
- neuroshard/runner.py +3223 -0
- neuroshard/sdk/__init__.py +92 -0
- neuroshard/sdk/client.py +990 -0
- neuroshard/sdk/errors.py +101 -0
- neuroshard/sdk/types.py +282 -0
- neuroshard/tracker/__init__.py +0 -0
- neuroshard/tracker/server.py +864 -0
- neuroshard/ui/__init__.py +0 -0
- neuroshard/ui/app.py +102 -0
- neuroshard/ui/templates/index.html +1052 -0
- neuroshard/utils/__init__.py +0 -0
- neuroshard/utils/autostart.py +81 -0
- neuroshard/utils/hardware.py +121 -0
- neuroshard/utils/serialization.py +90 -0
- neuroshard/version.py +1 -0
- nexaroa-0.0.111.dist-info/METADATA +283 -0
- nexaroa-0.0.111.dist-info/RECORD +78 -0
- nexaroa-0.0.111.dist-info/WHEEL +5 -0
- nexaroa-0.0.111.dist-info/entry_points.txt +4 -0
- nexaroa-0.0.111.dist-info/licenses/LICENSE +190 -0
- nexaroa-0.0.111.dist-info/top_level.txt +2 -0
- protos/__init__.py +0 -0
- protos/neuroshard.proto +651 -0
- protos/neuroshard_pb2.py +160 -0
- protos/neuroshard_pb2_grpc.py +1298 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""
|
|
2
|
+
NeuroShard Python SDK
|
|
3
|
+
|
|
4
|
+
High-level Python client for interacting with NeuroShard nodes.
|
|
5
|
+
|
|
6
|
+
Quick Start:
|
|
7
|
+
from neuroshard import NeuroNode, NEUROLedger
|
|
8
|
+
|
|
9
|
+
# Connect to local node
|
|
10
|
+
node = NeuroNode("http://localhost:8000", api_token="YOUR_TOKEN")
|
|
11
|
+
|
|
12
|
+
# Check status
|
|
13
|
+
status = node.get_status()
|
|
14
|
+
print(f"Node: {status.node_id}")
|
|
15
|
+
|
|
16
|
+
# Run inference
|
|
17
|
+
response = node.inference("What is NeuroShard?", max_tokens=100)
|
|
18
|
+
print(response.text)
|
|
19
|
+
|
|
20
|
+
# Check balance
|
|
21
|
+
ledger = NEUROLedger(node)
|
|
22
|
+
balance = ledger.get_balance()
|
|
23
|
+
print(f"Balance: {balance.available} NEURO")
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
from neuroshard.sdk.client import (
|
|
27
|
+
NeuroNode,
|
|
28
|
+
NEUROLedger,
|
|
29
|
+
AsyncNeuroNode,
|
|
30
|
+
AsyncNEUROLedger,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
from neuroshard.sdk.types import (
|
|
34
|
+
NodeStatus,
|
|
35
|
+
Metrics,
|
|
36
|
+
InferenceResponse,
|
|
37
|
+
InferenceChunk,
|
|
38
|
+
PeerInfo,
|
|
39
|
+
LayerInfo,
|
|
40
|
+
Balance,
|
|
41
|
+
Transaction,
|
|
42
|
+
StakeInfo,
|
|
43
|
+
RewardSummary,
|
|
44
|
+
TrainingStatus,
|
|
45
|
+
ResourceStatus,
|
|
46
|
+
NetworkMetrics,
|
|
47
|
+
InferenceMetrics,
|
|
48
|
+
TrainingMetrics,
|
|
49
|
+
RewardMetrics,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
from neuroshard.sdk.errors import (
|
|
53
|
+
NeuroShardError,
|
|
54
|
+
AuthenticationError,
|
|
55
|
+
InsufficientBalanceError,
|
|
56
|
+
RateLimitError,
|
|
57
|
+
NodeOfflineError,
|
|
58
|
+
InvalidRequestError,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
__all__ = [
|
|
62
|
+
# Clients
|
|
63
|
+
"NeuroNode",
|
|
64
|
+
"NEUROLedger",
|
|
65
|
+
"AsyncNeuroNode",
|
|
66
|
+
"AsyncNEUROLedger",
|
|
67
|
+
# Types
|
|
68
|
+
"NodeStatus",
|
|
69
|
+
"Metrics",
|
|
70
|
+
"InferenceResponse",
|
|
71
|
+
"InferenceChunk",
|
|
72
|
+
"PeerInfo",
|
|
73
|
+
"LayerInfo",
|
|
74
|
+
"Balance",
|
|
75
|
+
"Transaction",
|
|
76
|
+
"StakeInfo",
|
|
77
|
+
"RewardSummary",
|
|
78
|
+
"TrainingStatus",
|
|
79
|
+
"ResourceStatus",
|
|
80
|
+
"NetworkMetrics",
|
|
81
|
+
"InferenceMetrics",
|
|
82
|
+
"TrainingMetrics",
|
|
83
|
+
"RewardMetrics",
|
|
84
|
+
# Errors
|
|
85
|
+
"NeuroShardError",
|
|
86
|
+
"AuthenticationError",
|
|
87
|
+
"InsufficientBalanceError",
|
|
88
|
+
"RateLimitError",
|
|
89
|
+
"NodeOfflineError",
|
|
90
|
+
"InvalidRequestError",
|
|
91
|
+
]
|
|
92
|
+
|