Skip to content
New issue

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

Error when running reinvent command #161

Open
Aleksashka11 opened this issue Nov 15, 2024 · 1 comment
Open

Error when running reinvent command #161

Aleksashka11 opened this issue Nov 15, 2024 · 1 comment

Comments

@Aleksashka11
Copy link

Hi! First of all, many thanks for this amazing tool! 😊

I encountered an issue with Reinvent 4.4.22. When I run the reinvent command, an error occurs that points to the following lines in the code:

config = RLConfig(**input_config)
write_config(config.model_config())

The error indicates that the model_config property does not exist in the RLConfig class. After checking the RLConfig class and its parent class, GlobalConfig, I confirmed that model_config is not defined. Instead, there is a property called model_bump.

To make it work, I modified the source code as follows:

  1. Replaced config.model_config() with config.model_bump.
  2. Removed the parentheses, as model_bump appears to be a dictionary and not callable.

After these changes, the code worked as expected. However, I would like to confirm:

  • Are these modifications correct, or is there another intended way to resolve this issue?

Thanks in advance for your clarification and support!

@halx
Copy link
Contributor

halx commented Nov 16, 2024

Hi,

many thanks for your interest in REINVENT and welcome to the community!

write_config() is called at four different places, the four runmodes, in version 4.4.22. In all cases the content of config.model_dump() is passed to the function. I do not know where you believe the line you quoted to be located in the code. It would also be good to provide actual error messages to be able to track down a problem.

model_config is a class attribute in GlobalConfig used to configure a pydantic BaseModel.

Many thanks,
Hannes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants