From 5fe83a9b09238201219b65df6b70ce074fed68eb Mon Sep 17 00:00:00 2001 From: jbloom-md Date: Tue, 2 Apr 2024 10:57:23 +0100 Subject: [PATCH] ignore type incorrectness in imported package --- sae_analysis/neuronpedia_runner.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sae_analysis/neuronpedia_runner.py b/sae_analysis/neuronpedia_runner.py index bed560e1..46f441a6 100644 --- a/sae_analysis/neuronpedia_runner.py +++ b/sae_analysis/neuronpedia_runner.py @@ -3,18 +3,17 @@ # set TOKENIZERS_PARALLELISM to false to avoid warnings os.environ["TOKENIZERS_PARALLELISM"] = "false" +import json import time +import numpy as np import torch +from matplotlib import colors from sae_vis.data_fetching_fns import get_feature_data from sae_vis.data_storing_fns import FeatureVisParams from tqdm import tqdm -import numpy as np from sae_training.utils import LMSparseAutoencoderSessionloader -import json - -from matplotlib import colors OUT_OF_RANGE_TOKEN = "<|outofrange|>" @@ -381,7 +380,7 @@ def run(self): posContribs.append(posContrib) negContrib = {} negTokens = [ - self.to_str_tokens_safe(vocab_dict, j) + self.to_str_tokens_safe(vocab_dict, j) # type: ignore for j in sd.bottom5_token_ids[i] ] if len(negTokens) > 0: