Skip to content

Commit

Permalink
Revert "fix overview pickling (#1508)"
Browse files Browse the repository at this point in the history
This reverts commit 2cecaf9 in favor of #1509
  • Loading branch information
ifrit98 committed Sep 1, 2023
1 parent 2cecaf9 commit fe730eb
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions bittensor/commands/overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,12 @@ def run(cli: 'bittensor.cli'):
}
all_hotkey_addresses = list(hotkey_addr_to_wallet.keys())

# Create a copy of the config without the parser and formatter_class.
## This is needed to pass to the ProcessPoolExecutor, which cannot pickle the parser.
copy_config = cli.config.copy()
copy_config['__parser'] = None
copy_config['formatter_class'] = None

# Pull neuron info for all keys.
## Max len(netuids) or 5 threads.
with ProcessPoolExecutor(max_workers=max(len(netuids), 5)) as executor:
results = executor.map(
OverviewCommand._get_neurons_for_netuid,
[(copy_config, netuid, all_hotkey_addresses) for netuid in netuids],
[(cli.config, netuid, all_hotkey_addresses) for netuid in netuids],
)
executor.shutdown(wait=True) # wait for all complete

Expand Down

0 comments on commit fe730eb

Please sign in to comment.