In addition, two comments I got during NeurIPS 2023 were:
analog.update is too vague in that it's unclear what we are updating with this.
Solution: I changed the name to analog.setup. This way, it's more explicit that we are setting the configuration for logging.
Currently, most our examples use analog as a name for the AnaLog instance, but this is confusing as our library name is also analog (we do import analog).
Solution: Inspired by wandb, we let users directly use analog after import by implementing basic (but most important) functionalities in __init__.py. With this, users can write their code as below:
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)
...
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.
Please refer to #65 for details.
In addition, two comments I got during NeurIPS 2023 were:
analog.update
is too vague in that it's unclear what we are updating with this.analog.setup
. This way, it's more explicit that we are setting the configuration for logging.analog
as a name for theAnaLog
instance, but this is confusing as our library name is alsoanalog
(we doimport analog
).wandb
, we let users directly useanalog
after import by implementing basic (but most important) functionalities in__init__.py
. With this, users can write their code as below: