-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored core from files to folder
- Loading branch information
sal
committed
Jan 16, 2025
1 parent
85792d1
commit 26debc3
Showing
22 changed files
with
125 additions
and
19 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .key import Key |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
from .network import Network |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from .server import Server | ||
from .client import Client |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
```python | ||
import commune as c | ||
|
||
vali = c.module('vali')( network='local', batch_size=128, timeout=3, run_loop=True) | ||
# Get scoreboard | ||
scoreboard = vali.scoreboard() | ||
``` | ||
## Configuration Options | ||
|
||
- `network`: Network type ('local', 'bittensor', 'subspace', etc.), to specify the subnet, use {network}/{subnet} (default: 'subspace/storage') | ||
- `subnet`: Subnet name (default: None) | ||
- `batch_size`: Size of parallel processing batches (default: 128) | ||
- `max_workers`: Number of parallel workers (default: 4) | ||
- `timeout`: Evaluation timeout in seconds (default: 3) | ||
- `tempo`: Time between epochs (default: 5) | ||
- `score`: Score function (Optional) | ||
- `run_loop`: Enable/disable continuous monitoring | ||
|
||
## Key Methods | ||
|
||
### score_module | ||
Evaluates a single module and returns its score. | ||
|
||
```python | ||
result = vali.score_module(module_dict) | ||
``` | ||
|
||
### epoch | ||
Runs a complete evaluation cycle. | ||
|
||
```python | ||
results = vali.epoch() | ||
``` | ||
|
||
### scoreboard | ||
Generates a performance scoreboard. | ||
|
||
```python | ||
board = vali.scoreboard( | ||
keys=['name', 'score', 'latency', 'address', 'key'], | ||
ascending=True, | ||
by='score' | ||
) | ||
``` | ||
|
||
## Testing | ||
|
||
```python | ||
# Run test suite | ||
Vali.test( | ||
n=2, | ||
tag='vali_test_net', | ||
trials=5, | ||
tempo=4 | ||
) | ||
``` | ||
|
||
## License | ||
|
||
[License Information] | ||
|
||
## Contributing | ||
|
||
[Contribution Guidelines] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .vali import Vali # the vali module |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters