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

Integrate scripts #7

Merged
merged 4 commits into from
Feb 20, 2024
Merged

Integrate scripts #7

merged 4 commits into from
Feb 20, 2024

Conversation

Xmaster6y
Copy link
Owner

No description provided.

@Xmaster6y Xmaster6y changed the title Integrate Scripts Integrate scripts Feb 19, 2024
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Type: Enhancement

PR Summary: This pull request introduces scripts for finding concepts in a model using Layer-wise Relevance Propagation (LRP) and a dataset of boards. It adds two main files: find_concepts.py and helpers.py under the src/lczerolens/xai directory. The find_concepts.py script is designed to identify and analyze concepts within a given model using a specific dataset, leveraging the LRP technique for interpretability. The helpers.py file provides support functionalities such as a dynamic sampler for data loading and a modified feature visualization class to aid in the analysis and visualization of the identified concepts.

Decision: Comment

📝 Type: 'Enhancement' - not supported yet.
  • Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
📝 Complexity: the changes are too large or complex for Sourcery to approve.
  • Unsupported files: the diff contains files that Sourcery does not currently support during reviews.

General suggestions:

  • Ensure that all new classes and methods have comprehensive docstrings to improve code readability and maintainability.
  • Consider implementing error handling and validation checks where assumptions about the input or the state of the system are made, to enhance the robustness of the scripts.
  • It might be beneficial to include unit tests for the new functionalities introduced in this pull request to ensure their correctness and prevent future regressions.
  • Review the use of type hints throughout the new code to ensure consistency and clarity, particularly in method signatures.

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

from zennit.composites import Composite, NameMapComposite


class DynamicSampler(Sampler[int]):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (llm): The DynamicSampler class is a good addition for flexibility in sampling indices. However, consider adding type hints for the set_indices method to maintain consistency and clarity in the codebase.

@Xmaster6y Xmaster6y merged commit 1e09c55 into main Feb 20, 2024
1 check passed
@Xmaster6y Xmaster6y deleted the scripts branch February 20, 2024 12:12
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.

None yet

1 participant