We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When running HippoRAG with the GritLM model using the following command:
GritLM
python main.py --dataset sample --llm_base_url https://api.openai.com/v1 --llm_name gpt-4o-mini --embedding_name GritLM/GritLM-7B
We encounter this error:
AttributeError: 'BaseConfig' object has no attribute 'embedding_return_as_cpu'
The error occurs in the configuration dictionary of GritLLMEmbeddingModel:
GritLLMEmbeddingModel
config_dict = { "embedding_model_name": self.embedding_model_name, "return_cpu": self.global_config.embedding_return_as_cpu, # Error here "return_numpy": self.global_config.embedding_return_as_numpy, # Error here "norm": self.global_config.embedding_return_as_normalized, "model_init_params": { "model_name_or_path": self.embedding_model_name, "torch_dtype": "auto", "device_map": "auto", # added this line to use multiple GPUs # **kwargs }, "encode_params": { "batch_size": self.global_config.embedding_batch_size, # "instruction": "", }, "generate_params": { # "max_new_tokens": # "do_sample": } }
The attributes embedding_return_as_cpu and embedding_return_as_numpy are being referenced but were never defined in the BaseConfig class.
embedding_return_as_cpu
embedding_return_as_numpy
BaseConfig
embedding_return_as_cpu: bool = field( default=True, metadata={"help": "Whether to return embeddings on CPU."} ) embedding_return_as_numpy: bool = field( default=True, metadata={"help": "Whether to return embeddings as numpy arrays."} )
The text was updated successfully, but these errors were encountered:
Thanks for pointing this out!
We have removed the unnecessary attributes from the GritLM class config to avoid this issue. The commit is 2f05c27.
Sorry, something went wrong.
No branches or pull requests
AttributeError when using GritLM with HippoRAG
Error Description
When running HippoRAG with the
GritLM
model using the following command:We encounter this error:
Root Cause
The error occurs in the configuration dictionary of
GritLLMEmbeddingModel
:The attributes
embedding_return_as_cpu
andembedding_return_as_numpy
are being referenced but were never defined in theBaseConfig
class.Possible Solutions
BaseConfig
by doing:The text was updated successfully, but these errors were encountered: