Throwing AttributeError: can't set attribute 'model', when I call WandbCallback

When I include wandb.keras.WandbCallback(log_weights=True) inside model.fit the above error occurred.

tf.version = 2.16.1
wandb.version = 0.16.6

Hello Isuru,

Thanks so much for getting in touch with support. Let us do a little digging and run some tests on our end and I will get back to you as soon as I have something definitive. I hope you are doing well and looking forward to working with you!

Best,
Jason

Hello Isuru,

To confirm are you attempting to integrate with Keras or TensorFlow? I ask because the integrations are different.

Our Keras integration now utilizes the following:

WandbMetricsLogger : Use this callback for Experiment Tracking. It will log your training and validation metrics along with system metrics to Weights and Biases.
WandbModelCheckpoint : Use this callback to log your model checkpoints to Weight and Biases Artifacts.
WandbEvalCallback: This base callback will log model predictions to Weights and Biases Tables for interactive visualization.

These new callbacks,

  • Adhere to Keras design philosophy
  • Reduce the cognitive load of using a single callback (WandbCallback) for everything,
  • Make it easy for Keras users to modify the callback by subclassing it to support their niche use case.

If you are attempting to integrate with TensorFlow the best option is to follow the guide found here as well as the subsequent Colab both of which give examples of how to best utilize wandb logging within your TensorFlow model training.

Let me know if this has been helpful and if there is anything else I can do for you!

Best,
Jason

1 Like

Hi Isuru, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!