I'm trying to improve my keras neural network hyperparameters by optimizing them with the weights and biases library (wandb).
Here is my configuration:
method: bayes
metric:
goal: maximize
name: Search elo
parameters:
batch_number:
distribution: int_uniform
max: 100
min: 1
batch_size:
distribution: int_uniform
max: 1024
min: 1
epochs:
distribution: int_uniform
max: 10
min: 1
neural_net_blocks:
distribution: int_uniform
max: 5
min: 1
num_simulations:
distribution: int_uniform
max: 800
min: 1
pb_c_base:
distribution: int_uniform
max: 25000
min: 15000
pb_c_init:
distribution: uniform
max: 3
min: 1
root_dirichlet_alpha:
distribution: uniform
max: 4
min: 0
root_exploration_fraction:
distribution: uniform
max: 1
min: 0
program: ../Main.py
However, when I run wandb agent arkleseisure/projectname/sweepcode, I get this error, repeated every time a sweep launches.
2020-09-13 12:15:02,188 - wandb.wandb_agent - INFO - Running runs: ['klawqpqv']
2020-09-13 12:15:02,189 - wandb.wandb_agent - INFO - Cleaning up finished run: klawqpqv
2020-09-13 12:15:03,063 - wandb.wandb_agent - INFO - Agent received command: run
2020-09-13 12:15:03,063 - wandb.wandb_agent - INFO - Agent starting run with config:
batch_number: 75
batch_size: 380
epochs: 10
neural_net_blocks: 4
num_simulations: 301
pb_c_base: 17138
pb_c_init: 1.5509741790555416
root_dirichlet_alpha: 2.7032316257955133
root_exploration_fraction: 0.5768106739703028
2020-09-13 12:15:03,245 - wandb.wandb_agent - INFO - About to run command: python ../Main.py --batch_number=75 --batch_size=380 --epochs=10 --neural_net_blocks=4 --num_simulations=301 --p
b_c_base=17138 --pb_c_init=1.5509741790555416 --root_dirichlet_alpha=2.7032316257955133 --root_exploration_fraction=0.5768106739703028
Traceback (most recent call last):
File "../Main.py", line 3, in <module>
import numpy
ModuleNotFoundError: No module named 'numpy'
The sweep crashes after three failed attempts, and I was wondering what I am doing wrong. Surely when W & B is made for machine learning projects, it must be possible to import numpy, so what can I change. My code before that point just imports other files from my project. When I run the code normally, it doesn't crash, but executes perfectly ordinarily.