logix-project / logix

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

Major refactoring for logging #67

Closed sangkeun00 closed 8 months ago

sangkeun00 commented 8 months ago

Please refer to #65 for details.

In addition, two comments I got during NeurIPS 2023 were:

import analog
from analog.analysis import InfluenceFunction

analog.init(project, config)
analog.watch(model)

for inputs, labels in data_loader:
    model.zero_grad()
    outs = model(inputs)
    loss = loss_fn(outs, labels)
    loss.backward()
    analog.log(data_id)

if_computer = analog.add_analysis(InfluenceFunction)
...
sangkeun00 commented 8 months ago

While there can be some additional bugs in the refactored code, I was able to run major features without any errors. Therefore, I am merging this PR for now.