SYMBOL INDEX (773 symbols across 91 files) FILE: core/client.py class Client (line 49) | class Client: method __init__ (line 54) | def __init__(self, client_id, config, send_gradients): method get_client_data (line 70) | def get_client_data(self, dataset=None): method get_train_dataset (line 77) | def get_train_dataset(data_path, client_train_config, task): method get_data (line 102) | def get_data(clients, dataset): method run_testvalidate (line 127) | def run_testvalidate(client_data, server_data, mode, model): method process_round (line 227) | def process_round(client_data, server_data, model, data_path, eps=1e-7): FILE: core/config.py function from_dict (line 32) | def from_dict(cls, config): class Config (line 39) | class Config(MutableMapping): method get (line 41) | def get(self, k: str, default=None): method lookup (line 47) | def lookup(self, s: str, default=None): method __getitem__ (line 57) | def __getitem__(self, k): method __setitem__ (line 60) | def __setitem__(self, k, v): method __delitem__ (line 63) | def __delitem__(self, k): method __iter__ (line 66) | def __iter__(self): method __len__ (line 69) | def __len__(self): method __contains__ (line 72) | def __contains__(self, k): method pop (line 75) | def pop(self, k, default=None): class ModelConfig (line 83) | class ModelConfig(Config): method from_dict (line 101) | def from_dict(config) -> ModelConfig: class BERTModelConfig (line 120) | class BERTModelConfig(Config): method from_dict (line 158) | def from_dict(config) -> BERTModelConfig: class BERTTrainingConfig (line 163) | class BERTTrainingConfig(Config): method from_dict (line 183) | def from_dict(config) -> BERTTrainingConfig: class BERTConfig (line 188) | class BERTConfig(Config): method from_dict (line 204) | def from_dict(config) -> BERTConfig: class PrivacyConfig (line 217) | class PrivacyConfig(Config): method from_dict (line 279) | def from_dict(config) -> PrivacyConfig: class PrivacyMetricsConfig (line 284) | class PrivacyMetricsConfig(Config): method from_dict (line 318) | def from_dict(config) -> PrivacyMetricsConfig: class OptimizerConfig (line 330) | class OptimizerConfig(Config): method from_dict (line 345) | def from_dict(config) -> OptimizerConfig: class AnnealingConfig (line 355) | class AnnealingConfig(Config): method from_dict (line 374) | def from_dict(config) -> AnnealingConfig: class DatasetConfig (line 379) | class DatasetConfig(Config): method from_dict (line 422) | def from_dict(config) -> DatasetConfig: class DataConfig (line 427) | class DataConfig(Config): method from_dict (line 447) | def from_dict(config) -> DataConfig: class ServerReplayConfig (line 458) | class ServerReplayConfig(Config): method from_dict (line 473) | def from_dict(config) -> ServerReplayConfig: class RLConfig (line 482) | class RLConfig(Config): method from_dict (line 531) | def from_dict(config) -> RLConfig: class ServerConfig (line 544) | class ServerConfig(Config): method from_dict (line 626) | def from_dict(config) -> ServerConfig: class ClientConfig (line 651) | class ClientConfig(Config): method from_dict (line 693) | def from_dict(config) -> ClientConfig: class FLUTEConfig (line 713) | class FLUTEConfig(Config): method validate (line 736) | def validate(config): method from_dict (line 763) | def from_dict(config) -> FLUTEConfig: FILE: core/dataloader.py class BaseDataLoader (line 7) | class BaseDataLoader(ABC, PyTorchDataLoader): method create_loader (line 10) | def create_loader(self): FILE: core/dataset.py class BaseDataset (line 7) | class BaseDataset(ABC, PyTorchDataset): method __init__ (line 11) | def __init__(self,**kwargs): method __getitem__ (line 15) | def __getitem__(self, idx, **kwargs): method __len__ (line 20) | def __len__(self): method load_data (line 25) | def load_data(self,**kwargs): FILE: core/evaluation.py class Evaluation (line 21) | class Evaluation(): method __init__ (line 23) | def __init__(self, config, model_path, process_testvalidate, idx_val_c... method run (line 35) | def run(self, eval_list, req, metric_logger=None): method initialize_req (line 113) | def initialize_req(self, req): method run_distributed_inference (line 128) | def run_distributed_inference(self, mode, model): method run_distributed_evaluation (line 146) | def run_distributed_evaluation(self, mode, clients, model): function make_eval_clients (line 185) | def make_eval_clients(dataset, config): FILE: core/federated.py function encode_string (line 27) | def encode_string(word, string_to_int = True): function rank (line 45) | def rank(): function local_rank (line 49) | def local_rank(): function size (line 53) | def size(): function _recv (line 57) | def _recv(x, src=0): function _recv_gradients (line 71) | def _recv_gradients(src): function _send (line 89) | def _send(x, dst=0): function _send_metrics (line 98) | def _send_metrics(output): function _send_gradients (line 112) | def _send_gradients(gradients, dst): function _send_train_output (line 126) | def _send_train_output(output): function build_grads_dict (line 147) | def build_grads_dict(node): function build_metrics_dict (line 190) | def build_metrics_dict(node): function receive_workers_output (line 216) | def receive_workers_output(node_request_map, results_list, free_nodes, c... function append_async_requests (line 242) | def append_async_requests(node_request_map, node): function sync_idle_nodes (line 251) | def sync_idle_nodes(client_queue, free_nodes): class Server (line 264) | class Server: method dispatch_clients (line 282) | def dispatch_clients(clients, server_data, command, mode=None, do_prof... method process_clients (line 413) | def process_clients(clients, server_data, single_worker): method process_testvalidate (line 427) | def process_testvalidate(clients, server_data, mode, single_worker): method terminate_workers (line 443) | def terminate_workers(terminate=True): class Worker (line 451) | class Worker: method __init__ (line 470) | def __init__(self, model=None, data_path=None, do_profiling=False, val... method run (line 482) | def run(self): method trigger_evaluate (line 634) | def trigger_evaluate(self): method trigger_train (line 660) | def trigger_train(self): FILE: core/metrics.py class Metrics (line 14) | class Metrics(): method __init__ (line 16) | def __init__(self): method compute_metrics (line 19) | def compute_metrics(self,dataloader, model): method call_inference (line 29) | def call_inference(self, dataloader, model): FILE: core/model.py class BaseModel (line 7) | class BaseModel(ABC, T.nn.Module): method __init__ (line 11) | def __init__(self,**kwargs): method loss (line 15) | def loss(self, input): method inference (line 24) | def inference(self, input): method set_eval (line 45) | def set_eval(self): method set_train (line 49) | def set_train(self): FILE: core/server.py class OptimizationServer (line 47) | class OptimizationServer(federated.Server): method __init__ (line 48) | def __init__(self, num_clients, model, optimizer, ss_scheduler, data_p... method load_saved_status (line 183) | def load_saved_status(self): method run (line 206) | def run(self): method train (line 215) | def train(self): method backup_models (line 530) | def backup_models(self, i): method fall_back_to_prev_best_status (line 561) | def fall_back_to_prev_best_status(self): function select_server (line 581) | def select_server(server_type): FILE: core/strategies/__init__.py function select_strategy (line 9) | def select_strategy(strategy): FILE: core/strategies/base.py class BaseStrategy (line 8) | class BaseStrategy: method __init__ (line 9) | def __init__(self, mode, config, model_path=None): method generate_client_payload (line 20) | def generate_client_payload(self, trainer): method process_individual_payload (line 31) | def process_individual_payload(self, worker_trainer, payload): method combine_payloads (line 45) | def combine_payloads(self, worker_trainer, curr_iter, num_clients_curr... FILE: core/strategies/dga.py class DGA (line 27) | class DGA(BaseStrategy): method __init__ (line 30) | def __init__(self, mode, config, model_path=None): method generate_client_payload (line 88) | def generate_client_payload(self, trainer): method process_individual_payload (line 157) | def process_individual_payload(self, worker_trainer, payload): method combine_payloads (line 183) | def combine_payloads(self, worker_trainer, curr_iter, num_clients_curr... method _aggregate_gradients (line 243) | def _aggregate_gradients(self, worker_trainer, num_clients_curr_iter, ... method _run_rl_inference (line 286) | def _run_rl_inference(self, client_weights, client_mag_grads, client_m... method _run_rl_training (line 348) | def _run_rl_training(self, iter, rl_model, client_weights, client_mag_... FILE: core/strategies/fedavg.py class FedAvg (line 20) | class FedAvg(BaseStrategy): method __init__ (line 23) | def __init__(self, mode, config, model_path=None): method generate_client_payload (line 61) | def generate_client_payload(self, trainer): method process_individual_payload (line 93) | def process_individual_payload(self, worker_trainer, payload): method combine_payloads (line 119) | def combine_payloads(self, worker_trainer, curr_iter, num_clients_curr... method _aggregate_gradients (line 168) | def _aggregate_gradients(self, worker_trainer, num_clients_curr_iter, ... FILE: core/strategies/fedlabels.py class FedLabels (line 20) | class FedLabels(BaseStrategy): method __init__ (line 23) | def __init__(self, mode, config, model_path=None): method generate_client_payload (line 60) | def generate_client_payload(self, trainer): method process_individual_payload (line 94) | def process_individual_payload(self, worker_trainer, payload): method combine_payloads (line 120) | def combine_payloads(self, worker_trainer, curr_iter, num_clients_curr... method _aggregate_gradients (line 170) | def _aggregate_gradients(self, worker_trainer, num_clients_curr_iter, ... function aggregate_gradients_inplace (line 218) | def aggregate_gradients_inplace(keys, values, first, tmp, ratio): FILE: core/strategies/utils.py function filter_weight (line 11) | def filter_weight(weight): function aggregate_gradients_inplace (line 21) | def aggregate_gradients_inplace(model, gradients): FILE: core/trainer.py class TrainerBase (line 30) | class TrainerBase: method __init__ (line 47) | def __init__( method epoch_boundary (line 68) | def epoch_boundary(self): method train_desired_samples (line 72) | def train_desired_samples(self, desired_max_samples, apply_privacy_met... method save (line 75) | def save(self): method load (line 78) | def load(self): class ModelUpdater (line 82) | class ModelUpdater(TrainerBase): method __init__ (line 101) | def __init__( method update_model (line 127) | def update_model(self): method run_lr_scheduler (line 139) | def run_lr_scheduler(self, force_run_val=False): method run_ss_scheduler (line 157) | def run_ss_scheduler(self): method save (line 163) | def save(self, model_path, token=None, config=None): method load (line 176) | def load(self, save_path, update_lr_scheduler, update_ss_scheduler): class Trainer (line 200) | class Trainer(TrainerBase): method __init__ (line 223) | def __init__( method reset_gradient_power (line 263) | def reset_gradient_power(self): method accumulate_gradient_power (line 271) | def accumulate_gradient_power(self): method estimate_sufficient_stats (line 294) | def estimate_sufficient_stats(self): method train_desired_samples (line 314) | def train_desired_samples(self, desired_max_samples=None, apply_privac... method run_train_epoch (line 341) | def run_train_epoch(self, desired_max_samples=None, apply_privacy_metr... method run_train_epoch_fedprox (line 416) | def run_train_epoch_fedprox(self, desired_max_samples=None, apply_priv... method run_train_epoch_sup (line 503) | def run_train_epoch_sup(self, desired_max_samples=None, apply_privacy_... method get_model (line 621) | def get_model(self): method prepare_iteration (line 624) | def prepare_iteration(self, model=None): method reset_optimizer (line 640) | def reset_optimizer(self, optimizer_state_dict, annealing_config=None): method save (line 653) | def save(self, model_path, token=None, config=None): method load (line 666) | def load(self, save_path, update_lr_scheduler, update_ss_scheduler): function run_validation_generic (line 690) | def run_validation_generic(model, val_dataloader): function set_component_wise_lr (line 725) | def set_component_wise_lr(model, optimizer_config, updatable_names): function save_model (line 753) | def save_model(model_path, config, model, optimizer, lr_scheduler, ss_sc... FILE: e2e_trainer.py function log_run_properties (line 40) | def log_run_properties(config: FLUTEConfig): function run_worker (line 77) | def run_worker(model_path, config, task, data_path, local_rank, backend): FILE: experiments/__init__.py function make_model (line 8) | def make_model(model_config, dataloader_type=None, input_dim=-1, output_... FILE: experiments/classif_cnn/dataloaders/cifar_dataset.py class CIFAR10 (line 7) | class CIFAR10: method __init__ (line 8) | def __init__(self) : function _process (line 26) | def _process(dataset, n_users): FILE: experiments/classif_cnn/dataloaders/dataloader.py class DataLoader (line 9) | class DataLoader(BaseDataLoader): method __init__ (line 10) | def __init__(self, mode, num_workers=0, **kwargs): method collate_fn (line 28) | def collate_fn(self, batch): FILE: experiments/classif_cnn/dataloaders/dataset.py class Dataset (line 8) | class Dataset(BaseDataset): method __init__ (line 9) | def __init__(self, data, test_only=False, user_idx=0, **kwargs): method __getitem__ (line 28) | def __getitem__(self, idx): method __len__ (line 31) | def __len__(self): method load_data (line 34) | def load_data(self, data, test_only): FILE: experiments/classif_cnn/model.py class Net (line 11) | class Net(nn.Module): method __init__ (line 14) | def __init__(self): method forward (line 23) | def forward(self, x): class CNN (line 33) | class CNN(BaseModel): method __init__ (line 36) | def __init__(self, model_config): method loss (line 40) | def loss(self, input: torch.Tensor) -> torch.Tensor: method inference (line 47) | def inference(self, input): FILE: experiments/classif_cnn/utils/centralized_training.py class Net (line 43) | class Net(nn.Module): method __init__ (line 44) | def __init__(self): method forward (line 53) | def forward(self, x): FILE: experiments/classif_cnn/utils/download_and_convert_data.py function _dump_dict_to_hdf5 (line 10) | def _dump_dict_to_hdf5(data_dict: dict, hdf5_file: h5py.File): function _process_and_save_to_disk (line 26) | def _process_and_save_to_disk(dataset, n_users, file_format, output): FILE: experiments/cv/data.py class DataPartitioner (line 16) | class DataPartitioner(object): method __init__ (line 19) | def __init__(self, data, sizes=None, rnd=0, alpha=0, num_c=10, method get_lab_distr (line 35) | def get_lab_distr(self): method return_partition (line 39) | def return_partition(self, partition, flag='data', is_train_set=True): method __use_fixed_lab_distr__ (line 67) | def __use_fixed_lab_distr__(self, data, lab_distr, ratio, rnd, num_c): method __getDirichletData__ (line 119) | def __getDirichletData__(self, data, psizes, alpha, num_c, rnd): function partition_dataset (line 174) | def partition_dataset(rnd, img_size, image, total_num_clients, image_pat... function prepare_dataset (line 232) | def prepare_dataset(rnd=2020, img_size=40, image='cifar', total_num_clie... function _dump_dict_to_hdf5 (line 253) | def _dump_dict_to_hdf5(data_dict: dict, hdf5_file: h5py.File): function _process_and_save_to_disk (line 270) | def _process_and_save_to_disk(dataset, save_to_disk, file_format, output... function get_transform (line 305) | def get_transform(transform, img_size=32): FILE: experiments/cv/dataloaders/dataloader.py class DataLoader (line 10) | class DataLoader(BaseDataLoader): method __init__ (line 11) | def __init__(self, mode, num_workers=0, **kwargs): method collate_fn (line 29) | def collate_fn(self, batch): FILE: experiments/cv/dataloaders/dataset.py class Dataset (line 9) | class Dataset(BaseDataset): method __init__ (line 10) | def __init__(self, data, test_only=False, user_idx=0, **kwargs): method __getitem__ (line 30) | def __getitem__(self, idx): method __len__ (line 33) | def __len__(self): method load_data (line 36) | def load_data(self, data, test_only): FILE: experiments/cv/model.py function conv3x3 (line 40) | def conv3x3(in_planes: int, out_planes: int, stride: int = 1, groups: in... function conv1x1 (line 46) | def conv1x1(in_planes: int, out_planes: int, stride: int = 1) -> nn.Conv2d: class BasicBlock (line 51) | class BasicBlock(nn.Module): method __init__ (line 54) | def __init__( method forward (line 82) | def forward(self, x: Tensor) -> Tensor: class Bottleneck (line 101) | class Bottleneck(nn.Module): method __init__ (line 110) | def __init__( method forward (line 137) | def forward(self, x: Tensor) -> Tensor: class ResNet (line 160) | class ResNet(BaseModel): method __init__ (line 161) | def __init__( method _make_layer (line 217) | def _make_layer(self, block: Type[Union[BasicBlock, Bottleneck]], plan... method forward (line 242) | def forward(self, inputs): method get_logit (line 262) | def get_logit(self, x = None, evalis = True, logmax=False): method inference (line 288) | def inference(self, inputs): method loss (line 305) | def loss(self, inputs): method copy_state_dict (line 316) | def copy_state_dict(self, state_dict): method get_model (line 320) | def get_model(self): function _resnet (line 324) | def _resnet( function resnet18 (line 344) | def resnet18(config, pretrained: bool = False, progress: bool = True, **... function resnet34 (line 359) | def resnet34(config, pretrained: bool = False, progress: bool = True, **... function resnet50 (line 374) | def resnet50(config, pretrained: bool = False, progress: bool = True, **... function resnet101 (line 389) | def resnet101(config, pretrained: bool = False, progress: bool = True, *... function resnet152 (line 403) | def resnet152(config, pretrained: bool = False, progress: bool = True, *... function resnext50_32x4d (line 418) | def resnext50_32x4d(config, pretrained: bool = False, progress: bool = T... function resnext101_32x8d (line 435) | def resnext101_32x8d(config, pretrained: bool = False, progress: bool = ... function wide_resnet50_2 (line 452) | def wide_resnet50_2(config, pretrained: bool = False, progress: bool = T... function wide_resnet101_2 (line 473) | def wide_resnet101_2(config, pretrained: bool = False, progress: bool = ... FILE: experiments/cv/model_vgg.py class VGG (line 23) | class VGG(nn.Module): method __init__ (line 27) | def __init__(self, vgg, num_class, topK_results=None): method forward (line 49) | def forward(self, inputs): method loss (line 57) | def loss(self, inputs): method inference (line 66) | def inference(self, inputs): method get_logit (line 81) | def get_logit(self, inputs = None, evalis = True, logmax=False): method copy_state_dict (line 106) | def copy_state_dict(self, state_dict): method set_eval (line 109) | def set_eval(self): method set_train (line 115) | def set_train(self): function make_layers (line 122) | def make_layers(cfg, n_channels=3, batch_norm=True): function vgg11 (line 147) | def vgg11(config): function vgg11_bn (line 153) | def vgg11_bn(config): function vgg13 (line 159) | def vgg13(config): function vgg13_bn (line 165) | def vgg13_bn(config): function vgg16 (line 171) | def vgg16(config): function vgg16_bn (line 177) | def vgg16_bn(config): function vgg19 (line 183) | def vgg19(config): function vgg19_bn (line 189) | def vgg19_bn(config): FILE: experiments/cv/server.py class PersonalizationServer (line 9) | class PersonalizationServer(OptimizationServer): method __init__ (line 10) | def __init__(self, num_clients, model, optimizer, ss_scheduler, data_p... FILE: experiments/cv_cnn_femnist/dataloaders/dataloader.py class DataLoader (line 10) | class DataLoader(BaseDataLoader): method __init__ (line 11) | def __init__(self, mode, num_workers=0, **kwargs): method collate_fn (line 29) | def collate_fn(self, batch): FILE: experiments/cv_cnn_femnist/dataloaders/dataset.py class Dataset (line 8) | class Dataset(BaseDataset): method __init__ (line 9) | def __init__(self, data, test_only=False, user_idx=0, **kwargs): method __getitem__ (line 33) | def __getitem__(self, idx): method __len__ (line 36) | def __len__(self): method load_data (line 39) | def load_data(self, data, test_only): FILE: experiments/cv_cnn_femnist/dataloaders/preprocess.py class FEMNIST (line 19) | class FEMNIST: method __init__ (line 20) | def __init__(self) : function download_files (line 45) | def download_files(data_cache_dir): FILE: experiments/cv_cnn_femnist/model.py class CNN_DropOut (line 12) | class CNN_DropOut(torch.nn.Module): method __init__ (line 53) | def __init__(self, only_digits=True): method forward (line 66) | def forward(self, x): class CNN (line 82) | class CNN(BaseModel): method __init__ (line 85) | def __init__(self, model_config): method loss (line 89) | def loss(self, input: torch.Tensor) -> torch.Tensor: method inference (line 97) | def inference(self, input): FILE: experiments/cv_lr_mnist/dataloaders/dataloader.py class DataLoader (line 10) | class DataLoader(BaseDataLoader): method __init__ (line 11) | def __init__(self, mode, num_workers=0, **kwargs): method collate_fn (line 29) | def collate_fn(self, batch): FILE: experiments/cv_lr_mnist/dataloaders/dataset.py class Dataset (line 8) | class Dataset(BaseDataset): method __init__ (line 9) | def __init__(self, data, test_only=False, user_idx=0, **kwargs): method __getitem__ (line 34) | def __getitem__(self, idx): method __len__ (line 37) | def __len__(self): method load_data (line 40) | def load_data(self, data, test_only): FILE: experiments/cv_lr_mnist/dataloaders/preprocessing.py class MNIST (line 19) | class MNIST: method __init__ (line 20) | def __init__(self) : function download_mnist (line 29) | def download_mnist(data_cache_dir): function read_data (line 42) | def read_data(train_data_dir, test_data_dir): FILE: experiments/cv_lr_mnist/model.py class LogisticRegression (line 12) | class LogisticRegression(torch.nn.Module): method __init__ (line 13) | def __init__(self, input_dim, output_dim): method forward (line 17) | def forward(self, x): class LR (line 23) | class LR(BaseModel): method __init__ (line 26) | def __init__(self, model_config): method loss (line 30) | def loss(self, input: torch.Tensor) -> torch.Tensor: method inference (line 38) | def inference(self, input): FILE: experiments/cv_resnet_fedcifar100/dataloaders/dataloader.py class DataLoader (line 10) | class DataLoader(BaseDataLoader): method __init__ (line 11) | def __init__(self, mode, num_workers=0, **kwargs): method collate_fn (line 29) | def collate_fn(self, batch): FILE: experiments/cv_resnet_fedcifar100/dataloaders/dataset.py class Dataset (line 8) | class Dataset(BaseDataset): method __init__ (line 9) | def __init__(self, data, test_only=False, user_idx=0, **kwargs): method __getitem__ (line 33) | def __getitem__(self, idx): method __len__ (line 36) | def __len__(self): method load_data (line 39) | def load_data(self, data, test_only): FILE: experiments/cv_resnet_fedcifar100/dataloaders/preprocessing.py class FEDCIFAR100 (line 20) | class FEDCIFAR100: method __init__ (line 21) | def __init__(self) : function download_files (line 46) | def download_files(data_cache_dir): FILE: experiments/cv_resnet_fedcifar100/group_normalization.py function group_norm (line 10) | def group_norm( class _GroupNorm (line 99) | class _GroupNorm(_BatchNorm): method __init__ (line 100) | def __init__( method _check_input_dim (line 115) | def _check_input_dim(self, input): method forward (line 118) | def forward(self, input): class GroupNorm2d (line 134) | class GroupNorm2d(_GroupNorm): method _check_input_dim (line 163) | def _check_input_dim(self, input): class GroupNorm3d (line 168) | class GroupNorm3d(_GroupNorm): method _check_input_dim (line 173) | def _check_input_dim(self, input): FILE: experiments/cv_resnet_fedcifar100/model.py function conv3x3 (line 26) | def conv3x3(in_planes, out_planes, stride=1): function norm2d (line 33) | def norm2d(planes, num_channels_per_group=32): class BasicBlock (line 43) | class BasicBlock(nn.Module): method __init__ (line 46) | def __init__(self, inplanes, planes, stride=1, downsample=None, group_... method forward (line 56) | def forward(self, x): class Bottleneck (line 75) | class Bottleneck(nn.Module): method __init__ (line 78) | def __init__(self, inplanes, planes, stride=1, downsample=None, group_... method forward (line 92) | def forward(self, x): class ResNet (line 115) | class ResNet(nn.Module): method __init__ (line 116) | def __init__(self, block, layers, num_classes=1000, group_norm=0): method _make_layer (line 154) | def _make_layer(self, block, planes, blocks, stride=1, group_norm=0): method forward (line 176) | def forward(self, x): function resnet18 (line 194) | def resnet18(pretrained=False, **kwargs): function resnet34 (line 205) | def resnet34(pretrained=False, **kwargs): function resnet50 (line 216) | def resnet50(pretrained=False, **kwargs): function resnet101 (line 227) | def resnet101(pretrained=False, **kwargs): function resnet152 (line 238) | def resnet152(pretrained=False, **kwargs): class RESNET (line 248) | class RESNET(BaseModel): method __init__ (line 251) | def __init__(self, model_config): method loss (line 255) | def loss(self, input: torch.Tensor) -> torch.Tensor: method inference (line 263) | def inference(self, input): FILE: experiments/ecg_cnn/dataloaders/dataloader.py class DataLoader (line 9) | class DataLoader(BaseDataLoader): method __init__ (line 10) | def __init__(self, mode, num_workers=0, **kwargs): method collate_fn (line 29) | def collate_fn(self, batch): FILE: experiments/ecg_cnn/dataloaders/dataset.py class Dataset (line 9) | class Dataset(BaseDataset): method __init__ (line 10) | def __init__(self, data, test_only=False, user_idx=0, **kwargs): method __getitem__ (line 29) | def __getitem__(self, idx): method __len__ (line 33) | def __len__(self): method load_data (line 36) | def load_data(self,data): FILE: experiments/ecg_cnn/model.py class Swish (line 15) | class Swish(nn.Module): method forward (line 16) | def forward(self, x): class ConvNormPool (line 19) | class ConvNormPool(nn.Module): method __init__ (line 21) | def __init__( method forward (line 69) | def forward(self, input): class RNN (line 88) | class RNN(nn.Module): method __init__ (line 90) | def __init__( method forward (line 108) | def forward(self, input): class Net (line 112) | class Net(nn.Module): method __init__ (line 113) | def __init__( method forward (line 140) | def forward(self, input): class SuperNet (line 153) | class SuperNet(BaseModel): method __init__ (line 155) | def __init__(self, model_config): method loss (line 159) | def loss(self, input: torch.Tensor): method inference (line 165) | def inference(self, input): FILE: experiments/ecg_cnn/utils/preprocess.py function _dump_dict_to_hdf5 (line 11) | def _dump_dict_to_hdf5(data_dict: dict, hdf5_file: h5py.File): function _process_and_save_to_disk (line 27) | def _process_and_save_to_disk(dataset, n_users, output): class HeartDataSet (line 58) | class HeartDataSet: method __init__ (line 59) | def __init__(self, heartdata, cutoff): method __len__ (line 63) | def __len__(self): function resampleSet (line 69) | def resampleSet(train_df): FILE: experiments/fednewsrec/dataloaders/dataloader.py class DataLoader (line 9) | class DataLoader(BaseDataLoader): method __init__ (line 10) | def __init__(self, mode, num_workers=0, **kwargs): method collate_fn (line 29) | def collate_fn(self, batch): FILE: experiments/fednewsrec/dataloaders/dataset.py class Dataset (line 9) | class Dataset(BaseDataset): method __init__ (line 10) | def __init__(self, data, test_only=False, user_idx=0, **kwargs): method __getitem__ (line 32) | def __getitem__(self, idx): method __len__ (line 35) | def __len__(self): method load_data (line 38) | def load_data(self, data, test_only): FILE: experiments/fednewsrec/dataloaders/preprocess_mind.py class MIND (line 16) | class MIND: method __init__ (line 17) | def __init__(self, root_data_path, embedding_path) : function GetUserDataFunc (line 64) | def GetUserDataFunc(news_title,train_user_id_sample,train_user,train_ses... function newsample (line 81) | def newsample(nnn,ratio): function read_news (line 87) | def read_news(root_data_path,modes): function get_doc_input (line 130) | def get_doc_input(news,news_index,category,subcategory,word_dict): function load_matrix (line 146) | def load_matrix(embedding_path,word_dict): function read_clickhistory (line 164) | def read_clickhistory(root_data_path,mode): function parse_user (line 193) | def parse_user(session,news_index): function get_train_input (line 211) | def get_train_input(session,uid_click_talbe,news_index): function get_test_input (line 250) | def get_test_input(session,news_index): FILE: experiments/fednewsrec/fednewsrec_model.py class AttentivePooling (line 12) | class AttentivePooling(nn.Module): method __init__ (line 13) | def __init__(self, dim1: int, dim2: int): method forward (line 25) | def forward(self, x): method fromTensorFlow (line 33) | def fromTensorFlow(self, tfmodel): class Attention (line 44) | class Attention(nn.Module): method __init__ (line 46) | def __init__(self, input_dim, nb_head, size_per_head, **kwargs): method fromTensorFlow (line 63) | def fromTensorFlow(self, tf, criteria = lambda l: l.name.startswith('a... method forward (line 74) | def forward(self, x): class Permute (line 113) | class Permute(nn.Module): method __init__ (line 114) | def __init__(self, *dims): method forward (line 118) | def forward(self, x): class SwapTrailingAxes (line 121) | class SwapTrailingAxes(nn.Module): method __init__ (line 122) | def __init__(self): method forward (line 125) | def forward(self, x): class DocEncoder (line 128) | class DocEncoder(nn.Module): method __init__ (line 129) | def __init__(self): method fromTensorFlow (line 153) | def fromTensorFlow(self, tfDoc): method forward (line 189) | def forward(self, x): class VecTail (line 200) | class VecTail(nn.Module): method __init__ (line 201) | def __init__(self, n): method forward (line 205) | def forward(self, x): class UserEncoder (line 208) | class UserEncoder(nn.Module): method __init__ (line 209) | def __init__(self): method forward (line 227) | def forward(self, news_vecs_input): method fromTensorFlow (line 257) | def fromTensorFlow(self, tfU): class TimeDistributed (line 284) | class TimeDistributed(nn.Module): method __init__ (line 285) | def __init__(self, module): #, batch_first=False): method forward (line 290) | def forward(self, x): class FedNewsRec (line 315) | class FedNewsRec(nn.Module): method __init__ (line 316) | def __init__(self, title_word_embedding_matrix): method forward (line 329) | def forward(self, click_title, can_title): method news_encoder (line 358) | def news_encoder(self, news_title): FILE: experiments/fednewsrec/model.py class FEDNEWS (line 19) | class FEDNEWS(BaseModel): method __init__ (line 22) | def __init__(self, model_config): method loss (line 32) | def loss(self, input: torch.Tensor) -> torch.Tensor: method inference (line 47) | def inference(self, input): method read_news (line 71) | def read_news(self, root_data_path, modes): method load_matrix (line 114) | def load_matrix(self, embedding_path,word_dict): FILE: experiments/fednewsrec/utils.py function mrr_score (line 3) | def mrr_score(y_true, y_score): function ndcg_score (line 9) | def ndcg_score(y_true, y_score, k=10): function dcg_score (line 14) | def dcg_score(y_true, y_score, k=10): FILE: experiments/mlm_bert/config.py class BERTModelConfig (line 9) | class BERTModelConfig(Config): method from_dict (line 47) | def from_dict(config) -> BERTModelConfig: class BERTTrainingConfig (line 52) | class BERTTrainingConfig(Config): method from_dict (line 72) | def from_dict(config) -> BERTTrainingConfig: class BERTSpecificConfig (line 77) | class BERTSpecificConfig(Config): method from_dict (line 93) | def from_dict(config) -> BERTSpecificConfig: class BERTConfig (line 106) | class BERTConfig(ModelConfig): method from_dict (line 113) | def from_dict(config) -> ModelConfig: FILE: experiments/mlm_bert/dataloaders/dataloader.py class DataLoader (line 13) | class DataLoader(BaseDataLoader): method __init__ (line 18) | def __init__(self, mode, data, num_workers=0, **kwargs): method get_user (line 93) | def get_user(self): FILE: experiments/mlm_bert/dataloaders/dataset.py class Dataset (line 11) | class Dataset(BaseDataset): method __init__ (line 16) | def __init__(self, data, args, tokenizer=None, test_only=False, user_i... method __len__ (line 66) | def __len__(self): method __getitem__ (line 69) | def __getitem__(self, idx): method load_data (line 86) | def load_data(self, orig_strct, user_idx): method process_x (line 107) | def process_x(self, raw_x_batch): method process_user (line 122) | def process_user(self, user, user_data): method post_process_list (line 142) | def post_process_list(self): function LineByLineTextDataset (line 204) | def LineByLineTextDataset(tokenizer, input_lines, truncation=True, max_l... FILE: experiments/mlm_bert/model.py class BERT (line 39) | class BERT(BaseModel): method __init__ (line 40) | def __init__(self, model_config, **kwargs): method copy_state_dict (line 151) | def copy_state_dict(self, state_dict): method get_model (line 154) | def get_model(self): method _prepare_inputs (line 158) | def _prepare_inputs(self, inputs): method forward (line 172) | def forward(self, inputs): method loss (line 177) | def loss(self, inputs): method compute_loss (line 199) | def compute_loss(self, inputs_orig, return_outputs=False): method inference (line 243) | def inference( method prediction_loop (line 282) | def prediction_loop( method _gather_and_numpify (line 369) | def _gather_and_numpify(self, tensors, name): method prediction_step (line 379) | def prediction_step( method floating_point_ops (line 444) | def floating_point_ops(self, inputs): method set_eval (line 462) | def set_eval(self): method set_train (line 469) | def set_train(self): FILE: experiments/mlm_bert/utils/trainer_pt_utils.py function torch_pad_and_concatenate (line 47) | def torch_pad_and_concatenate(tensor1, tensor2, padding_index=-100): function numpy_pad_and_concatenate (line 62) | def numpy_pad_and_concatenate(array1, array2, padding_index=-100): function nested_concat (line 77) | def nested_concat(tensors, new_tensors, padding_index=-100): function nested_numpify (line 95) | def nested_numpify(tensors): function nested_detach (line 102) | def nested_detach(tensors): function reissue_pt_warnings (line 111) | def reissue_pt_warnings(caught_warnings): function nested_new_like (line 121) | def nested_new_like(arrays, num_samples, padding_index=-100): function nested_expand_like (line 128) | def nested_expand_like(arrays, new_seq_length, padding_index=-100): function nested_truncate (line 138) | def nested_truncate(tensors, limit): function _get_first_shape (line 145) | def _get_first_shape(arrays): class DistributedTensorGatherer (line 152) | class DistributedTensorGatherer: method __init__ (line 186) | def __init__(self, world_size, num_samples, make_multiple_of=None, pad... method add_arrays (line 196) | def add_arrays(self, arrays): method _nested_set_tensors (line 216) | def _nested_set_tensors(self, storage, arrays): method finalize (line 235) | def finalize(self): class LabelSmoother (line 248) | class LabelSmoother: method __call__ (line 261) | def __call__(self, model_output, labels): function get_length_grouped_indices (line 284) | def get_length_grouped_indices(lengths, batch_size, mega_batch_mult=None... class LengthGroupedSampler (line 317) | class LengthGroupedSampler(Sampler): method __init__ (line 323) | def __init__(self, dataset: Dataset, batch_size: int, lengths: Optiona... method __len__ (line 335) | def __len__(self): method __iter__ (line 338) | def __iter__(self): class DistributedLengthGroupedSampler (line 343) | class DistributedLengthGroupedSampler(DistributedSampler): method __init__ (line 349) | def __init__( method __iter__ (line 394) | def __iter__(self) -> Iterator: function _get_learning_rate (line 419) | def _get_learning_rate(self): function metrics_format (line 442) | def metrics_format(self, metrics: Dict[str, float]) -> Dict[str, float]: function log_metrics (line 464) | def log_metrics(self, split, metrics): function save_metrics (line 482) | def save_metrics(self, split, metrics): FILE: experiments/mlm_bert/utils/trainer_utils.py function set_seed (line 31) | def set_seed(seed: int): class EvalPrediction (line 46) | class EvalPrediction(NamedTuple): class PredictionOutput (line 58) | class PredictionOutput(NamedTuple): class ComputeMetrics (line 64) | class ComputeMetrics: method __init__ (line 65) | def __init__(self, p: EvalPrediction, mask=None): method compute_metrics (line 70) | def compute_metrics(p: EvalPrediction, mask=None): FILE: experiments/nlg_gru/config.py class GRUConfig (line 9) | class GRUConfig(ModelConfig): method from_dict (line 32) | def from_dict(config) -> GRUConfig: FILE: experiments/nlg_gru/dataloaders/dataloader.py class DataLoader (line 12) | class DataLoader(BaseDataLoader): method __init__ (line 17) | def __init__(self, mode, num_workers=0, **kwargs): method collate_fn (line 64) | def collate_fn(self, batch): FILE: experiments/nlg_gru/dataloaders/dataset.py class Dataset (line 12) | class Dataset(BaseDataset): method __init__ (line 17) | def __init__(self, data, min_num_words=2, max_num_words=25, test_only=... method __len__ (line 32) | def __len__(self): method __getitem__ (line 37) | def __getitem__(self, idx): method load_data (line 49) | def load_data(self, orig_strct, user_idx): method process_x (line 65) | def process_x(self, user_data): FILE: experiments/nlg_gru/model.py class GRU2 (line 11) | class GRU2(T.nn.Module): method __init__ (line 12) | def __init__(self, input_size, hidden_size, input_bias, hidden_bias): method _forward_cell (line 19) | def _forward_cell(self, input : Tensor, hidden : Tensor) -> Tensor: method forward (line 30) | def forward(self, input : Tensor) -> Tuple[Tensor, Tensor]: class Embedding (line 39) | class Embedding(T.nn.Module): method __init__ (line 40) | def __init__(self, vocab_size, embedding_size): method forward (line 49) | def forward(self, input : Tensor, embed : bool) -> Tensor: class GRU (line 57) | class GRU(BaseModel): #DLM_2_0 method __init__ (line 58) | def __init__(self, model_config, OOV_correct=False, dropout=0.0, topK_... method forward (line 73) | def forward(self, input : T.Tensor) -> Tuple[Tensor, Tensor]: method loss (line 84) | def loss(self, input : T.Tensor) -> T.Tensor: method inference (line 102) | def inference(self, input): FILE: experiments/nlg_gru/utils/utility.py function load_vocab (line 19) | def load_vocab(url): function to_indices (line 36) | def to_indices(vocab, batch, ndim=2, oov_idx=0, pad_idx=-1): function case_backoff_batch (line 89) | def case_backoff_batch(batch, vocab): function encode_data (line 113) | def encode_data(data_dict, vocab): FILE: experiments/nlp_rnn_fedshakespeare/dataloaders/dataloader.py class DataLoader (line 10) | class DataLoader(BaseDataLoader): method __init__ (line 11) | def __init__(self, mode, num_workers=0, **kwargs): method collate_fn (line 29) | def collate_fn(self, batch): FILE: experiments/nlp_rnn_fedshakespeare/dataloaders/dataset.py class Dataset (line 8) | class Dataset(BaseDataset): method __init__ (line 9) | def __init__(self, data, test_only=False, user_idx=0, **kwargs): method __getitem__ (line 33) | def __getitem__(self, idx): method __len__ (line 36) | def __len__(self): method load_data (line 39) | def load_data(self, data, test_only): FILE: experiments/nlp_rnn_fedshakespeare/dataloaders/preprocessing.py function preprocess (line 38) | def preprocess(sentences, max_seq_len=SEQUENCE_LENGTH): function char_to_id (line 63) | def char_to_id(char): function get_word_dict (line 70) | def get_word_dict(): function split (line 79) | def split(dataset): function download_files (line 85) | def download_files(data_cache_dir): class FEDSHAKESPEARE (line 102) | class FEDSHAKESPEARE: method __init__ (line 103) | def __init__(self) : FILE: experiments/nlp_rnn_fedshakespeare/model.py class nlp_rnn_fedshakespeare (line 12) | class nlp_rnn_fedshakespeare(nn.Module): method __init__ (line 13) | def __init__(self, embedding_dim=8, vocab_size=90, hidden_size=256): method forward (line 26) | def forward(self, input_seq): class RNN (line 40) | class RNN(BaseModel): method __init__ (line 43) | def __init__(self, model_config): method loss (line 47) | def loss(self, input: torch.Tensor) -> torch.Tensor: method inference (line 55) | def inference(self, input): FILE: experiments/semisupervision/dataloaders/RandAugment.py function ShearX (line 16) | def ShearX(img, v): # [-0.3, 0.3] function ShearY (line 23) | def ShearY(img, v): # [-0.3, 0.3] function TranslateX (line 30) | def TranslateX(img, v): # [-150, 150] => percentage: [-0.45, 0.45] function TranslateXabs (line 38) | def TranslateXabs(img, v): # [-150, 150] => percentage: [-0.45, 0.45] function TranslateY (line 45) | def TranslateY(img, v): # [-150, 150] => percentage: [-0.45, 0.45] function TranslateYabs (line 53) | def TranslateYabs(img, v): # [-150, 150] => percentage: [-0.45, 0.45] function Rotate (line 60) | def Rotate(img, v): # [-30, 30] function AutoContrast (line 67) | def AutoContrast(img, _): function Invert (line 71) | def Invert(img, _): function Equalize (line 75) | def Equalize(img, _): function Flip (line 79) | def Flip(img, _): # not from the paper function Solarize (line 83) | def Solarize(img, v): # [0, 256] function SolarizeAdd (line 88) | def SolarizeAdd(img, addition=0, threshold=128): function Posterize (line 97) | def Posterize(img, v): # [4, 8] function Contrast (line 103) | def Contrast(img, v): # [0.1,1.9] function Color (line 108) | def Color(img, v): # [0.1,1.9] function Brightness (line 113) | def Brightness(img, v): # [0.1,1.9] function Sharpness (line 118) | def Sharpness(img, v): # [0.1,1.9] function Cutout (line 123) | def Cutout(img, v): # [0, 60] => percentage: [0, 0.2] function CutoutAbs (line 132) | def CutoutAbs(img, v): # [0, 60] => percentage: [0, 0.2] function SamplePairing (line 154) | def SamplePairing(imgs): # [0, 0.4] function Identity (line 163) | def Identity(img, v): function augment_list (line 167) | def augment_list(grey): # 16 oeprations and their ranges class Lighting (line 231) | class Lighting(object): method __init__ (line 234) | def __init__(self, alphastd, eigval, eigvec): method __call__ (line 239) | def __call__(self, img): class CutoutDefault (line 252) | class CutoutDefault(object): method __init__ (line 256) | def __init__(self, length): method __call__ (line 259) | def __call__(self, img): class RandAugment (line 277) | class RandAugment: method __init__ (line 278) | def __init__(self, n, m, grey=False): method __call__ (line 283) | def __call__(self, img): FILE: experiments/semisupervision/dataloaders/cifar_dataset.py class CIFAR100 (line 23) | class CIFAR100: method __init__ (line 24) | def __init__(self, user_idx=None, test_only=None, args=None, read_data... function save_json (line 86) | def save_json(dict, filename): function _process (line 91) | def _process(dataset, train=True): function partition_imagedataset (line 115) | def partition_imagedataset(X_train, Y_train, X_unlabel_train, Y_unlabel_... function __getDirichletData__ (line 172) | def __getDirichletData__(y, args): FILE: experiments/semisupervision/dataloaders/dataloader.py class DataLoader (line 10) | class DataLoader(BaseDataLoader): method __init__ (line 11) | def __init__(self, mode, num_workers=0, **kwargs): method collate_fn (line 29) | def collate_fn(self, batch): FILE: experiments/semisupervision/dataloaders/dataset.py class Dataset (line 8) | class Dataset(BaseDataset): method __init__ (line 9) | def __init__(self, data, test_only=False, user_idx=0, **kwargs): method __getitem__ (line 30) | def __getitem__(self, idx): method __len__ (line 33) | def __len__(self): method load_data (line 36) | def load_data(self, data, test_only, sup_config): FILE: experiments/semisupervision/model.py class BasicBlock (line 15) | class BasicBlock(nn.Module): method __init__ (line 18) | def __init__(self, in_planes, planes, stride=1): method forward (line 35) | def forward(self, x): class Bottleneck (line 43) | class Bottleneck(nn.Module): method __init__ (line 46) | def __init__(self, in_planes, planes, stride=1): method forward (line 65) | def forward(self, x): class ResNet (line 74) | class ResNet(nn.Module): method __init__ (line 75) | def __init__(self, block, num_blocks, num_classes=10, inchannels = 3): method _make_layer (line 88) | def _make_layer(self, block, planes, num_blocks, stride): method forward (line 96) | def forward(self, x): function ResNet18 (line 108) | def ResNet18(num_classes=10): function ResNet18_emnist (line 111) | def ResNet18_emnist(num_classes=62, inchannel = 1): function ResNet18_organ (line 114) | def ResNet18_organ(num_classes=11, inchannel = 1): function ResNet18_path (line 117) | def ResNet18_path(num_classes=9, inchannel = 3): function ResNet18_blood (line 120) | def ResNet18_blood(num_classes=8, inchannel = 3): function ResNet34 (line 123) | def ResNet34(num_classes=10): function ResNet50 (line 126) | def ResNet50(num_classes=10): function ResNet101 (line 129) | def ResNet101(num_classes=10): function ResNet152 (line 132) | def ResNet152(num_classes=10): function test (line 135) | def test(): class Res (line 141) | class Res(BaseModel): method __init__ (line 144) | def __init__(self, model_config): method forward (line 148) | def forward(self,x): method loss (line 151) | def loss(self, input: torch.Tensor) -> torch.Tensor: method inference (line 166) | def inference(self, input): FILE: extensions/RL/RL.py class SequenceWise (line 19) | class SequenceWise(nn.Module): method __init__ (line 20) | def __init__(self, module): method forward (line 29) | def forward(self, x): method __repr__ (line 37) | def __repr__(self): class BatchRNN (line 44) | class BatchRNN(nn.Module): method __init__ (line 45) | def __init__(self, input_size, hidden_size, rnn_type=nn.LSTM, bidirect... method forward (line 65) | def forward(self, x): class NeuralNetwork (line 79) | class NeuralNetwork(nn.Module): method __init__ (line 80) | def __init__(self, params, wantLSTM=False, batch_norm=False): method forward (line 135) | def forward(self, x): class RL (line 149) | class RL: method __init__ (line 150) | def __init__(self, config=None): method set_losses (line 177) | def set_losses(self, losses): method set_weights (line 180) | def set_weights(self, weights): method forward (line 183) | def forward(self, state=None): method train (line 205) | def train(self, batch=None): method make_model (line 268) | def make_model(self): method load_saved_status (line 286) | def load_saved_status(self): method load (line 301) | def load(self): method save (line 314) | def save(self, i): FILE: extensions/privacy/__init__.py function compute_LDP_noise_std (line 15) | def compute_LDP_noise_std(eps, max_sensitivity, delta): function _beta2betainc_ratio (line 19) | def _beta2betainc_ratio(a, x): function _log_m1 (line 23) | def _log_m1(d, alpha, gamma): function _log_m2 (line 27) | def _log_m2(p, tau, alpha): function _efficient_m (line 31) | def _efficient_m(d, gamma, p): function privacy_parameters (line 37) | def privacy_parameters(eps0, eps, d): function private_unit2 (line 51) | def private_unit2(grad, gamma, prob): function add_gaussian_noise (line 68) | def add_gaussian_noise(grad, eps, max_grad, delta): function add_private_unit2_noise (line 75) | def add_private_unit2_noise(eps, grad): function scalar_DP (line 82) | def scalar_DP(r, eps, k, r_max): function laplace_noise (line 101) | def laplace_noise(max_sens, eps, vocab_size): function unroll_network (line 105) | def unroll_network(named_params, select_grad=False): function update_network (line 118) | def update_network(named_params, params_ids, flat_params, apply_to_grad=... function apply_global_dp (line 128) | def apply_global_dp(config, model, num_clients_curr_iter, select_grad=Tr... function apply_local_dp (line 154) | def apply_local_dp(trainer, weight, dp_config, add_weight_noise): function update_privacy_accountant (line 204) | def update_privacy_accountant(config, num_clients, curr_iter, num_client... FILE: extensions/privacy/analysis.py function _log_add (line 43) | def _log_add(logx: float, logy: float) -> float: function _log_sub (line 60) | def _log_sub(logx: float, logy: float) -> float: function _compute_log_a_for_int_alpha (line 88) | def _compute_log_a_for_int_alpha(q: float, sigma: float, alpha: int) -> ... function _compute_log_a_for_frac_alpha (line 124) | def _compute_log_a_for_frac_alpha(q: float, sigma: float, alpha: float) ... function _compute_log_a (line 178) | def _compute_log_a(q: float, sigma: float, alpha: float) -> float: function _log_erfc (line 203) | def _log_erfc(x: float) -> float: function _compute_rdp (line 218) | def _compute_rdp(q: float, sigma: float, alpha: float) -> float: function compute_rdp (line 245) | def compute_rdp( function get_privacy_spent (line 272) | def get_privacy_spent( FILE: extensions/privacy/dp_kmeans.py function sample (line 14) | def sample(ndim, r, num_samples=1): function sphere_packing_initialization (line 23) | def sphere_packing_initialization(n_clusters, n_dim, min_cluster_radius, function add_gaussian_noise (line 50) | def add_gaussian_noise(centers_new, weight_in_clusters, eps, function DPKMeans (line 75) | def DPKMeans(n_dim, eps, max_cluster_l2, max_sample_weight=1.0, function resetKMeans (line 191) | def resetKMeans(): FILE: extensions/privacy/metrics.py function extract_indices_from_embeddings (line 10) | def extract_indices_from_embeddings(gradients, batch, embed_size, vocab_... function compute_perplexity (line 25) | def compute_perplexity(encoded_batch, model): function practical_epsilon_leakage (line 33) | def practical_epsilon_leakage(original_params, model, encoded_batches, i... FILE: extensions/quantization/quant.py function quant_model (line 9) | def quant_model( function find_min_max_gradient (line 53) | def find_min_max_gradient( function quant_bins (line 76) | def quant_bins( FILE: testing/build_vocab.py function build_counter (line 8) | def build_counter(train_data, initial_counter=None): function build_vocab (line 30) | def build_vocab(counter, vocab_size=10000): function load_leaf_data (line 48) | def load_leaf_data(file_path): function save_vocab (line 56) | def save_vocab(vocab, target_dir): function main (line 64) | def main(): function parse_args (line 87) | def parse_args(): FILE: testing/create_data.py function get_arg_parser (line 19) | def get_arg_parser() -> argparse.ArgumentParser: function reduce_users (line 24) | def reduce_users(file): function _process_and_save_to_disk (line 35) | def _process_and_save_to_disk(dataset, n_users, exp, output): function _dump_dict_to_hdf5 (line 57) | def _dump_dict_to_hdf5(data_dict: dict, hdf5_file: h5py.File): class HeartDataSet (line 73) | class HeartDataSet: method __init__ (line 74) | def __init__(self, heartdata, cutoff): method __len__ (line 78) | def __len__(self): function main (line 81) | def main(): FILE: testing/test_e2e_trainer.py function get_info (line 11) | def get_info(task): function run_pipeline (line 27) | def run_pipeline(data_path, output_path, config_path, task): function test_nlg_gru (line 50) | def test_nlg_gru(): function test_ecg_cnn (line 56) | def test_ecg_cnn(): function test_mlm_bert (line 63) | def test_mlm_bert(): function test_classif_cnn (line 71) | def test_classif_cnn(): FILE: utils/data_utils.py class BatchSampler (line 9) | class BatchSampler(sampler.Sampler): method __init__ (line 16) | def __init__(self, dataset, batch_size, randomize=True, drop_last=False): method __iter__ (line 31) | def __iter__(self): method __len__ (line 38) | def __len__(self): class DynamicBatchSampler (line 42) | class DynamicBatchSampler(sampler.Sampler): method __init__ (line 50) | def __init__(self, sampler, frames_threshold, max_batch_size=0, unsort... method __iter__ (line 113) | def __iter__(self): method __len__ (line 118) | def __len__(self): FILE: utils/dataloaders_utils.py function get_exp_dataloader (line 9) | def get_exp_dataloader(task): function make_train_dataloader (line 25) | def make_train_dataloader(data_config, data_path, clientx, task=None, ve... function make_val_dataloader (line 58) | def make_val_dataloader(data_config, data_path, task=None, data_strct=No... function make_test_dataloader (line 72) | def make_test_dataloader(data_config, data_path, task=None, data_strct=N... function get_dataset (line 85) | def get_dataset(data_path, config, task, mode, test_only=False, user_idx... function get_data_config (line 100) | def get_data_config(config, mode): FILE: utils/optimizers/adamW.py class AdamW (line 8) | class AdamW(Optimizer): method __init__ (line 17) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-6, weig... method step (line 30) | def step(self, closure=None): FILE: utils/optimizers/lamb.py function log_lamb_rs (line 15) | def log_lamb_rs(optimizer: Optimizer, event_writer: SummaryWriter, token... function log_lamb_rs (line 29) | def log_lamb_rs(optimizer, event_writer, token_count): class LAMB (line 33) | class LAMB(Optimizer): method __init__ (line 54) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-6, method step (line 69) | def step(self, closure=None): FILE: utils/optimizers/lars.py class LarsSGDV1 (line 10) | class LarsSGDV1(torch.optim.SGD): method __init__ (line 16) | def __init__(self, params, lr, momentum=0, dampening=0, method step (line 22) | def step(self, closure=None): class LarsSGD (line 74) | class LarsSGD(torch.optim.SGD): method __init__ (line 80) | def __init__(self, params, lr, momentum=0, dampening=0, method step (line 86) | def step(self, closure=None): FILE: utils/preprocessing/create-hdf5.py function local_time (line 12) | def local_time(): FILE: utils/preprocessing/create-json.py function local_time (line 11) | def local_time(): FILE: utils/preprocessing/from_json_to_hdf5.py function local_time (line 11) | def local_time(): FILE: utils/utils.py function make_optimizer (line 27) | def make_optimizer(optimizer_config, model): function get_lr (line 67) | def get_lr(optimizer): function get_lr_all (line 72) | def get_lr_all(optimizer): function softmax (line 78) | def softmax(X, theta = 1.0, axis = None): class AverageMeter (line 117) | class AverageMeter(object): method __init__ (line 121) | def __init__(self, metric_name): method add (line 125) | def add(self, top, bottom): method get_macro_average (line 129) | def get_macro_average(self): method get_micro_average (line 134) | def get_micro_average(self): method get_average (line 138) | def get_average(self, l): method reset (line 141) | def reset(self): method display_results (line 144) | def display_results(self, loglevel=logging.INFO): function make_lr_scheduler (line 151) | def make_lr_scheduler(annealing_config, optimizer, num_batches=1): class RampupKeepExpdecayKeepLRScheduler (line 189) | class RampupKeepExpdecayKeepLRScheduler(torch.optim.lr_scheduler._LRSche... method __init__ (line 192) | def __init__(self, optimizer, peak_lr=0.001, floor_lr=0.00001, sr=1000... method step (line 207) | def step(self, epoch=None): method get_lr (line 212) | def get_lr(self): class ScheduledSamplingScheduler (line 228) | class ScheduledSamplingScheduler(): method __init__ (line 236) | def __init__(self, model, ramp_start, ramp_stop, method step (line 245) | def step(self): method state_dict (line 256) | def state_dict(self): method load_state_dict (line 259) | def load_state_dict(self, state_dict): class NBestTaskScheduler (line 263) | class NBestTaskScheduler(): method __init__ (line 269) | def __init__(self, num_tasks, iteration_per_task): method current_num_tasks (line 276) | def current_num_tasks(self): method no_label_updates (line 279) | def no_label_updates(self): method set_iteration_no (line 283) | def set_iteration_no(self, iter_no): method step (line 286) | def step(self): function init_logging (line 299) | def init_logging(log_dir, loglevel=logging.DEBUG): function print_cuda_stats (line 310) | def print_cuda_stats(): function print_rank (line 319) | def print_rank(str, loglevel=logging.INFO): function print_profiler (line 324) | def print_profiler(profiler, loglevel=logging.INFO): function write_yaml (line 335) | def write_yaml(save_path, config): function torch_save (line 339) | def torch_save(save_path, state_or_model): function write_tokens (line 342) | def write_tokens(save_path, token_list): function try_except_save (line 348) | def try_except_save(save_fn, **kwargs): function write_nbest_jsonl (line 362) | def write_nbest_jsonl(uttid2jsonl, uttid2hypos, uttid2scores, outputpath... function write_multitask_jsonl (line 401) | def write_multitask_jsonl(uttid2jsonl, uttid2hypos, uttid2scores, output... function load_eval_result_jsonl (line 451) | def load_eval_result_jsonl(resultjsonl, uttid2hypos=OrderedDict(), uttid... function find_pretrained_model (line 486) | def find_pretrained_model(model_path, config): function flatten_grads_model (line 497) | def flatten_grads_model(learner) -> np.ndarray: function flatten_grads_array (line 502) | def flatten_grads_array(param_array)->np.array: function dist_weights_to_model (line 511) | def dist_weights_to_model(weights, parameters): function dist_params_to_model (line 521) | def dist_params_to_model(grads, model): function reshape_params_to_model (line 531) | def reshape_params_to_model(grads, model): function to_device (line 543) | def to_device(x): function update_json_log (line 546) | def update_json_log(log_path, status_info): function scrub_empty_clients (line 563) | def scrub_empty_clients(data_strct): function compute_grad_cosines (line 585) | def compute_grad_cosines(grads, model_grad): function convex_inference (line 598) | def convex_inference(model_global, model_personal, alpha): function alpha_update (line 605) | def alpha_update(model_global, model_personal, alpha, eta): function get_label_VAT (line 620) | def get_label_VAT(local_logits, server_logits, thre, comp):