Replies: 1 comment
-
Hi! It seems like Wandb is messing up with the TensorFlow. Here are three different quick fixes to the issue I can suggest right now:
Then in 'main.py' comment out hyperparameter tuning since it uses Wandb package which we do not have anymore. Comment out the following lines: from src.hyperparameter_tuning.run import run_hyperparameter_tuning run_hyperparameter_tuning(
dpc=args.data_processing_config,
mtc=args.model_training_config,
htc=args.hyperparameter_tuning_config,
wandb_user=args.wandb_user,
) Now you can run the model training step without any issues.
import wandb
from wandb.keras import WandbCallback Then right before we call 'model.fit' initialize Wandb: wandb.init(project="soc_model_training") Finally, add a Wandb callback to 'model.fit': model.fit(
X_train,
y_train,
epochs=json.loads(mtc_values["epochs"]),
batch_size=json.loads(mtc_values["batch_size"]),
validation_data=(
X_val,
y_val,
),
shuffle=True,
callbacks=[WandbCallback()],
) To use Wandb, you will need to create an account and export your API key (steps 1 and 2 at https://docs.wandb.ai/quickstart).
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
when i run the python main.py -r=model_training -dpc=I_V_T.ini -mtc=I_V_T.ini ,
Traceback (most recent call last):
File "main.py", line 59, in
run_model_training(
File "D:\2023.5.6\three\Battery-SoC-Estimation-main\src\model_training\run.py", line 87, in run_model_training
model.fit(
File "C:\Users\likaixiong\battery-soc-estimation-venv\lib\site-packages\tensorflow\python\keras\engine\training_v1.py", line 795, in fit
return func.fit(
File "C:\Users\likaixiong\battery-soc-estimation-venv\lib\site-packages\tensorflow\python\keras\engine\training_arrays_v1.py", line 644, in fit
return fit_loop(
File "C:\Users\likaixiong\battery-soc-estimation-venv\lib\site-packages\wandb\integration\keras\keras.py", line 155, in new_arrays
for cbk in cbks:
TypeError: 'NoneType' object is not iterable
can you help me solving the problem, thanks。
Beta Was this translation helpful? Give feedback.
All reactions