Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dilyabareeva committed May 31, 2024
1 parent 1eb46c6 commit 797efc4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/metrics/randomization/model_randomization.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __init__(
explain_fn_kwargs: Optional[dict] = None,
correlation_fn: Union[Callable, CorrelationFnLiterals] = "spearman",
seed: int = 42,
model_id: str = "0",
cache_dir: str = "./cache",
device: str = "cpu" if torch.cuda.is_available() else "cuda",
*args,
Expand All @@ -39,6 +40,7 @@ def __init__(
self.train_dataset = train_dataset
self.explain_fn_kwargs = explain_fn_kwargs
self.seed = seed
self.model_id = model_id
self.cache_dir = cache_dir
self.device = device

Expand Down Expand Up @@ -69,7 +71,7 @@ def update(
):
rand_explanations = self.explain_fn(
model=self.rand_model,
model_id="0",
model_id=self.model_id,
cache_dir=self.cache_dir,
train_dataset=self.train_dataset,
test_tensor=test_data,
Expand Down

0 comments on commit 797efc4

Please sign in to comment.