logix-project / logix

AI Logging for Interpretability and Explainability🔬
Apache License 2.0
74 stars 6 forks source link

Improve `Config` and `Analysis` Interface #85

Closed sangkeun00 closed 7 months ago

sangkeun00 commented 7 months ago

I made two major changes for Config and Analysis.

Config

Previously, the Config implementation was based on a Python dictionary, which had two issues.

  1. Default value handling is trickier.
  2. config[key] is less intuitive than config.key.

Therefore, we re-implement Config using Python dataclass in this PR.

Analysis

Previously, we used to have AnalysisBase and subclass it for specific analyses like InfluenceFunction. However, we realized that, at the moment, we don't have many other analyses to support, making this subclassing strategy useless. Therefore, I just removed AnalysisBase and directly have InfluenceFunction as a member of AnaLog. Also, I implemented the front-end interface for members of InfluenceFunction in AnaLog, so users can use both:

Depending on the user's feedback, we may deprecate one in the future.

@levmckinney @hwijeen @eatpk

eatpk commented 7 months ago

I am still looking into this PR, one note is that this will give conflict with https://github.com/sangkeun00/analog/pull/78.................. 😭 One of us have to rebase..