Skip to content

Bug: golden_run() modifies original model behavior, breaking observers and baselines #3

@bcarrpe

Description

@bcarrpe

fi_model.golden_run() produces different outputs than the original unwrapped model, causing incorrect observer metrics (RMSE, MAE, EqualRate) and baseline measurements.

To reproduce the issue:

import torch
from torchvision.models import vgg11, VGG11_Weights
from mrfi import MRFI, EasyConfig

model = vgg11(weights=VGG11_Weights.DEFAULT).eval()
x = torch.randn(1, 3, 224, 224)

# Original model output
y_original = model(x)

# MRFI golden run output
fi_model = MRFI(model, EasyConfig.load_preset('default_fi'))
with fi_model.golden_run():
    y_golden = fi_model(x)

# They should be identical but aren't
print(torch.abs(y_original - y_golden).max())  # Non-zero!

golden_run() disables fault injection but leaves model hooks active, intercepting and processing data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis is a feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions