Skip to content

Commit

Permalink
[Fix] Fix declare of variable (#951)
Browse files Browse the repository at this point in the history
* adjust none end calculation

* attempt to fix stop issue

* modify stop

* update nonce_start by correct amount

* fix nonce init to only random and update

* fix update amount

* add start values

* add test

* try different hashrate calc

* try EWMA for hash_rate

* oops bad import

* change name to worker

* extract helper and modify comment

* fix time now

* catch Full

* Prometheus bug fix (#942)

* local train bug fix

* normalization update

* fix tests

* remove test

* updated normalization

* Naming changes, bug fixes

* subtensor update for max clip

* max weight to a million

* Fixes for ordering and comments

* additional tests

* string fix

* numerical stability and testing updates

* minor update for division by zero

* Naming and spacing fixes

* epsilon update

* small fix

* additional subtensor parameters

* remove print

* help string fixes

* small bug fix

* use a finished queue instead of times

* move constants to function params

* [Fix] only reregister if flag is set (#937)

* add test for expected reregister behaviour

* add fix

* pass passed args into earlier parse

* fix test by using args

* exit before actual register

* use strtobool

Co-authored-by: Unconst <32490803+unconst@users.noreply.github.com>

* fix name of n

* [BIT 584] [feature] btcli register output stats not in place (#923)

* add flags for output_in_place during registration

* stop tracking best

* refactor registration logging output

* fix reregister from type bool

* change in_place and use_cuda to strtobool

* add param and defaults

* fix reference before assignment

* add new logger to cuda rege

* pass param to btcli register call

* oops

* fix init

* try slight timeout

* try fix

* oop

* ?

* fix use_cuda flag

* add test for new use_cuda flag setup

* use create pow to patch

* all no prompt dev id

* fix console.error

* use lower for str comparison

* call self register instead

* add test for wallet register call

* tests are for wallet reregister

* fix typo

* no self on top-level test

* fix tests?

* use reregister

* typo in test

* fix assert

* fix assert

* should be False

* fix time output to use timedelta

* add log verbose as option to reg output

* should be action

* fix typo

* add missing function arg

* fix spacing

* fix flags

* fix flags

* fix test

* should pass in args to config pre-parse

* use None instead of NA

Co-authored-by: isabella618033 <49876827+isabella618033@users.noreply.github.com>
Co-authored-by: Unconst <32490803+unconst@users.noreply.github.com>

* fix verbose log

* allow --output_in_place

* fix n

* change to --no_ouput_in_place

* fix test

* fix ref to solution

Co-authored-by: Eugene-hu <85906264+Eugene-hu@users.noreply.github.com>
Co-authored-by: Unconst <32490803+unconst@users.noreply.github.com>
Co-authored-by: isabella618033 <49876827+isabella618033@users.noreply.github.com>
  • Loading branch information
4 people authored Oct 13, 2022
1 parent 90c383f commit 2e6274d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bittensor/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,6 @@ def solve_for_difficulty_fast( subtensor, wallet, output_in_place: bool = True,
logger.start()

solution = None
hash_rate = 0 # EWMA hash_rate (H/s)

hash_rates = [0] * n_samples # The last n true hash_rates
weights = [alpha_ ** i for i in range(n_samples)] # weights decay by alpha
Expand Down Expand Up @@ -746,6 +745,7 @@ def update_curr_block(block_number: int, block_bytes: bytes, diff: int, lock: mu
hash_rates = [0] * n_samples # The last n true hash_rates
weights = [alpha_ ** i for i in range(n_samples)] # weights decay by alpha

solution = None
while not wallet.is_registered(subtensor):
# Wait until a solver finds a solution
try:
Expand Down

0 comments on commit 2e6274d

Please sign in to comment.