MCPcopy Create free account

hub / github.com/Time-MoE/Time-MoE / functions

Functions134 in github.com/Time-MoE/Time-MoE

↓ 19 callersFunctionlog_in_local_rank_0
(*msg, type='info', used_logger=None)
time_moe/utils/log_util.py:41
↓ 11 callersMethod__init__
(self, hidden_size: int, intermediate_size: int, hidden_act: str)
time_moe/models/modeling_time_moe.py:258
↓ 5 callersMethodis_valid_path
(data_path)
time_moe/datasets/binary_dataset.py:92
↓ 3 callersFunction_safe_float
(number)
time_moe/runner.py:246
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
time_moe/models/modeling_time_moe.py:207
↓ 2 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
time_moe/models/modeling_time_moe.py:144
↓ 2 callersFunctionbinary_search
(sorted_list, value)
time_moe/datasets/time_moe_dataset.py:126
↓ 2 callersMethodget_sequence_length_by_idx
(self, seq_idx)
time_moe/datasets/binary_dataset.py:65
↓ 2 callersFunctionlength_to_str
(length)
time_moe/runner.py:235
↓ 2 callersFunctionprocess_to_bin
(data_path, out_folder, shuffle: bool = True, dtype: str = 'float32')
scripts/convert_dataset_to_bin.py:23
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
time_moe/models/modeling_time_moe.py:123
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
time_moe/models/modeling_time_moe.py:136
↓ 1 callersMethod__init__
(self, data_path, context_length: int, prediction_length: int, onfly_norm: bool = False)
time_moe/datasets/benchmark_dataset.py:88
↓ 1 callersMethod_calculate
(self, preds, labels, **kwargs)
run_eval.py:39
↓ 1 callersMethod_flash_attention_forward
Calls the forward method of Flash Attention - if the input hidden states contain at least one padding token first unpad the input, th
time_moe/models/modeling_time_moe.py:566
↓ 1 callersMethod_get_read_infos_by_offset_length
(self, offset, length)
time_moe/datasets/binary_dataset.py:68
↓ 1 callersFunction_get_unpad_data
(attention_mask)
time_moe/models/modeling_time_moe.py:29
↓ 1 callersMethod_read_sequence_in_file
(self, fn, offset_in_file, length)
time_moe/datasets/binary_dataset.py:84
↓ 1 callersMethod_update_model_kwargs_for_generation
( self, outputs: ModelOutput, model_kwargs: Dict[str, Any], ho
time_moe/models/ts_generation_mixin.py:157
↓ 1 callersFunctionauto_dist_run
(main_file: str, argv: str)
torch_dist_run.py:66
↓ 1 callersMethodcalc_ar_loss
(self, predictions, labels, loss_masks, horizon_length)
time_moe/models/modeling_time_moe.py:1064
↓ 1 callersFunctioncount_num_tensor_elements
(tensor)
run_eval.py:23
↓ 1 callersFunctiondump_dill_obj
(obj, fn)
time_moe/utils/io_util.py:96
↓ 1 callersFunctionevaluate
(args)
run_eval.py:95
↓ 1 callersFunctionget_cosine_schedule_with_warmup_min_lr
( optimizer: torch.optim.Optimizer, num_warmup_steps: int, num_training_steps: int,
time_moe/trainer/hf_trainer.py:79
↓ 1 callersFunctionget_logger
(name, level="INFO", handlers=None, update=False)
time_moe/utils/log_util.py:31
↓ 1 callersMethodget_train_dataset
(self, data_path, max_length, stride, normalization_method)
time_moe/runner.py:203
↓ 1 callersFunctionget_world_size
()
time_moe/utils/dist_util.py:34
↓ 1 callersFunctionis_local_rank_0
()
time_moe/utils/dist_util.py:15
↓ 1 callersFunctionis_local_rank_0
()
time_moe/utils/log_util.py:23
↓ 1 callersFunctionload_balancing_loss_func
r""" Computes auxiliary load balancing loss as in Switch Transformer - implemented in Pytorch. See Switch Transformer (https://arxiv.org/abs/
time_moe/models/modeling_time_moe.py:41
↓ 1 callersFunctionload_dill_obj
(fn)
time_moe/utils/io_util.py:102
↓ 1 callersFunctionload_json_file
(fn)
time_moe/datasets/binary_dataset.py:104
↓ 1 callersMethodload_model
(self, model_path: str = None, from_scatch: bool = False, **kwargs)
time_moe/runner.py:28
↓ 1 callersFunctionload_pkl_obj
(fn)
time_moe/utils/io_util.py:108
↓ 1 callersFunctionload_pkl_obj
(fn)
time_moe/datasets/general_dataset.py:87
↓ 1 callersFunctionload_yaml_file
(fn)
time_moe/utils/io_util.py:78
↓ 1 callersFunctionload_yaml_file
(fn)
time_moe/datasets/general_dataset.py:78
↓ 1 callersFunctionobtain_dist_env_dict
()
torch_dist_run.py:47
↓ 1 callersMethodpredict
(self, batch)
run_eval.py:79
↓ 1 callersMethodprepare_inputs_for_generation
( self, input_ids, past_key_values=None, attention_mask=None, inputs_embeds=None, **kwargs )
time_moe/models/modeling_time_moe.py:1108
↓ 1 callersFunctionprocess_src_folder_to_tgt_folder
(src_data_folder, out_folder)
scripts/convert_dataset_to_bin.py:95
↓ 1 callersMethodpush
(self, preds, labels, **kwargs)
run_eval.py:36
↓ 1 callersFunctionread_file_by_extension
(fn)
time_moe/utils/io_util.py:18
↓ 1 callersFunctionread_file_by_extension
(fn)
time_moe/datasets/general_dataset.py:51
↓ 1 callersFunctionread_jsonl_to_list
(jsonl_fn)
time_moe/utils/io_util.py:67
↓ 1 callersFunctionread_jsonl_to_list
(jsonl_fn)
time_moe/datasets/general_dataset.py:73
↓ 1 callersFunctionsave_array_to_bin
(arr, fn)
scripts/convert_dataset_to_bin.py:18
↓ 1 callersFunctionsave_yaml_file
(obj, fn)
time_moe/utils/io_util.py:87
↓ 1 callersFunctionsetup_nccl
(rank, world_size, master_addr='127.0.0.1', master_port=9899)
run_eval.py:18
↓ 1 callersFunctionsetup_seed
Setup seed for all known operations. Args: seed (int): seed number. Returns:
time_moe/runner.py:211
↓ 1 callersMethodtrain_model
(self, from_scratch: bool = False, **kwargs)
time_moe/runner.py:59
↓ 1 callersFunctionwrite_file_by_extension
(obj, fn)
time_moe/utils/io_util.py:40
↓ 1 callersFunctionwrite_jsonl_to_file
(obj_list, jsonl_fn)
time_moe/utils/io_util.py:61
Method__getitem__
(self, seq_idx)
time_moe/datasets/time_moe_dataset.py:65
Method__getitem__
(self, seq_idx)
time_moe/datasets/binary_dataset.py:45
Method__getitem__
(self, seq_idx)
time_moe/datasets/ts_dataset.py:12
Method__getitem__
(self, seq_idx)
time_moe/datasets/time_moe_window_dataset.py:76
Method__getitem__
(self, window_idx)
time_moe/datasets/time_moe_window_dataset.py:155
Method__getitem__
(self, idx)
time_moe/datasets/benchmark_dataset.py:74
Method__getitem__
(self, idx)
time_moe/datasets/benchmark_dataset.py:111
Method__getitem__
(self, seq_idx)
time_moe/datasets/general_dataset.py:21
Method__init__
(self, name, init_val: float = 0.0)
run_eval.py:32
Method__init__
(self, model_path, device, context_length, prediction_length, **kwargs)
run_eval.py:54
Method__init__
( self, model_path: str = None, output_path: str = 'logs/time_moe',
time_moe/runner.py:18
Method__init__
(self, label_column: str = 'labels', loss_mask_column: str = 'loss_mask', *positional_args, **kwargs)
time_moe/trainer/hf_trainer.py:18
Method__init__
(self, data_folder, normalization_method=None)
time_moe/datasets/time_moe_dataset.py:13
Method__init__
(self, data_path)
time_moe/datasets/binary_dataset.py:14
Method__init__
(self, dataset: TimeSeriesDataset, context_length: int, prediction_length: int = 0, stride: int = None, **kwra
time_moe/datasets/time_moe_window_dataset.py:40
Method__init__
(self, dataset: TimeSeriesDataset, context_length: int, prediction_length: int = 0, shuffle:
time_moe/datasets/time_moe_window_dataset.py:98
Method__init__
(self, csv_path, context_length: int, prediction_length: int)
time_moe/datasets/benchmark_dataset.py:15
Method__init__
(self, data_path)
time_moe/datasets/general_dataset.py:14
Method__init__
( self, input_size: int = 1, hidden_size: int = 4096, intermed
time_moe/models/configuration_time_moe.py:9
Method__init__
(self, config: TimeMoeConfig)
time_moe/models/modeling_time_moe.py:177
Method__init__
(self, dim, max_position_embeddings=2048, base=10000, device=None)
time_moe/models/modeling_time_moe.py:193
Method__init__
(self, hidden_size, eps=1e-6)
time_moe/models/modeling_time_moe.py:230
Method__init__
(self, hidden_size: int, intermediate_size: int, hidden_act: str)
time_moe/models/modeling_time_moe.py:244
Method__init__
(self, config)
time_moe/models/modeling_time_moe.py:266
Method__init__
(self, config: TimeMoeConfig, layer_idx: Optional[int] = None)
time_moe/models/modeling_time_moe.py:346
Method__init__
(self, *args, **kwargs)
time_moe/models/modeling_time_moe.py:466
Method__init__
(self, config: TimeMoeConfig, layer_idx: int)
time_moe/models/modeling_time_moe.py:660
Method__init__
(self, config: TimeMoeConfig)
time_moe/models/modeling_time_moe.py:766
Method__init__
(self, hidden_size: int, horizon_length: int, input_size: int = 1)
time_moe/models/modeling_time_moe.py:918
Method__init__
(self, config: TimeMoeConfig)
time_moe/models/modeling_time_moe.py:941
Method__iter__
(self)
time_moe/datasets/ts_dataset.py:27
Method__iter__
(self)
time_moe/datasets/time_moe_window_dataset.py:72
Method__iter__
(self)
time_moe/datasets/benchmark_dataset.py:70
Method__iter__
(self)
time_moe/datasets/benchmark_dataset.py:107
Method__len__
(self)
time_moe/datasets/time_moe_dataset.py:62
Method__len__
(self)
time_moe/datasets/binary_dataset.py:42
Method__len__
(self)
time_moe/datasets/ts_dataset.py:8
Method__len__
(self)
time_moe/datasets/time_moe_window_dataset.py:69
Method__len__
(self)
time_moe/datasets/time_moe_window_dataset.py:152
Method__len__
(self)
time_moe/datasets/benchmark_dataset.py:67
Method__len__
(self)
time_moe/datasets/benchmark_dataset.py:104
Method__len__
(self)
time_moe/datasets/general_dataset.py:18
Method_calculate
(self, preds, labels, **kwargs)
run_eval.py:44
Method_calculate
(self, preds, labels, **kwargs)
run_eval.py:49
Function_get_cosine_schedule_with_warmup_and_min_lr_lambda
( current_step: int, *, num_warmup_steps: int, num_training_steps: int, num_cycles: float, min_lr_rati
time_moe/trainer/hf_trainer.py:68
Method_init_weights
(self, module)
time_moe/models/modeling_time_moe.py:746
next →1–100 of 134, ranked by callers