Skip to content

Commit 374b868

Browse files
committed
improve messaging
1 parent 14acc2d commit 374b868

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tpcav/tpcav_model.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ def fit_pca(
9292
num_pc: Optional[Union[int, str]] = None,
9393
) -> Dict[str, torch.Tensor]:
9494
"""Sample activations, compute PCA, and attach buffers to the model."""
95+
logger.info("Start building PCA transformation.")
96+
9597
sampled_avs = []
9698
for concept in concepts:
9799
avs = self._sample_concept(concept, num_samples=num_samples_per_concept)
@@ -126,6 +128,8 @@ def fit_pca(
126128
self._set_buffer("orig_shape", torch.tensor(orig_shape).to(self.device))
127129
self.fitted = True
128130

131+
logger.info("PCA transformation built.")
132+
129133
return {
130134
"zscore_mean": mean,
131135
"zscore_std": std,

0 commit comments

Comments
 (0)