Module neuralops.config.experiment_config
Classes
class DatasetConfig (name: str, path: str, task_type: str, num_choices: int = 0, num_labels: int = 2)-
Expand source code
@dataclass class DatasetConfig: name: str path: str task_type: str # "mc" or "single" num_choices: int = 0 num_labels: int = 2DatasetConfig(name: str, path: str, task_type: str, num_choices: int = 0, num_labels: int = 2)
Instance variables
var name : str-
The type of the None singleton.
var num_choices : int-
The type of the None singleton.
var num_labels : int-
The type of the None singleton.
var path : str-
The type of the None singleton.
var task_type : str-
The type of the None singleton.
class ExperimentConfig (base_models: dict[str, str] = <factory>,
svd_ranks: list[int] = <factory>,
datasets: list[DatasetConfig] = <factory>,
min_samples: int = 10,
max_samples: int = 200,
batch_size: int = 4,
epochs: int = 1,
learning_rate: float = 2e-05,
max_length: int = 128,
val_split: float = 0.2,
seed: int = 42,
gradient_accumulation_steps: int = 1,
optimizer_type: str = 'adamw',
lr_scheduler_type: str = 'linear',
warmup_steps: int = 0,
weight_decay: float = 0.01,
mixed_precision: str = 'no',
gradient_checkpointing: bool = False,
max_grad_norm: float = 1.0,
save_checkpoint_interval: int = 10,
output_dir: str = './results',
plots_dir: str = './plots/comprehensive',
log_dir: str = './logs',
selected_models: list[str] = <factory>,
selected_datasets: list[str] = <factory>,
selected_ranks: list[int] = <factory>)-
Expand source code
@dataclass class ExperimentConfig: base_models: dict[str, str] = field(default_factory=lambda: {"bert": "bert-base-uncased"}) svd_ranks: list[int] = field(default_factory=lambda: [8, 16, 32]) datasets: list[DatasetConfig] = field(default_factory=list) min_samples: int = 10 max_samples: int = 200 batch_size: int = 4 epochs: int = 1 learning_rate: float = 2e-5 max_length: int = 128 val_split: float = 0.2 seed: int = 42 gradient_accumulation_steps: int = 1 # Advanced Training & Linear-Time Scalability Options optimizer_type: str = "adamw" # Options: adamw, sgd, adafactor lr_scheduler_type: str = "linear" # Options: linear, cosine, cosine_with_restarts warmup_steps: int = 0 weight_decay: float = 0.01 mixed_precision: str = "no" # Options: no, fp16, bf16 gradient_checkpointing: bool = ( False # Useful for extremely long sequences / linear time tracking ) max_grad_norm: float = 1.0 # Gradient clipping threshold save_checkpoint_interval: int = 10 output_dir: str = "./results" plots_dir: str = "./plots/comprehensive" log_dir: str = "./logs" selected_models: list[str] = field(default_factory=list) selected_datasets: list[str] = field(default_factory=list) selected_ranks: list[int] = field(default_factory=list)ExperimentConfig(base_models: dict[str, str] =
, svd_ranks: list[int] = , datasets: list[neuralops.config.experiment_config.DatasetConfig] = , min_samples: int = 10, max_samples: int = 200, batch_size: int = 4, epochs: int = 1, learning_rate: float = 2e-05, max_length: int = 128, val_split: float = 0.2, seed: int = 42, gradient_accumulation_steps: int = 1, optimizer_type: str = 'adamw', lr_scheduler_type: str = 'linear', warmup_steps: int = 0, weight_decay: float = 0.01, mixed_precision: str = 'no', gradient_checkpointing: bool = False, max_grad_norm: float = 1.0, save_checkpoint_interval: int = 10, output_dir: str = './results', plots_dir: str = './plots/comprehensive', log_dir: str = './logs', selected_models: list[str] = , selected_datasets: list[str] = , selected_ranks: list[int] = ) Instance variables
var base_models : dict[str, str]-
The type of the None singleton.
var batch_size : int-
The type of the None singleton.
var datasets : list[DatasetConfig]-
The type of the None singleton.
var epochs : int-
The type of the None singleton.
var gradient_accumulation_steps : int-
The type of the None singleton.
var gradient_checkpointing : bool-
The type of the None singleton.
var learning_rate : float-
The type of the None singleton.
var log_dir : str-
The type of the None singleton.
var lr_scheduler_type : str-
The type of the None singleton.
var max_grad_norm : float-
The type of the None singleton.
var max_length : int-
The type of the None singleton.
var max_samples : int-
The type of the None singleton.
var min_samples : int-
The type of the None singleton.
var mixed_precision : str-
The type of the None singleton.
var optimizer_type : str-
The type of the None singleton.
var output_dir : str-
The type of the None singleton.
var plots_dir : str-
The type of the None singleton.
var save_checkpoint_interval : int-
The type of the None singleton.
var seed : int-
The type of the None singleton.
var selected_datasets : list[str]-
The type of the None singleton.
var selected_models : list[str]-
The type of the None singleton.
var selected_ranks : list[int]-
The type of the None singleton.
var svd_ranks : list[int]-
The type of the None singleton.
var val_split : float-
The type of the None singleton.
var warmup_steps : int-
The type of the None singleton.
var weight_decay : float-
The type of the None singleton.