Open v-bosch opened 12 hours ago
Thanks for reporting this issue. I could not exactly reproduce the error, as calling
from wandb.util import WandBJSONEncoder
from wandb.sdk.lib.json_util import dumps
from peft import LoraConfig
dumps(LoraConfig(target_modules=["foo", "bar"]), cls=WandBJSONEncoder)
results in
TypeError: Object of type LoraConfig is not JSON serializable
and
dumps(LoraConfig(target_modules=["foo", "bar"]).to_dict(), cls=WandBJSONEncoder)
works successfully. ListConfig
is not a class defined in PEFT and AFAICT it's not in wandb either.
Checking what is in the config that wandb is trying to serialize, I find the following, this seems to be the lora_config
Honestly, nothing in there strikes me as something that can't be serialized.
A similar issue as yours was reported in #567 and a user there mentioned that it's related to the use of hydra
(which seems to have a ListConfig
class). As your log contains HYDRA_FULL_ERROR
, I assume you also use it. If so, could you please investigate if that could be the source of the error? If it's indeed related to hydra, perhaps you can open an issue on wandb and ask them if they can add special handling for hydra configs.
System Info
Hi all, I am running a custom transformer (llava-style) based on Llama2 using PEFT, QLORA and FSDP. It is runnable, but I get a strange error coming from weights & biases, where it seems to be trying to log the LoraConfig, which as a ListConfig is not json serializable. If someone has any info, I would be very grateful! I have not found this error mentioned anywhere else. Please let me know if I can provide more information. I unfortunately cannot share the code yet (+ it is huge). Just hoping to find some pointers to where to start debugging this...
versions: wandb 0.18 python 3.10 peft 0.12.0 transformers 4.46.3 trl 0.12.1
Who can help?
No response
Information
Tasks
examples
folderReproduction
Here are a few bits of code.
The error I get is the following:
Checking what is in the config that wandb is trying to serialize, I find the following, this seems to be the lora_config (I cut off some of the config because its so large, this should be sufficient info I hope).
Expected behavior
For Wandb to not log the peftconfig or for the config to be json serializable.