Skip to content

Fix superclass initialization across all classes in ragas.py #848

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

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

RishiSankineni
Copy link
Contributor

Previously, superclass initialization in multiple classes within ragas.py incorrectly used super.__init__(), resulting in a TypeError. This syntax has been corrected to super().__init__() to ensure proper execution of the superclass (BaseMetric)'s initialization before initializing class-specific attributes.

This change resolves the TypeError: descriptor '__init__' of 'super' object needs an argument encountered during initialization. It aligns with standard Python syntax for invoking superclass constructors, improving code readability and maintainability.

Fix superclass initialization across all classes.

Corrected superclass initialization in multiple classes within ragas.py. Previously, the initialization of the superclass (BaseMetric) used super.__init__(), which is incorrect syntax. Replaced it with super().__init__() to ensure proper execution of BaseMetric's initialization before initializing attributes specific to each class.
Copy link

vercel bot commented Jun 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
evals-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2024 10:09pm

@penguine-ip
Copy link
Contributor

@RishiSankineni tysm!

@penguine-ip penguine-ip merged commit 7d0f710 into confident-ai:main Jun 25, 2024
3 of 5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants