Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging #340

Merged
merged 172 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
7dadd32
add more documentation
mccrindlebrian Jan 16, 2025
b91a83f
create MinerRegistry with credibilities
mccrindlebrian Jan 25, 2025
b80757e
add RewardRegistry
mccrindlebrian Jan 25, 2025
3e2799d
add priority
mccrindlebrian Jan 25, 2025
022a2c2
add forward method to basereward
mccrindlebrian Jan 25, 2025
0414379
reward tasks are list
mccrindlebrian Jan 26, 2025
2139c50
add job_type to the Job store so that we can call this reward pipeline
mccrindlebrian Jan 26, 2025
9240d10
job_type to upload_job
mccrindlebrian Jan 26, 2025
7dafb8c
move process_md_output to SyntheticMDReward
mccrindlebrian Jan 26, 2025
17e447f
remove RewardRegistry and make EvaluationRegistry
mccrindlebrian Jan 26, 2025
9bfe1dc
make evaluators
mccrindlebrian Jan 26, 2025
c142e91
move synthetic evaluations into SyntheticMDEvaluator
mccrindlebrian Jan 26, 2025
4361451
pass in the velm array data location
mccrindlebrian Jan 26, 2025
e6e5094
change names to have Evaluator
mccrindlebrian Jan 27, 2025
479f1ea
docstring
mccrindlebrian Jan 27, 2025
30dd3f8
move registries into their own folder
mccrindlebrian Jan 27, 2025
b4910c3
referencing
mccrindlebrian Jan 27, 2025
749680b
create md reward pipelines
mccrindlebrian Jan 27, 2025
d8eb730
remove priority from evaluators
mccrindlebrian Jan 27, 2025
32b1ec8
remove dependancies in __init__, make evaludation registry
mccrindlebrian Jan 27, 2025
84b4a60
remove calculate rewards from miner registry
mccrindlebrian Jan 27, 2025
7ee30fc
make credibilities and load
mccrindlebrian Jan 27, 2025
6057d50
miner_registry reset if resync
mccrindlebrian Jan 27, 2025
9acedab
Merge branch 'staging' into refactor-validator
mccrindlebrian Jan 27, 2025
cd3bd73
Merge pull request #334 from macrocosm-os/refactor-validator
mccrindlebrian Jan 27, 2025
ecf31f2
change names for evaluators and rewards to be the same for easy mappi…
Sarkosos Jan 27, 2025
7a14511
black
Sarkosos Jan 27, 2025
527644b
add s3 off for debugging, fix evaluation dict, and credibility aggreg…
Sarkosos Jan 28, 2025
a9f61c5
updated run_validator.sh script to start read node
Sarkosos Jan 28, 2025
d4c762c
modified store functionality to work with gjp
Sarkosos Jan 28, 2025
4837439
modified job parameters to last longer and have 1 update
Sarkosos Jan 28, 2025
66f04a0
merge black
mccrindlebrian Jan 28, 2025
c35a237
implement reward pipeline on the batch
mccrindlebrian Jan 28, 2025
2ab43b6
start read node in the constructor of the FoldingMiner
Jan 28, 2025
730b53f
add a copy of query_rqlite commands to utils: query_rqlite.py
Jan 28, 2025
e2cecd6
add job_id to JobSubmissionSynapse
Jan 28, 2025
8bc7587
add fetch_sql_job_details method to FoldingMiner class
Jan 28, 2025
ba3ac42
Reworked Job format
Sarkosos Jan 29, 2025
b9a39c3
Only looking at jobs that belong to a given validator
Sarkosos Jan 29, 2025
7a3df08
separate evaluation and validation
mccrindlebrian Jan 29, 2025
4f0465b
Merge branch 'staging' into features/gjp-validator
Sarkosos Jan 29, 2025
3dd8dae
Merge branch 'features/gjp-validator' into features/folding-miner-gjp
Jan 29, 2025
c016cb3
Update folding/store.py
Sarkosos Jan 29, 2025
5fe15b8
Update folding/store.py
Sarkosos Jan 29, 2025
e356477
variable naming
Sarkosos Jan 29, 2025
8e3b8a5
Merge pull request #342 from macrocosm-os/features/gjp-validator
mccrindlebrian Jan 29, 2025
fb78d61
download_gjp_input_files(), create_unique_job() to separate some of t…
Jan 29, 2025
8c3c6b2
add start_read_node to run_miner.sh
Jan 29, 2025
e9778e7
docstrings, args
Jan 30, 2025
11a0d22
remove start_read_node
Jan 30, 2025
59d03c1
cleanup
Sarkosos Jan 30, 2025
c3adecb
remove old reward pipeline
mccrindlebrian Jan 30, 2025
58538c4
Merge branch 'features/use-reward-pipeline' into features/gjp-validator
Sarkosos Jan 30, 2025
23ef85c
add gjp-models to poetry
Sarkosos Jan 30, 2025
30df780
rename the organic classes
mccrindlebrian Jan 30, 2025
f239396
Merge branch 'features/use-reward-pipeline' into features/gjp-validator
Sarkosos Jan 30, 2025
0141e6b
Merge branch 'staging' into features/gjp-validator
Sarkosos Jan 30, 2025
d11a127
v1.5.0
mccrindlebrian Jan 30, 2025
3b0bd7b
remove old gromacs data
mccrindlebrian Jan 30, 2025
749cb39
Use gjp-models
Sarkosos Jan 30, 2025
eadbfd6
bug fix
Sarkosos Jan 30, 2025
5970c20
rename submit_simulation -> create_simulation_from_job
Jan 30, 2025
b1f46c4
credibility tests and new positive/negative impact on credibility
mccrindlebrian Jan 30, 2025
139e99e
add save and load methods to the miner registry
mccrindlebrian Jan 30, 2025
d01009e
new try except for the miner reg
mccrindlebrian Jan 30, 2025
2c21f11
rounding, new method names
mccrindlebrian Jan 30, 2025
884ebad
registry tests
mccrindlebrian Jan 30, 2025
4d8976f
rewrote evaluation_registry
Sarkosos Jan 30, 2025
3c0cc4b
rewrote get_energies process to validate top_k miners
Sarkosos Jan 30, 2025
41b1b90
Merge pull request #321 from macrocosm-os/docs
mccrindlebrian Jan 30, 2025
b20d800
refactor: rename velm_array_pkl to velm_array_pkl_path for clarity
Sarkosos Jan 31, 2025
1311dc0
refactor: rename evaluation methods for consistency and clarity
Sarkosos Jan 31, 2025
6ae7a4f
Update folding/validators/reward.py
Sarkosos Jan 31, 2025
c37e5f2
feat: add DIFFERENCE_THRESHOLD constant and update energy validation …
Sarkosos Jan 31, 2025
5043a10
feat: add hotkey validation method and clean up related logic in vali…
Sarkosos Jan 31, 2025
5161bce
debugging
Sarkosos Feb 2, 2025
c53cda6
modified Jobsubmissionsynapse to pass only the job_id
Sarkosos Feb 2, 2025
c60ef65
removed unused function
Sarkosos Feb 2, 2025
2f4554b
passing the job_id and sending the job on job creation
Sarkosos Feb 2, 2025
bf1aed2
remove comment, empty lines
schampoux Feb 2, 2025
6cd2e02
modified the use of the jobsubmissionsynapse
Sarkosos Feb 3, 2025
4ef08fc
gjp documentation
mccrindlebrian Feb 3, 2025
40054d3
added abstract classes
Sarkosos Feb 3, 2025
03dc604
add background task for updating uids for rewards on inactive jobs
mccrindlebrian Feb 3, 2025
75ede99
Update documentation/gjp/README.md
mccrindlebrian Feb 3, 2025
6984479
Merge pull request #348 from macrocosm-os/add-docs
mccrindlebrian Feb 3, 2025
649885e
add job upload confirmation
Sarkosos Feb 3, 2025
9df8412
Merge branch 'features/gjp-validator' into features/reward-sharing
Sarkosos Feb 3, 2025
f5482cc
Merge pull request #349 from macrocosm-os/features/reward-sharing
Sarkosos Feb 3, 2025
623b7ff
rewrote store to use the http api instead of accessing sql directly
Sarkosos Feb 3, 2025
088da21
added a write -> read process to uploading jobs
Sarkosos Feb 3, 2025
d9b94ec
remove prints
Sarkosos Feb 3, 2025
82c28c1
implement database monitoring and automatic restart for rqlite service
Sarkosos Feb 3, 2025
426b667
used subprocess to relaunch rqlite
Sarkosos Feb 3, 2025
56b9007
removed testing code
Sarkosos Feb 3, 2025
4539dc9
update sql query functions to use the API of the node rather than the…
schampoux Feb 3, 2025
c2ca702
miner docs
schampoux Feb 3, 2025
ee6f111
moving imports around
mccrindlebrian Feb 3, 2025
0841737
add await
Sarkosos Feb 4, 2025
a50f988
clarity
Sarkosos Feb 4, 2025
2d5baac
Merge pull request #346 from macrocosm-os/make-tests
mccrindlebrian Feb 4, 2025
93f6a11
fix bugs, include adding rewards to GJPJob
mccrindlebrian Feb 4, 2025
7266010
fix read_and_update_rewards
mccrindlebrian Feb 4, 2025
2330b67
fix reward updating with proper Queue methods
mccrindlebrian Feb 4, 2025
e2bebab
Merge branch 'features/gjp-validator' into features/reward-sharing
mccrindlebrian Feb 4, 2025
253e893
remove handler from Protein class because it doesn't need to be there
mccrindlebrian Feb 4, 2025
551dcac
fix logic that breaks forward method if handler is None
mccrindlebrian Feb 4, 2025
08bb833
remove the idea that the handler can be None
mccrindlebrian Feb 4, 2025
4504fe4
response to dict
Sarkosos Feb 4, 2025
22465a0
clarity
Sarkosos Feb 4, 2025
af53001
Merge branch 'features/gjp-validator' of https://github.com/macrocosm…
Sarkosos Feb 4, 2025
22a1de1
removed testing code
Sarkosos Feb 4, 2025
a41a08a
removed testing code
Sarkosos Feb 4, 2025
90488d9
removed old files
Sarkosos Feb 4, 2025
d6952dc
fix bug
mccrindlebrian Feb 4, 2025
63f62bc
change streaming, one less db request
Sarkosos Feb 4, 2025
9ae5f2e
return bool is download used
mccrindlebrian Feb 4, 2025
c47b310
if not a success then return
mccrindlebrian Feb 4, 2025
a757f27
json loads s3 links
Sarkosos Feb 4, 2025
a93aeeb
add logging for anomaly check and fix pdb_id reference in validator
Sarkosos Feb 4, 2025
4427b3f
start the read node in the folding miner init
Sarkosos Feb 4, 2025
9b0790e
add szymons restart_rqlite function to the folding miner
Sarkosos Feb 4, 2025
b91bffd
Merge branch 'features/gjp-validator' into fix/handler-location
mccrindlebrian Feb 5, 2025
2c0d902
remove numpy logic on empty arrays during exceptions
Sarkosos Feb 5, 2025
1fd589f
allow last_log_leader to be smaller than last_log_read
Sarkosos Feb 5, 2025
5ca4ff7
add more constants
Sarkosos Feb 5, 2025
6b8ba7b
numpy changes and constants
Sarkosos Feb 5, 2025
e9246a0
remove old code
Sarkosos Feb 5, 2025
0d0aeaf
remove logs
Sarkosos Feb 5, 2025
08310c9
move timing logs into verbosity flag
Sarkosos Feb 5, 2025
9b5788f
remove uids from add jobs
Sarkosos Feb 5, 2025
dcdf1ab
Merge branch 'staging' into features/gjp-validator
mccrindlebrian Feb 5, 2025
ab2429d
Merge pull request #347 from macrocosm-os/features/gjp-validator
mccrindlebrian Feb 5, 2025
8c85b30
Merge branch 'staging' into fix/handler-location
mccrindlebrian Feb 5, 2025
8bf7e21
Merge pull request #351 from macrocosm-os/fix/handler-location
mccrindlebrian Feb 5, 2025
973c904
use JobBase from models
mccrindlebrian Feb 5, 2025
ad4978a
make time-based update check and remove score updates locally
mccrindlebrian Feb 5, 2025
c90b327
Merge branch 'staging' into features/reward-sharing
mccrindlebrian Feb 5, 2025
bbbf1f8
Merge pull request #350 from macrocosm-os/features/reward-sharing
mccrindlebrian Feb 5, 2025
8414939
update default S3 bucket name in config
Sarkosos Feb 5, 2025
0fc3ae1
correct logger message
Sarkosos Feb 5, 2025
2e1f200
refactor validator and run_validator scripts for improved rqlite serv…
Sarkosos Feb 5, 2025
7c38d42
implement rqlite service management in BaseNeuron and update Validato…
Sarkosos Feb 5, 2025
49515ea
update update_interval to a random value between 30 minutes and 2 hours
Sarkosos Feb 5, 2025
babaac3
Merge branch 'features/gjp-validator' into features/folding-miner-gjp
mccrindlebrian Feb 5, 2025
9887723
Update documentation/background.md
Sarkosos Feb 5, 2025
e6ed0aa
Update documentation/background.md
Sarkosos Feb 5, 2025
f881a8d
Apply suggestions from code review
Sarkosos Feb 5, 2025
a2a45db
remove whitespace
schampoux Feb 5, 2025
9f3936f
Merge branch 'staging' into features/folding-miner-gjp
schampoux Feb 5, 2025
fe421fb
remove query_rqlite from utils, not in use
Sarkosos Feb 5, 2025
200fe24
remove static variables and make them class attributes. Use the proje…
Sarkosos Feb 5, 2025
6add03d
create class attribute for base neuron for sself.rqlite_data_dir
Sarkosos Feb 5, 2025
e0b9474
remove restart rqlite function and use start_rqlite() from the base m…
Sarkosos Feb 5, 2025
9dae4b2
Making sure to pass the system_kwargs to the system config
Sarkosos Feb 5, 2025
7f07bcf
remove rqlited startup from run_miner
Sarkosos Feb 5, 2025
e93c473
Fix response handling in SQLiteJobStore to correctly process job retr…
Sarkosos Feb 5, 2025
2d31654
removed testing script
Sarkosos Feb 5, 2025
c913d2c
Merge pull request #344 from macrocosm-os/features/folding-miner-gjp
schampoux Feb 5, 2025
aa9ba85
Refactor energy validation logic and update reward model initializati…
Sarkosos Feb 5, 2025
b6c71af
Update SQLiteJobStore to handle computed rewards and simplify job upd…
Sarkosos Feb 5, 2025
9971786
Remove redundant hotkey check in MDReward class to streamline reward …
Sarkosos Feb 5, 2025
2569633
removed testing code
Sarkosos Feb 5, 2025
8a681ca
put scoring loop in an actual loop
Sarkosos Feb 5, 2025
e3e19b9
v2.0.0
mccrindlebrian Feb 6, 2025
41f1a68
update method now closes the job
Sarkosos Feb 6, 2025
4b3440e
Refactor get_inactive_queue method to accept string timestamp and add…
Sarkosos Feb 6, 2025
e8dc813
dont load gjp job if fails to load to s3
Sarkosos Feb 6, 2025
ee9c012
Update mining documentation to clarify Global Job Pool usage and base…
schampoux Feb 6, 2025
bc33d41
remove the testing code
Sarkosos Feb 6, 2025
9244690
added init file
Sarkosos Feb 6, 2025
5abad64
Merge pull request #352 from macrocosm-os/fix/miner-docs-update
mccrindlebrian Feb 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove priority from evaluators
  • Loading branch information
mccrindlebrian committed Jan 27, 2025
commit d8eb7309c16188ea52096e22e1d3ba11b9b342ea
12 changes: 4 additions & 8 deletions folding/registries/evaluation_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@


class SyntheticMDEvaluator(BaseEvaluator):
def __init__(self, pdb_id: str, priority: float = 1, **kwargs):
def __init__(self, pdb_id: str, **kwargs):
self.pdb_id = pdb_id
self.priority = priority
self.kwargs = kwargs
self.md_simulator = OpenMMSimulation()

Expand Down Expand Up @@ -316,8 +315,7 @@ def name(self) -> str:


class OrganicMDEvaluator(BaseEvaluator):
def __init__(self, priority: float = 1, **kwargs):
self.priority = priority
def __init__(self, **kwargs):
self.kwargs = kwargs

def _evaluate(self, data: Dict[str, Any]) -> float:
Expand All @@ -328,8 +326,7 @@ def name(self) -> str:


class SyntheticMLEvaluator(BaseEvaluator):
def __init__(self, priority: float = 1, **kwargs):
self.priority = priority
def __init__(self, **kwargs):
self.kwargs = kwargs

def _evaluate(self, data: Dict[str, Any]) -> float:
Expand All @@ -340,8 +337,7 @@ def name(self) -> str:


class OrganicMLEvaluator(BaseEvaluator):
def __init__(self, priority: float = 1, **kwargs):
self.priority = priority
def __init__(self, **kwargs):
self.kwargs = kwargs

def _evaluate(self, data: Dict[str, Any]) -> float:
Expand Down
9 changes: 2 additions & 7 deletions folding/rewards/reward_pipeline.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import torch
import bittensor as bt
from folding.store import Job
from folding.rewards.linear_reward import divide_decreasing
from folding.utils.logger import logger


async def reward_pipeline(
energies: torch.Tensor, rewards: torch.Tensor, top_reward: float, job: Job
):
async def reward_pipeline(energies: torch.Tensor, rewards: torch.Tensor, top_reward: float, job: Job):
"""A reward pipeline that determines how to place rewards onto the miners sampled within the batch.
Currently applies a linearly decreasing reward on all miners that are not the current best / previously
best loss using the function "divide_decreasing".
Expand All @@ -22,9 +19,7 @@ async def reward_pipeline(

# If the best hotkey is not in the set of hotkeys in the job, this means that the top miner has stopped replying.
if job.best_hotkey not in job.hotkeys:
logger.warning(
f"Best hotkey {job.best_hotkey} not in hotkeys {job.hotkeys}. Assigning no reward."
)
logger.warning(f"Best hotkey {job.best_hotkey} not in hotkeys {job.hotkeys}. Assigning no reward.")
return rewards # rewards of all 0s.

best_index = job.hotkeys.index(job.best_hotkey)
Expand Down