MCPcopy Create free account

hub / github.com/TalwalkarLab/leaf / functions

Functions171 in github.com/TalwalkarLab/leaf

↓ 3 callersFunction_set_plot_properties
Sets some plt properties.
models/metrics/visualization_utils.py:40
↓ 3 callersFunctioncreate_leaf_json
(orig_data)
data/reddit/source/preprocess.py:78
↓ 3 callersFunctioncreate_seqs
(comments, meta_data, seq_len=SEQ_LEN)
data/reddit/source/preprocess.py:11
↓ 3 callersFunctionsave_json
(json_data, set_name, file_name)
data/reddit/source/preprocess.py:60
↓ 3 callersMethodset_params
(self, model_params)
models/model.py:40
↓ 2 callersMethod_tokens_to_ids
(self, raw_batch)
models/reddit/stacked_lstm.py:126
↓ 2 callersFunctionadd_examples
(example_dict, example_tuple_list)
data/shakespeare/preprocess/preprocess_shakespeare.py:146
↓ 2 callersFunctionbatch_data
data is a dict := {'x': [numpy array], 'y': [numpy array]} (on one client) returns x, y, which are both numpy array of length: batch_size
models/utils/model_utils.py:7
↓ 2 callersMethodbatch_data
(self, data, batch_size)
models/reddit/stacked_lstm.py:133
↓ 2 callersMethodclose
(self)
models/model.py:127
↓ 2 callersFunctioncreate_jsons_for
used in split-by-user case
data/utils/split_data.py:16
↓ 2 callersMethodget_clients_info
Returns the ids, hierarchies and num_samples for the given clients. Returns info about self.selected_clients if clients=None; Args:
models/server.py:103
↓ 2 callersMethodget_params
(self)
models/model.py:46
↓ 2 callersFunctionget_word_emb_arr
(path)
models/utils/language_utils.py:118
↓ 2 callersFunctioniid_divide
divide list l among g groups each group has either int(len(l)/g) or int(len(l)/g)+1 elements returns a list of groups
data/utils/util.py:14
↓ 2 callersFunctionplay_and_character
(play, character)
data/shakespeare/preprocess/preprocess_shakespeare.py:132
↓ 2 callersFunctionprint_metrics
Prints weighted averages of the given metrics. Args: metrics: dict with client ids as keys. Each entry is a dict with the met
models/main.py:163
↓ 2 callersFunctionprint_stats
( num_round, server, clients, num_samples, args, writer, use_val_set)
models/main.py:150
↓ 2 callersMethodprocess_x
Pre-processes each batch of features before being fed to the model.
models/model.py:131
↓ 2 callersMethodprocess_x
(self, raw_x_batch)
models/synthetic/log_reg.py:38
↓ 2 callersMethodprocess_y
Pre-processes each batch of labels before being fed to the model.
models/model.py:136
↓ 2 callersMethodprocess_y
(self, raw_y_batch)
models/synthetic/log_reg.py:41
↓ 2 callersFunctionread_dir
(data_dir)
models/utils/model_utils.py:29
↓ 2 callersFunctionsplit_line
split given line/phrase into list of words Args: line: string representing phrase to be split Return: list of strings, w
models/utils/language_utils.py:49
↓ 2 callersMethodtest_model
Tests self.model on given clients. Tests model on self.selected_clients if clients_to_test=None. Args: clients_to_test:
models/server.py:82
↓ 2 callersFunctionval_to_vec
Converts target into one-hot. Args: size: Size of vector. val: Integer in range [0, size]. Returns: vec: one-hot vec
models/utils/language_utils.py:130
↓ 1 callersFunction__num_elems
Returns the number of elements in the given shape Args: shape: TensorShape Return: tot_elems: int
models/utils/tf_utils.py:4
↓ 1 callersFunction__txt_to_data
Parses text file in given directory into data for next-character model. Args: txt_dir: path to text file seq_length: length of st
data/shakespeare/preprocess/shake_utils.py:9
↓ 1 callersMethod_build_rnn_graph
(self, inputs)
models/reddit/stacked_lstm.py:101
↓ 1 callersMethod_generate_clusters
(self)
data/synthetic/data_generator.py:41
↓ 1 callersMethod_generate_task
(self, cluster_mean, cluster_id, num_samples)
data/synthetic/data_generator.py:69
↓ 1 callersMethod_generate_x
(self, num_samples)
data/synthetic/data_generator.py:49
↓ 1 callersMethod_generate_y
(self, x, cluster_mean)
data/synthetic/data_generator.py:59
↓ 1 callersFunction_get_celebrities_by_image
(identities)
data/celeba/preprocess/metadata_to_json.py:38
↓ 1 callersFunction_get_train_test_by_character
Splits character data into train and test sets. if test_fraction <= 0, returns {} for all_test_examples plays := list of (play, dic
data/shakespeare/preprocess/preprocess_shakespeare.py:135
↓ 1 callersMethod_load_image
(self, img_name)
models/celeba/cnn.py:49
↓ 1 callersFunction_match_character_regex
(line, comedy_of_errors=False)
data/shakespeare/preprocess/preprocess_shakespeare.py:39
↓ 1 callersFunction_match_continuation_regex
(line, comedy_of_errors=False)
data/shakespeare/preprocess/preprocess_shakespeare.py:43
↓ 1 callersFunction_one_hot
returns one-hot vector with given size and value 1 at given index
models/utils/language_utils.py:15
↓ 1 callersFunction_remove_nonalphanumerics
(filename)
data/shakespeare/preprocess/preprocess_shakespeare.py:129
↓ 1 callersFunction_split_into_plays
Splits the full data by play.
data/shakespeare/preprocess/preprocess_shakespeare.py:47
↓ 1 callersFunction_write_data_by_character
Writes a collection of data files by play & character.
data/shakespeare/preprocess/preprocess_shakespeare.py:175
↓ 1 callersFunctionbag_of_words
returns bag of words representation of given phrase using given vocab Args: line: string representing phrase to be parsed vocab:
models/utils/language_utils.py:100
↓ 1 callersFunctionbuild_counter
(train_data, initial_counter=None)
data/reddit/build_vocab.py:11
↓ 1 callersFunctionbuild_json_format
(celebrities, targets)
data/celeba/preprocess/metadata_to_json.py:74
↓ 1 callersFunctionbuild_labels_dict
(targets, counts, other_meta)
data/reddit/source/preprocess.py:48
↓ 1 callersFunctionbuild_vocab
(counter, vocab_size=10000)
data/reddit/build_vocab.py:33
↓ 1 callersMethodclean_body
(self, tknzr=None)
data/reddit/source/reddit_utils.py:25
↓ 1 callersFunctionclean_file
(f, tknzr)
data/reddit/source/clean_raw.py:31
↓ 1 callersMethodclose_model
(self)
models/server.py:126
↓ 1 callersFunctioncreate_clients
(users, groups, train_data, test_data, model)
models/main.py:108
↓ 1 callersMethodcreate_model
Creates the model for the task. Returns: A 4-tuple consisting of: features: A placeholder for the samples' featur
models/model.py:60
↓ 1 callersFunctionfiles_to_json
(files, json_name, start_user_idx=0)
data/reddit/source/get_json.py:46
↓ 1 callersFunctionget_celebrities_and_images
(identities)
data/celeba/preprocess/metadata_to_json.py:22
↓ 1 callersFunctionget_celebrities_and_target
(celebrities, attributes, attribute_name=TARGET_NAME)
data/celeba/preprocess/metadata_to_json.py:47
↓ 1 callersFunctionget_metadata
()
data/celeba/preprocess/metadata_to_json.py:10
↓ 1 callersFunctionget_metrics_names
Gets the names of the metrics. Args: metrics: Dict keyed by client id. Each element is a dict of metrics for that client in t
models/metrics/writer.py:79
↓ 1 callersFunctionget_num_samples
(num_tasks, min_num_samples=5, max_num_samples=1000)
data/synthetic/main.py:26
↓ 1 callersFunctionget_stat_writer_function
(ids, groups, num_samples, args)
models/main.py:132
↓ 1 callersFunctionget_sys_writer_function
(args)
models/main.py:141
↓ 1 callersMethodget_task
(self, num_samples)
data/synthetic/data_generator.py:35
↓ 1 callersFunctionget_users
()
data/reddit/source/get_raw_users.py:76
↓ 1 callersFunctiongraph_size
Returns the size of the given graph in bytes The size of the graph is calculated by summing up the sizes of each trainable variable. The size
models/utils/tf_utils.py:18
↓ 1 callersFunctionletter_to_vec
returns one-hot representation of given letter
models/utils/language_utils.py:23
↓ 1 callersFunctionline_to_indices
converts given phrase into list of word indices if the phrase has more than max_words words, returns a list containing indices of the fir
models/utils/language_utils.py:76
↓ 1 callersFunctionload_data
(name)
data/utils/stats.py:28
↓ 1 callersFunctionload_leaf_data
(file_path)
data/reddit/build_vocab.py:51
↓ 1 callersMethodload_vocab
(self)
models/reddit/stacked_lstm.py:228
↓ 1 callersFunctionmain
()
data/synthetic/main.py:12
↓ 1 callersFunctionmain
()
data/celeba/preprocess/metadata_to_json.py:101
↓ 1 callersFunctionmain
()
data/reddit/build_vocab.py:64
↓ 1 callersFunctionmain
()
data/reddit/source/delete_small_users.py:28
↓ 1 callersFunctionmain
()
data/reddit/source/get_raw_users.py:134
↓ 1 callersFunctionmain
()
data/reddit/source/preprocess.py:135
↓ 1 callersFunctionmain
()
data/reddit/source/get_json.py:63
↓ 1 callersFunctionmain
()
data/reddit/source/clean_raw.py:50
↓ 1 callersFunctionmain
(argv)
data/shakespeare/preprocess/preprocess_shakespeare.py:185
↓ 1 callersFunctionmain
()
models/main.py:23
↓ 1 callersFunctionmerge_dicts
(x, y)
data/reddit/source/get_json.py:11
↓ 1 callersFunctiononline
We assume all users are always online.
models/main.py:103
↓ 1 callersFunctionorder_data
(user_data)
data/reddit/source/preprocess.py:71
↓ 1 callersFunctionparse_args
()
data/synthetic/main.py:60
↓ 1 callersFunctionparse_args
()
data/reddit/build_vocab.py:87
↓ 1 callersFunctionparse_args
()
models/utils/args.py:7
↓ 1 callersFunctionparse_data_in
returns dictionary with keys: users, num_samples, user_data raw := bool representing whether to include raw text in all_data if raw is Tr
data/shakespeare/preprocess/shake_utils.py:30
↓ 1 callersFunctionprint_dataframe
Writes the given dataframe in path as a csv
models/metrics/writer.py:73
↓ 1 callersFunctionprint_dataset_stats
(name)
data/utils/stats.py:51
↓ 1 callersFunctionprocess_file
(file_name)
data/reddit/source/preprocess.py:86
↓ 1 callersMethodprocess_x
(self, raw_x_batch)
models/reddit/stacked_lstm.py:117
↓ 1 callersMethodprocess_y
(self, raw_y_batch)
models/reddit/stacked_lstm.py:122
↓ 1 callersFunctionread_data
parses data in given train and test data directories assumes: - the data in the input directories are .json files with keys 'users'
models/utils/model_utils.py:49
↓ 1 callersFunctionrelabel_class
maps hexadecimal class value (string) to a decimal number returns: - 0 through 9 for classes representing respective numbers - 10 thr
data/femnist/preprocess/data_to_json.py:25
↓ 1 callersMethodrun_epoch
(self, data, batch_size)
models/model.py:94
↓ 1 callersMethodsave
(self, path='checkpoints/model.ckpt')
models/model.py:171
↓ 1 callersFunctionsave_json
(json_dir, json_name, users, num_samples, user_data)
data/synthetic/main.py:46
↓ 1 callersMethodsave_model
Saves the server model on checkpoints/dataset/model.ckpt.
models/server.py:119
↓ 1 callersFunctionsave_vocab
(vocab, target_dir)
data/reddit/build_vocab.py:59
↓ 1 callersMethodselect_clients
Selects num_clients clients randomly from possible_clients. Note that within function, num_clients is set to min(num_clie
models/server.py:13
↓ 1 callersFunctionsetup_clients
Instantiates clients based on given train and test data directories. Return: all_clients: list of Client objects.
models/main.py:115
↓ 1 callersFunctionsubsample_file
(f)
data/reddit/source/delete_small_users.py:12
next →1–100 of 171, ranked by callers