This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#%% | |
import torch as t | |
from embedding_lens.custom_tqdm import tqdm | |
from datetime import datetime | |
from auto_circuit.data import PromptDataLoader, PromptDataset | |
from auto_circuit.experiment_utils import load_tl_model | |
from auto_circuit.types import AblationType | |
from auto_circuit.utils.ablation_activations import src_ablations | |
from auto_circuit.utils.graph_utils import patch_mode, patchable_model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#%% | |
import torch as t | |
from embedding_lens.custom_tqdm import tqdm | |
from datetime import datetime | |
from auto_circuit.data import PromptDataLoader, PromptDataset | |
from auto_circuit.experiment_utils import load_tl_model | |
from auto_circuit.types import AblationType | |
from auto_circuit.utils.ablation_activations import src_ablations | |
from auto_circuit.utils.graph_utils import patch_mode, patchable_model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from flask import jsonify | |
from src.shared.aws_rds import rds_execute_sql as rds | |
from src.shared.constants import PAYMENT_RATE_LIMIT, PAYMENT_RATE_INTERVAL | |
from src.shared.utils import LimitedSizeDict | |
create_payment_rates = LimitedSizeDict(1000) | |
block_accounts_cache = LimitedSizeDict(1000) |