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.
Files changed (78) hide show
  1. neuroshard/__init__.py +93 -0
  2. neuroshard/__main__.py +4 -0
  3. neuroshard/cli.py +466 -0
  4. neuroshard/core/__init__.py +92 -0
  5. neuroshard/core/consensus/verifier.py +252 -0
  6. neuroshard/core/crypto/__init__.py +20 -0
  7. neuroshard/core/crypto/ecdsa.py +392 -0
  8. neuroshard/core/economics/__init__.py +52 -0
  9. neuroshard/core/economics/constants.py +387 -0
  10. neuroshard/core/economics/ledger.py +2111 -0
  11. neuroshard/core/economics/market.py +975 -0
  12. neuroshard/core/economics/wallet.py +168 -0
  13. neuroshard/core/governance/__init__.py +74 -0
  14. neuroshard/core/governance/proposal.py +561 -0
  15. neuroshard/core/governance/registry.py +545 -0
  16. neuroshard/core/governance/versioning.py +332 -0
  17. neuroshard/core/governance/voting.py +453 -0
  18. neuroshard/core/model/__init__.py +30 -0
  19. neuroshard/core/model/dynamic.py +4186 -0
  20. neuroshard/core/model/llm.py +905 -0
  21. neuroshard/core/model/registry.py +164 -0
  22. neuroshard/core/model/scaler.py +387 -0
  23. neuroshard/core/model/tokenizer.py +568 -0
  24. neuroshard/core/network/__init__.py +56 -0
  25. neuroshard/core/network/connection_pool.py +72 -0
  26. neuroshard/core/network/dht.py +130 -0
  27. neuroshard/core/network/dht_plan.py +55 -0
  28. neuroshard/core/network/dht_proof_store.py +516 -0
  29. neuroshard/core/network/dht_protocol.py +261 -0
  30. neuroshard/core/network/dht_service.py +506 -0
  31. neuroshard/core/network/encrypted_channel.py +141 -0
  32. neuroshard/core/network/nat.py +201 -0
  33. neuroshard/core/network/nat_traversal.py +695 -0
  34. neuroshard/core/network/p2p.py +929 -0
  35. neuroshard/core/network/p2p_data.py +150 -0
  36. neuroshard/core/swarm/__init__.py +106 -0
  37. neuroshard/core/swarm/aggregation.py +729 -0
  38. neuroshard/core/swarm/buffers.py +643 -0
  39. neuroshard/core/swarm/checkpoint.py +709 -0
  40. neuroshard/core/swarm/compute.py +624 -0
  41. neuroshard/core/swarm/diloco.py +844 -0
  42. neuroshard/core/swarm/factory.py +1288 -0
  43. neuroshard/core/swarm/heartbeat.py +669 -0
  44. neuroshard/core/swarm/logger.py +487 -0
  45. neuroshard/core/swarm/router.py +658 -0
  46. neuroshard/core/swarm/service.py +640 -0
  47. neuroshard/core/training/__init__.py +29 -0
  48. neuroshard/core/training/checkpoint.py +600 -0
  49. neuroshard/core/training/distributed.py +1602 -0
  50. neuroshard/core/training/global_tracker.py +617 -0
  51. neuroshard/core/training/production.py +276 -0
  52. neuroshard/governance_cli.py +729 -0
  53. neuroshard/grpc_server.py +895 -0
  54. neuroshard/runner.py +3223 -0
  55. neuroshard/sdk/__init__.py +92 -0
  56. neuroshard/sdk/client.py +990 -0
  57. neuroshard/sdk/errors.py +101 -0
  58. neuroshard/sdk/types.py +282 -0
  59. neuroshard/tracker/__init__.py +0 -0
  60. neuroshard/tracker/server.py +864 -0
  61. neuroshard/ui/__init__.py +0 -0
  62. neuroshard/ui/app.py +102 -0
  63. neuroshard/ui/templates/index.html +1052 -0
  64. neuroshard/utils/__init__.py +0 -0
  65. neuroshard/utils/autostart.py +81 -0
  66. neuroshard/utils/hardware.py +121 -0
  67. neuroshard/utils/serialization.py +90 -0
  68. neuroshard/version.py +1 -0
  69. nexaroa-0.0.111.dist-info/METADATA +283 -0
  70. nexaroa-0.0.111.dist-info/RECORD +78 -0
  71. nexaroa-0.0.111.dist-info/WHEEL +5 -0
  72. nexaroa-0.0.111.dist-info/entry_points.txt +4 -0
  73. nexaroa-0.0.111.dist-info/licenses/LICENSE +190 -0
  74. nexaroa-0.0.111.dist-info/top_level.txt +2 -0
  75. protos/__init__.py +0 -0
  76. protos/neuroshard.proto +651 -0
  77. protos/neuroshard_pb2.py +160 -0
  78. 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
+