MCPcopy Create free account

hub / github.com/TalwalkarLab/leaf / functions

Functions171 in github.com/TalwalkarLab/leaf

↓ 1 callersMethodtest
Tests the current model on the given data. Args: data: dict of the form {'x': [list], 'y': [list]} Return:
models/model.py:108
↓ 1 callersFunctionto_leaf_format
(tasks)
data/synthetic/main.py:32
↓ 1 callersFunctionto_leaf_format
(some_json, start_idx=0)
data/reddit/source/get_json.py:17
↓ 1 callersMethodtrain
Trains the client model. Args: data: Dict of the form {'x': [list], 'y': [list]}. num_epochs: Number of epoc
models/model.py:74
↓ 1 callersMethodtrain_model
Trains self.model on given clients. Trains model on self.selected_clients if clients=None; each client's data is trained with
models/server.py:31
↓ 1 callersMethodupdate_model
(self)
models/server.py:70
↓ 1 callersFunctionword_to_indices
returns a list of character indices Args: word: string Return: indices: int list with length len(word)
models/utils/language_utils.py:30
↓ 1 callersFunctionwrite_json
(json_data)
data/celeba/preprocess/metadata_to_json.py:87
Method__init__
( self, num_classes=2, seed=931231, num_dim=NUM_DIM,
data/synthetic/data_generator.py:10
Method__init__
(self, reddit_dict)
data/reddit/source/reddit_utils.py:17
Method__init__
(self, client_id, group=None, train_data={'x' : [],'y' : []}, eval_data={'x' : [],'y' : []}, model=None)
models/client.py:7
Method__init__
(self, client_model)
models/server.py:7
Method__init__
(self, seed, lr, optimizer=None)
models/model.py:17
Method__init__
(self, model)
models/model.py:142
Method__init__
(self, seed, lr, num_classes)
models/femnist/cnn.py:11
Method__init__
(self, seed, lr, num_classes, input_dim)
models/synthetic/log_reg.py:14
Method__init__
(self, seed, lr, num_classes)
models/celeba/cnn.py:15
Method__init__
(self, seed, lr, seq_len, n_hidden, num_layers, keep_prob=1.0, max_grad_norm=5, init_scale=0.1)
models/reddit/stacked_lstm.py:18
Method__init__
(self, seed, lr, seq_len, num_classes, n_hidden)
models/shakespeare/stacked_lstm.py:12
Method__init__
(self, lr, num_classes, input_dim=None)
models/sent140/bag_log_reg.py:16
Method__init__
(self, seed, lr, seq_len, num_classes, n_hidden, emb_arr=None)
models/sent140/stacked_lstm.py:17
Method__str__
(self)
data/reddit/source/reddit_utils.py:60
Method_run_epoch
(self, data, batch_size)
models/synthetic/log_reg.py:44
Method_test
(self, data)
models/synthetic/log_reg.py:56
Function_weighted_mean
(df, metric_name, weight_name)
models/metrics/visualization_utils.py:96
Function_weighted_std
(df, metric_name, weight_name)
models/metrics/visualization_utils.py:105
Function_word_to_index
returns index of given word based on given lookup dictionary returns the length of the lookup dictionary if word not found Args: wor
models/utils/language_utils.py:61
Methodclose
(self)
models/model.py:174
Methodcreate_model
Model function for CNN.
models/femnist/cnn.py:15
Methodcreate_model
(self)
models/synthetic/log_reg.py:19
Methodcreate_model
(self)
models/celeba/cnn.py:19
Methodcreate_model
(self)
models/reddit/stacked_lstm.py:34
Methodcreate_model
(self)
models/shakespeare/stacked_lstm.py:18
Methodcreate_model
(self)
models/sent140/bag_log_reg.py:24
Methodcreate_model
(self)
models/sent140/stacked_lstm.py:27
Methodcur_model
(self)
models/model.py:150
Methodflatten_lists
(data_x_by_comment, data_y_by_comment)
models/reddit/stacked_lstm.py:142
Functionget_longest_flops_path
Prints the largest amount of flops required to complete training. To calculate this metric, we: 1. For each round, pick the client that r
models/metrics/visualization_utils.py:263
Functionload_data
Loads the data from the given stat_metric and sys_metric files.
models/metrics/visualization_utils.py:27
Functionload_obj
(name)
data/utils/util.py:9
Methodmake_cell
()
models/reddit/stacked_lstm.py:102
Methodmodel
Returns this client reference to model being trained
models/client.py:97
Methodnum_samples
Number samples for this client. Return: int: Number of samples for this client
models/client.py:81
Methodnum_test_samples
Number of test samples for this client. Return: int: Number of test samples for this client
models/client.py:59
Methodnum_train_samples
Number of train samples for this client. Return: int: Number of train samples for this client
models/client.py:70
Methodoptimizer
Optimizer to be used by the model.
models/model.py:52
Functionplot_accuracy_vs_round_number
Plots the clients' average test accuracy vs. the round number. Args: stat_metrics: pd.DataFrame as written by writer.py. weighted
models/metrics/visualization_utils.py:52
Functionplot_accuracy_vs_round_number_per_client
Plots the clients' test accuracy vs. the round number. Args: stat_metrics: pd.DataFrame as written by writer.py. sys_metrics: pd.
models/metrics/visualization_utils.py:115
Functionplot_bytes_written_and_read
Plots the cumulative sum of the bytes written and read by the server. Args: sys_metrics: pd.DataFrame as written by writer.py. ro
models/metrics/visualization_utils.py:170
Functionplot_client_computations_vs_round_number
Plots the clients' local computations against round number. Args: sys_metrics: pd.DataFrame as written by writer.py. aggregate_wi
models/metrics/visualization_utils.py:196
Functionprint_metrics
Prints or appends the given metrics in a csv. The resulting dataframe is of the form: client_id, round_number, hierarchy, num_samples, me
models/metrics/writer.py:18
Methodprocess_x
(self, raw_x_batch)
models/femnist/cnn.py:50
Methodprocess_x
(self, raw_x_batch)
models/celeba/cnn.py:41
Methodprocess_x
(self, raw_x_batch)
models/shakespeare/stacked_lstm.py:40
Methodprocess_x
Return: len(vocab) by len(raw_x_batch) np array
models/sent140/bag_log_reg.py:44
Methodprocess_x
(self, raw_x_batch, max_words=25)
models/sent140/stacked_lstm.py:50
Methodprocess_y
(self, raw_y_batch)
models/femnist/cnn.py:53
Methodprocess_y
(self, raw_y_batch)
models/celeba/cnn.py:46
Methodprocess_y
(self, raw_y_batch)
models/shakespeare/stacked_lstm.py:45
Methodprocess_y
(self, raw_y_batch)
models/sent140/bag_log_reg.py:54
Methodprocess_y
(self, raw_y_batch)
models/sent140/stacked_lstm.py:56
Methodrun_epoch
(self, data, batch_size=5)
models/reddit/stacked_lstm.py:172
Functionsave_obj
(obj, name)
data/utils/util.py:4
Methodsend_to
Copies server model variables to each of the given clients Args: clients: list of Client objects
models/model.py:153
Functionsetup
(app)
docs/source/conf.py:199
Methodsize
(self)
models/model.py:146
Methodtest
Tests self.model on self.test_data. Args: set_to_use. Set to test on. Should be in ['train', 'test']. Return:
models/client.py:43
Methodtest
(self, data, batch_size=5)
models/reddit/stacked_lstm.py:202
Methodtokens_to_word_ids
(tokens, vocab)
models/reddit/stacked_lstm.py:127
Methodtrain
Trains on self.model using the client's train_data. Args: num_epochs: Number of epochs to train. Unsupported if minibatch is prov
models/client.py:14
Functionwriter_fn
(num_round, metrics, partition)
models/main.py:134
← previous101–171 of 171, ranked by callers