SYMBOL INDEX (3006 symbols across 331 files) FILE: examples/advanced/RL_and_SL_demo.py class SimpleRegularizationAuxTask (line 34) | class SimpleRegularizationAuxTask(AuxiliaryTask): class Options (line 49) | class Options(AuxiliaryTask.Options): method __init__ (line 61) | def __init__( method get_loss (line 75) | def get_loss(self, forward_pass: ForwardPass, y: Tensor = None) -> Loss: method on_task_switch (line 100) | def on_task_switch(self, task_id: int) -> None: class CustomizedBaselineModel (line 120) | class CustomizedBaselineModel(BaseModel): class HParams (line 122) | class HParams(BaseModel.HParams): method __init__ (line 130) | def __init__( class CustomMethod (line 149) | class CustomMethod(BaseMethod, target_setting=Setting): method __init__ (line 167) | def __init__( method create_model (line 181) | def create_model(self, setting: Setting) -> CustomizedBaselineModel: method configure (line 185) | def configure(self, setting: Setting): method fit (line 196) | def fit(self, train_env: Environment, valid_env: Environment): method add_argparse_args (line 207) | def add_argparse_args(cls, parser: ArgumentParser): method from_argparse_args (line 222) | def from_argparse_args(cls, args: Namespace): function demo_manual (line 232) | def demo_manual(): function demo_command_line (line 273) | def demo_command_line(): FILE: examples/advanced/ewc_in_rl.py class NormRegularizer (line 33) | class NormRegularizer(PolicyWrapper[Policy]): method __init__ (line 41) | def __init__(self: Policy, *args, reg_coefficient: float = 1.0, ewc_p_... method on_task_switch (line 51) | def on_task_switch(self: Policy, task_id: Optional[int], *args, **kwar... method get_loss (line 69) | def get_loss(self: Policy) -> Union[float, Tensor]: method after_zero_grad (line 77) | def after_zero_grad(self: Policy): method before_optimizer_step (line 88) | def before_optimizer_step(self: Policy): method ewc_loss (line 93) | def ewc_loss(self: Policy) -> Union[float, Tensor]: class EWCPolicy (line 114) | class EWCPolicy(NormRegularizer): method __init__ (line 119) | def __init__( method consolidate (line 132) | def consolidate(self, new_fims: List[PMatAbstract], task: int) -> None: method _consolidate_fims (line 149) | def _consolidate_fims( method on_task_switch (line 162) | def on_task_switch( method ewc_loss (line 215) | def ewc_loss(self: Policy) -> Union[float, Tensor]: class ExampleRegularizationMethod (line 239) | class ExampleRegularizationMethod(StableBaselines3Method): method create_model (line 261) | def create_model(self, train_env: gym.Env, valid_env: gym.Env) -> Base... method on_task_switch (line 272) | def on_task_switch(self, task_id: Optional[int]) -> None: class EWCExampleMethod (line 287) | class EWCExampleMethod(StableBaselines3Method): method create_model (line 300) | def create_model(self, train_env: gym.Env, valid_env: gym.Env) -> Base... method on_task_switch (line 311) | def on_task_switch(self, task_id: Optional[int]) -> None: FILE: examples/advanced/hat_demo.py class Masks (line 24) | class Masks(NamedTuple): class HatNet (line 34) | class HatNet(torch.nn.Module): method __init__ (line 48) | def __init__(self, image_space: Image, n_classes_per_task: Dict[int, i... method forward (line 96) | def forward(self, observations: TaskIncrementalSLSetting.Observations)... method mask (line 133) | def mask(self, t: Tensor, s_hat: float) -> Masks: method shared_step (line 141) | def shared_step( function compute_conv_output_size (line 192) | def compute_conv_output_size( class HatDemoMethod (line 199) | class HatDemoMethod(Method, target_setting=TaskIncrementalSLSetting): class HParams (line 209) | class HParams: method __init__ (line 221) | def __init__(self, hparams: HParams = None): method configure (line 228) | def configure(self, setting: TaskIncrementalSLSetting): method fit (line 252) | def fit(self, train_env: PassiveEnvironment, valid_env: PassiveEnviron... method get_actions (line 307) | def get_actions(self, observations: Observations, action_space: gym.Sp... method on_task_switch (line 315) | def on_task_switch(self, task_id: Optional[int]): method add_argparse_args (line 323) | def add_argparse_args(cls, parser: ArgumentParser) -> None: method from_argparse_args (line 329) | def from_argparse_args(cls, args: Namespace) -> "HatDemoMethod": FILE: examples/advanced/pnn/layers.py class PNNConvLayer (line 10) | class PNNConvLayer(nn.Module): method __init__ (line 11) | def __init__(self, col, depth, n_in, n_out, kernel_size=3): method forward (line 22) | def forward(self, inputs): class PNNLinearBlock (line 32) | class PNNLinearBlock(nn.Module): method __init__ (line 33) | def __init__(self, col: int, depth: int, n_in: int, n_out: int): method forward (line 41) | def forward(self, inputs): FILE: examples/advanced/pnn/model_rl.py class PnnA2CAgent (line 10) | class PnnA2CAgent(nn.Module): method __init__ (line 20) | def __init__(self, arch="mlp", hidden_size=256): method forward (line 38) | def forward(self, observations): method new_task (line 91) | def new_task(self, device, num_inputs, num_actions=5): method unfreeze_columns (line 131) | def unfreeze_columns(self): method freeze_columns (line 143) | def freeze_columns(self, skip=None): method parameters (line 164) | def parameters(self, task_id): method transfor_img (line 177) | def transfor_img(self, img): FILE: examples/advanced/pnn/model_sl.py class PnnClassifier (line 15) | class PnnClassifier(nn.Module): method __init__ (line 25) | def __init__(self, n_layers): method forward (line 35) | def forward(self, observations): method new_task (line 68) | def new_task(self, device, sizes: List[int]): method freeze_columns (line 87) | def freeze_columns(self, skip=None): method shared_step (line 102) | def shared_step( method parameters (line 153) | def parameters(self, task_id): FILE: examples/advanced/pnn/pnn_method.py class PnnMethod (line 36) | class PnnMethod(Method, target_setting=Setting): class HParams (line 48) | class HParams: method __init__ (line 64) | def __init__(self, hparams: HParams = None): method configure (line 72) | def configure(self, setting: Setting): method on_task_switch (line 154) | def on_task_switch(self, task_id: Optional[int]) -> None: method set_optimizer (line 178) | def set_optimizer(self): method get_actions (line 184) | def get_actions(self, observations: Observations, action_space: spaces... method fit (line 203) | def fit(self, train_env: Environment, valid_env: Environment): method fit_rl (line 215) | def fit_rl(self, train_env: gym.Env, valid_env: gym.Env): method fit_sl (line 291) | def fit_sl(self, train_env: PassiveEnvironment, valid_env: PassiveEnvi... method add_argparse_args (line 337) | def add_argparse_args(cls, parser: ArgumentParser) -> None: method from_argparse_args (line 341) | def from_argparse_args(cls, args: Namespace) -> "PnnMethod": function main_rl (line 347) | def main_rl(): function main_sl (line 380) | def main_sl(): FILE: examples/advanced/procgen_example.py class ProcGenConfig (line 22) | class ProcGenConfig: method make_env (line 69) | def make_env(self) -> gym.Env: class SequoiaProcGenAdapterWrapper (line 103) | class SequoiaProcGenAdapterWrapper(gym.Wrapper): method __init__ (line 112) | def __init__(self, env): method step (line 115) | def step(self, action): method seed (line 121) | def seed(self, seed: Optional[int] = None) -> List[int]: method render (line 126) | def render(self, mode: str = "rgb_array"): function make_procgen_setting (line 156) | def make_procgen_setting( function main_simple (line 253) | def main_simple(): function main_using_other_setting (line 262) | def main_using_other_setting(): FILE: examples/basic/base_method_demo.py function baseline_demo_simple (line 12) | def baseline_demo_simple(): function baseline_demo_command_line (line 33) | def baseline_demo_command_line(): FILE: examples/basic/pl_example.py class Model (line 31) | class Model(LightningModule): class HParams (line 38) | class HParams: method __init__ (line 50) | def __init__( method forward (line 107) | def forward(self, observations: ContinualSLSetting.Observations) -> Te... method training_step (line 129) | def training_step( method validation_step (line 134) | def validation_step( method test_step (line 139) | def test_step(self, batch: Tuple[Observations, Optional[Rewards]], bat... method shared_step (line 142) | def shared_step( method configure_optimizers (line 174) | def configure_optimizers(self): class ExampleMethod (line 178) | class ExampleMethod(Method, target_setting=ContinualSLSetting): method __init__ (line 194) | def __init__(self, hparams: Model.HParams = None): method configure (line 202) | def configure(self, setting: ContinualSLSetting): method fit (line 226) | def fit( method test (line 263) | def test(self, test_env: ContinualSLSetting.Environment): method get_actions (line 282) | def get_actions(self, observations: Observations, action_space: spaces... method on_task_switch (line 294) | def on_task_switch(self, task_id: Optional[int]) -> None: function main (line 310) | def main(): FILE: examples/basic/pl_example_packnet.py class ExamplePackNetMethod (line 15) | class ExamplePackNetMethod(ExampleMethod, target_setting=TaskIncremental... method __init__ (line 16) | def __init__(self, hparams: Model.HParams = None, packnet_hparams: Pac... method configure (line 26) | def configure(self, setting: TaskIncrementalSLSetting): method fit (line 37) | def fit( method on_task_switch (line 52) | def on_task_switch(self, task_id: Optional[int]): function main (line 67) | def main(): FILE: examples/basic/pl_example_test.py class TestPLExample (line 21) | class TestPLExample(MethodTests): method method (line 30) | def method(self, config: Config): method validate_results (line 34) | def validate_results( FILE: examples/basic/quick_demo.py class MyModel (line 28) | class MyModel(nn.Module): method __init__ (line 39) | def __init__( method forward (line 72) | def forward(self, observations: Observations) -> Tensor: method shared_step (line 80) | def shared_step( class DemoMethod (line 129) | class DemoMethod(Method, target_setting=DomainIncrementalSLSetting): class HParams (line 136) | class HParams: method __init__ (line 142) | def __init__(self, hparams: HParams = None): method configure (line 151) | def configure(self, setting: DomainIncrementalSLSetting): method fit (line 167) | def fit(self, train_env: PassiveEnvironment, valid_env: PassiveEnviron... method get_actions (line 215) | def get_actions(self, observations: Observations, action_space: gym.Sp... method add_argparse_args (line 224) | def add_argparse_args(cls, parser: ArgumentParser): method from_argparse_args (line 229) | def from_argparse_args(cls, args: Namespace): function demo_simple (line 235) | def demo_simple(): function demo_command_line (line 254) | def demo_command_line(): FILE: examples/basic/quick_demo_ewc.py class MyImprovedModel (line 23) | class MyImprovedModel(MyModel): method __init__ (line 26) | def __init__( method shared_step (line 47) | def shared_step(self, batch: Tuple[Observations, Rewards], *args, **kw... method on_task_switch (line 53) | def on_task_switch(self, task_id: int) -> None: method ewc_loss (line 70) | def ewc_loss(self) -> Tensor: class ImprovedDemoMethod (line 90) | class ImprovedDemoMethod(DemoMethod): class HParams (line 97) | class HParams(DemoMethod.HParams): method __init__ (line 105) | def __init__(self, hparams: HParams = None): method configure (line 108) | def configure(self, setting: DomainIncrementalSLSetting): method on_task_switch (line 122) | def on_task_switch(self, task_id: Optional[int]): function demo_ewc (line 126) | def demo_ewc(): FILE: examples/basic/quick_demo_test.py function test_quick_demo (line 13) | def test_quick_demo(monkeypatch): FILE: examples/clcomp21/a2c_example.py class ActorCritic (line 28) | class ActorCritic(nn.Module): method __init__ (line 29) | def __init__( method forward (line 95) | def forward(self, observation: RLSetting.Observations) -> Tuple[Tensor... class ExampleA2CMethod (line 125) | class ExampleA2CMethod(Method, target_setting=RLSetting): class HParams (line 133) | class HParams(HyperParameters): method __init__ (line 150) | def __init__(self, hparams: HParams = None, render: bool = False): method configure (line 157) | def configure(self, setting: RLSetting): method fit (line 169) | def fit(self, train_env: ActiveEnvironment, valid_env: ActiveEnvironme... method get_actions (line 290) | def get_actions( method on_task_switch (line 300) | def on_task_switch(self, task_id: Optional[int]) -> None: method add_argparse_args (line 314) | def add_argparse_args(cls, parser: ArgumentParser): method from_argparse_args (line 318) | def from_argparse_args(cls, args: Namespace): method get_search_space (line 322) | def get_search_space(self, setting: RLSetting) -> Dict: method adapt_to_new_hparams (line 325) | def adapt_to_new_hparams(self, new_hparams: Dict) -> None: FILE: examples/clcomp21/a2c_example_test.py function test_cartpole_state (line 14) | def test_cartpole_state(cartpole_state_setting: SettingProxy[RLSetting]): function test_incremental_cartpole_state (line 30) | def test_incremental_cartpole_state( function test_RL_track (line 46) | def test_RL_track(rl_track_setting: SettingProxy[IncrementalRLSetting]): FILE: examples/clcomp21/classifier.py class HParams (line 29) | class HParams(HyperParameters): class Classifier (line 43) | class Classifier(nn.Module): method __init__ (line 51) | def __init__( method create_output_head (line 74) | def create_output_head(self) -> nn.Module: method configure_optimizers (line 77) | def configure_optimizers(self) -> Optimizer: method create_encoder (line 84) | def create_encoder(self, image_space: Image) -> Tuple[nn.Module, int]: method forward (line 133) | def forward(self, observations: Observations) -> Tensor: method shared_step (line 142) | def shared_step( class ExampleMethod (line 191) | class ExampleMethod(Method, target_setting=ClassIncrementalSetting): method __init__ (line 199) | def __init__(self, hparams: HParams = None): method configure (line 206) | def configure(self, setting: ClassIncrementalSetting): method fit (line 219) | def fit(self, train_env: PassiveEnvironment, valid_env: PassiveEnviron... method get_actions (line 270) | def get_actions(self, observations: Observations, action_space: gym.Sp... method add_argparse_args (line 279) | def add_argparse_args(cls, parser: ArgumentParser): method from_argparse_args (line 284) | def from_argparse_args(cls, args: Namespace): FILE: examples/clcomp21/classifier_test.py function test_mnist (line 11) | def test_mnist(mnist_setting: SettingProxy[ClassIncrementalSetting]): function test_SL_track (line 24) | def test_SL_track(sl_track_setting: SettingProxy[ClassIncrementalSetting]): FILE: examples/clcomp21/conftest.py function mnist_setting (line 9) | def mnist_setting(): function task_incremental_mnist_setting (line 18) | def task_incremental_mnist_setting(): function fashion_mnist_setting (line 27) | def fashion_mnist_setting(): function sl_track_setting (line 36) | def sl_track_setting(): function cartpole_state_setting (line 49) | def cartpole_state_setting(): function incremental_cartpole_state_setting (line 61) | def incremental_cartpole_state_setting(): function rl_track_setting (line 73) | def rl_track_setting(tmp_path): FILE: examples/clcomp21/dummy_method.py class DummyMethod (line 13) | class DummyMethod(Method, target_setting=Setting): method __init__ (line 16) | def __init__(self): method configure (line 19) | def configure(self, setting: Setting): method fit (line 30) | def fit(self, train_env: Environment, valid_env: Environment): method get_actions (line 74) | def get_actions(self, observations: Observations, action_space: gym.Sp... FILE: examples/clcomp21/dummy_method_test.py function test_mnist (line 12) | def test_mnist(mnist_setting: SettingProxy[ClassIncrementalSetting]): function test_SL_track (line 25) | def test_SL_track(sl_track_setting: SettingProxy[ClassIncrementalSetting]): function test_RL_track (line 41) | def test_RL_track(rl_track_setting: SettingProxy[IncrementalRLSetting]): FILE: examples/clcomp21/multihead_classifier.py class MultiHeadClassifier (line 23) | class MultiHeadClassifier(Classifier): class HParams (line 25) | class HParams(Classifier.HParams): method __init__ (line 28) | def __init__( method configure_optimizers (line 46) | def configure_optimizers(self) -> Optimizer: method create_output_head (line 50) | def create_output_head(self) -> nn.Module: method get_or_create_output_head (line 53) | def get_or_create_output_head(self, task_id: int) -> nn.Module: method forward (line 70) | def forward(self, observations: Observations) -> Tensor: method split_forward_pass (line 128) | def split_forward_pass(self, observations: Observations) -> Tensor: method task_inference_forward_pass (line 184) | def task_inference_forward_pass(self, observations: Observations) -> T... method on_task_switch (line 267) | def on_task_switch(self, task_id: Optional[int]): class ExampleTaskInferenceMethod (line 275) | class ExampleTaskInferenceMethod(ExampleMethod): method __init__ (line 279) | def __init__(self, hparams: MultiHeadClassifier.HParams = None): method configure (line 283) | def configure(self, setting: ClassIncrementalSetting): method on_task_switch (line 300) | def on_task_switch(self, task_id: Optional[int]): method get_actions (line 303) | def get_actions(self, observations, action_space): FILE: examples/clcomp21/multihead_classifier_test.py function test_task_incremental_mnist (line 11) | def test_task_incremental_mnist( function test_mnist (line 27) | def test_mnist(mnist_setting: SettingProxy[ClassIncrementalSetting]): function test_SL_track (line 41) | def test_SL_track(sl_track_setting: SettingProxy[ClassIncrementalSetting]): FILE: examples/clcomp21/regularization_example.py class RegularizedClassifier (line 23) | class RegularizedClassifier(MultiHeadClassifier): class HParams (line 29) | class HParams(MultiHeadClassifier.HParams): method __init__ (line 45) | def __init__( method shared_step (line 66) | def shared_step(self, batch: Tuple[Observations, Rewards], *args, **kw... method on_task_switch (line 72) | def on_task_switch(self, task_id: Optional[int]) -> None: method ewc_loss (line 90) | def ewc_loss(self) -> Tensor: class ExampleRegMethod (line 110) | class ExampleRegMethod(ExampleTaskInferenceMethod): method __init__ (line 115) | def __init__(self, hparams: HParams = None): method configure (line 118) | def configure(self, setting: DomainIncrementalSLSetting): method on_task_switch (line 128) | def on_task_switch(self, task_id: Optional[int]): FILE: examples/clcomp21/regularization_example_test.py function test_mnist (line 11) | def test_mnist(mnist_setting: SettingProxy[ClassIncrementalSetting]): function test_SL_track (line 25) | def test_SL_track(sl_track_setting: SettingProxy[ClassIncrementalSetting]): FILE: examples/clcomp21/sb3_example.py class CustomPPOModel (line 16) | class CustomPPOModel(PPOModel): class HParams (line 18) | class HParams(PPOModel.HParams): class CustomPPOMethod (line 23) | class CustomPPOMethod(PPOMethod): method configure (line 28) | def configure(self, setting: ContinualRLSetting): method create_model (line 31) | def create_model(self, train_env: gym.Env, valid_env: gym.Env) -> PPOM... method fit (line 34) | def fit(self, train_env: gym.Env, valid_env: gym.Env): method get_actions (line 37) | def get_actions( method on_task_switch (line 45) | def on_task_switch(self, task_id: Optional[int]) -> None: method get_search_space (line 55) | def get_search_space(self, setting: ContinualRLSetting) -> Mapping[str... FILE: examples/clcomp21/sb3_example_test.py function test_cartpole_state (line 12) | def test_cartpole_state(cartpole_state_setting: SettingProxy[RLSetting]): function test_incremental_cartpole_state (line 25) | def test_incremental_cartpole_state( function test_RL_track (line 40) | def test_RL_track(rl_track_setting: SettingProxy[IncrementalRLSetting]): FILE: examples/demo_utils.py function demo_all_settings (line 12) | def demo_all_settings( function make_result_dataframe (line 77) | def make_result_dataframe(all_results): function compare_results (line 109) | def compare_results( function make_comparison_dataframe (line 135) | def make_comparison_dataframe( FILE: examples/prerequisites/dataclasses_example.py class Point (line 9) | class Point: class HParams (line 33) | class HParams: FILE: sequoia/_version.py function get_keywords (line 19) | def get_keywords(): class VersioneerConfig (line 32) | class VersioneerConfig: function get_config (line 36) | def get_config(): class NotThisMethod (line 50) | class NotThisMethod(Exception): function register_vcs_handler (line 58) | def register_vcs_handler(vcs, method): # decorator function run_command (line 71) | def run_command(commands, args, cwd=None, verbose=False, hide_stderr=Fal... function versions_from_parentdir (line 108) | def versions_from_parentdir(parentdir_prefix, root, verbose): function git_get_keywords (line 140) | def git_get_keywords(versionfile_abs): function git_versions_from_keywords (line 169) | def git_versions_from_keywords(keywords, tag_prefix, verbose): function git_pieces_from_vcs (line 235) | def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_comma... function plus_or_dot (line 325) | def plus_or_dot(pieces): function render_pep440 (line 332) | def render_pep440(pieces): function render_pep440_pre (line 356) | def render_pep440_pre(pieces): function render_pep440_post (line 372) | def render_pep440_post(pieces): function render_pep440_old (line 399) | def render_pep440_old(pieces): function render_git_describe (line 421) | def render_git_describe(pieces): function render_git_describe_long (line 441) | def render_git_describe_long(pieces): function render (line 461) | def render(pieces, style): function get_versions (line 499) | def get_versions(): FILE: sequoia/client/env_proxy.py class EnvironmentProxy (line 26) | class EnvironmentProxy(Environment[ObservationType, ActionType, RewardTy... method __init__ (line 27) | def __init__(self, env_fn, setting_type: Type[Setting]): method get_attribute (line 51) | def get_attribute(self, name: str, default: Any = MISSING) -> Any: method reset (line 58) | def reset(self) -> ObservationType: method __len__ (line 62) | def __len__(self) -> int: method step (line 65) | def step( method __iter__ (line 91) | def __iter__(self): method __next__ (line 94) | def __next__(self) -> ObservationType: method send (line 97) | def send(self, actions: ActionType): method close (line 110) | def close(self): method is_closed (line 114) | def is_closed(self) -> bool: method render (line 117) | def render(self, *args, **kwargs): method get_results (line 120) | def get_results(self) -> Results: method get_online_performance (line 123) | def get_online_performance(self) -> List[Metrics]: method get_average_online_performance (line 126) | def get_average_online_performance(self) -> Metrics: method __getattr__ (line 129) | def __getattr__(self, name: str): FILE: sequoia/client/env_proxy_test.py function wrap_type_with_proxy (line 30) | def wrap_type_with_proxy(env_type: Type[EnvType]) -> EnvType: class TestEnvironmentProxy (line 44) | class TestEnvironmentProxy(_TestEnvDataset, _TestPassiveEnvironment, _Te... function test_sanity_check (line 56) | def test_sanity_check(): function test_is_proxy_to (line 63) | def test_is_proxy_to(use_wrapper: bool): function test_issue_204 (line 101) | def test_issue_204(): function test_interaction_with_test_environment (line 191) | def test_interaction_with_test_environment(): FILE: sequoia/client/server.py function server (line 1) | def server(grpc_host: str, grpc_port: int): FILE: sequoia/client/setting_proxy.py class SettingProxy (line 35) | class SettingProxy(SettingABC, Generic[SettingType]): method __init__ (line 58) | def __init__( method observation_space (line 82) | def observation_space(self) -> gym.Space: method action_space (line 87) | def action_space(self) -> gym.Space: method reward_space (line 91) | def reward_space(self) -> gym.Space: method train_env (line 95) | def train_env(self) -> EnvironmentProxy: method val_env (line 99) | def val_env(self) -> EnvironmentProxy: method test_env (line 103) | def test_env(self) -> EnvironmentProxy: method test_env (line 109) | def test_env(self, value) -> None: method _temp_make_readable (line 114) | def _temp_make_readable(self, attribute: str) -> None: method config (line 119) | def config(self) -> Config: method config (line 123) | def config(self, value: Config) -> None: method prepare_data (line 126) | def prepare_data(self, *args, **kwargs): method setup (line 129) | def setup(self, stage: str = None): method get_name (line 132) | def get_name(self): method _is_readable (line 135) | def _is_readable(self, attribute: str) -> bool: method _is_writeable (line 147) | def _is_writeable(self, attribute: str) -> bool: method batch_size (line 160) | def batch_size(self) -> Optional[int]: method batch_size (line 164) | def batch_size(self, value: Optional[int]) -> None: method train_transforms (line 168) | def train_transforms(self) -> List[Callable]: method train_transforms (line 172) | def train_transforms(self, value: List[Callable]): method val_transforms (line 176) | def val_transforms(self) -> List[Callable]: method val_transforms (line 180) | def val_transforms(self, value: List[Callable]): method test_transforms (line 184) | def test_transforms(self) -> List[Callable]: method test_transforms (line 188) | def test_transforms(self, value: List[Callable]): method apply (line 191) | def apply(self, method: Method, config: Config = None) -> Results: method get_attribute (line 211) | def get_attribute(self, name: str) -> Any: method set_attribute (line 225) | def set_attribute(self, name: str, value: Any) -> None: method train_dataloader (line 228) | def train_dataloader(self, batch_size: int = None, num_workers: int = ... method val_dataloader (line 255) | def val_dataloader(self, batch_size: int = None, num_workers: int = No... method test_dataloader (line 280) | def test_dataloader(self, batch_size: int = None, num_workers: int = N... method __test_dataloader (line 296) | def __test_dataloader( method main_loop (line 315) | def main_loop(self, method: Method) -> Results: method test_loop (line 394) | def test_loop(self, method: Method) -> "IncrementalAssumption.Results": method __getattr__ (line 497) | def __getattr__(self, name: str): FILE: sequoia/client/setting_proxy_test.py function test_spaces_match (line 34) | def test_spaces_match(setting_type: Type[Setting]): function test_transforms_get_propagated (line 42) | def test_transforms_get_propagated(): class TestContinualSLSettingProxy (line 56) | class TestContinualSLSettingProxy(ContinualSLSettingTests): class TestContinualRLSettingProxy (line 60) | class TestContinualRLSettingProxy(ContinualRLSettingTests): function test_random_baseline (line 65) | def test_random_baseline(config): function test_random_baseline_rl (line 74) | def test_random_baseline_rl(): function test_random_baseline_SL_track (line 102) | def test_random_baseline_SL_track(): function test_baseline_SL_track (line 111) | def test_baseline_SL_track(config): function test_rl_track_setting_is_correct (line 136) | def test_rl_track_setting_is_correct(): function test_sl_track_setting_is_correct (line 184) | def test_sl_track_setting_is_correct(): FILE: sequoia/common/batch.py function hasmethod (line 48) | def hasmethod(obj: Any, method_name: str) -> bool: class Batch (line 53) | class Batch(ABC, Mapping[str, T]): method __init_subclass__ (line 157) | def __init_subclass__(cls, *args, **kwargs): method __post_init__ (line 166) | def __post_init__(self): method __iter__ (line 177) | def __iter__(self) -> Iterator[str]: method __len__ (line 181) | def __len__(self) -> int: method __eq__ (line 185) | def __eq__(self, other: Union["Batch", Any]) -> bool: method __getitem__ (line 201) | def __getitem__(self, index: Any) -> T: method _getitem_none (line 208) | def _getitem_none(self, index: None) -> "Batch": method _getitem_by_name (line 216) | def _getitem_by_name(self, index: str) -> Union[Tensor, Any]: method _getitem_by_index (line 220) | def _getitem_by_index(self, index: int) -> Union[Tensor, Any]: method _getitem_with_slice (line 224) | def _getitem_with_slice(self, index: slice) -> "Batch": method _ (line 234) | def _(self: B, index) -> B: method _getitem_with_array (line 239) | def _getitem_with_array(self, index: np.ndarray) -> B: method _getitem_with_tuple (line 248) | def _getitem_with_tuple(self, index: Tuple[Union[slice, Tensor, np.nda... method slice (line 300) | def slice(self: B, index: Union[int, slice, np.ndarray, Tensor]) -> B: method __setitem__ (line 325) | def __setitem__(self, index: Union[int, str], value: Any): method keys (line 341) | def keys(self) -> KeysView[str]: method values (line 344) | def values(self) -> Tuple[T, ...]: method items (line 347) | def items(self) -> Iterable[Tuple[str, T]]: method devices (line 352) | def devices(self) -> Dict[str, Union[Optional[torch.device], Dict]]: method device (line 363) | def device(self) -> Optional[torch.device]: method dtypes (line 392) | def dtypes(self) -> Dict[str, Union[Optional[torch.dtype], Dict]]: method dtype (line 403) | def dtype(self) -> Tuple[Optional[torch.dtype]]: method as_namedtuple (line 423) | def as_namedtuple(self) -> Tuple[T, ...]: method as_list_of_tuples (line 426) | def as_list_of_tuples(self) -> Iterable[Tuple[T, ...]]: method as_tuple (line 441) | def as_tuple(self) -> Tuple[T, ...]: method to (line 458) | def to(self, *args, **kwargs): method float (line 466) | def float(self, dtype=torch.float): method float32 (line 469) | def float32(self, dtype=torch.float32): method int (line 472) | def int(self, dtype=torch.int): method double (line 475) | def double(self, dtype=torch.double): method numpy (line 478) | def numpy(self): method detach (line 499) | def detach(self): method cpu (line 515) | def cpu(self, **kwargs): method cuda (line 526) | def cuda(self, device=None, **kwargs): method shapes (line 538) | def shapes(self) -> Dict[str, Union[torch.Size, Dict]]: method batch_size (line 549) | def batch_size(self) -> Optional[int]: method with_batch_dimension (line 579) | def with_batch_dimension(self: B) -> B: method remove_batch_dimension (line 602) | def remove_batch_dimension(self: B) -> B: method split (line 611) | def split(self: B) -> List[B]: method stack (line 620) | def stack(cls: Type[B], items: List[B]) -> B: method concatenate (line 629) | def concatenate(cls: Type[B], items: List[B], **kwargs) -> B: method torch (line 636) | def torch(self, device: Union[str, torch.device] = None, dtype: torch.... method _map (line 651) | def _map(self: B, func: Callable, *args, recursive: bool = True, **kwa... method _apply (line 670) | def _apply( function _replace_batch_items (line 689) | def _replace_batch_items(obj: Batch, **items) -> Batch: function _get_batch_slice (line 699) | def _get_batch_slice(value: Batch, indices: Sequence[int]) -> Batch: function set_batch_slice (line 709) | def set_batch_slice(target: Batch, indices: Sequence[int], values: Batch... FILE: sequoia/common/batch_test.py class Observations (line 19) | class Observations(Batch): class Actions (line 25) | class Actions(Batch): class RLActions (line 30) | class RLActions(Actions): class Rewards (line 35) | class Rewards(Batch): function test_batch_behaves_like_a_dict (line 51) | def test_batch_behaves_like_a_dict(batch_type, items_dict): function test_to (line 81) | def test_to(batch_type: Type[Batch], items_dict: Dict[str, Tensor]): function test_tuple_indexing (line 154) | def test_tuple_indexing( function test_masking (line 189) | def test_masking(): function test_newaxis (line 215) | def test_newaxis(): function test_single_index (line 231) | def test_single_index(): function test_remove_batch_dim (line 240) | def test_remove_batch_dim(): function test_remove_batch_dim_with_nested_objects (line 271) | def test_remove_batch_dim_with_nested_objects(): function test_split (line 301) | def test_split(): function test_stack (line 354) | def test_stack(items: List[Batch], expected: Batch): function test_stack_with_none_values (line 400) | def test_stack_with_none_values(items: List[Batch], expected: Batch): function test_concatenate (line 464) | def test_concatenate(items: List[Batch], expected: Batch): function test_convert_between_ndarrays_and_tensors (line 488) | def test_convert_between_ndarrays_and_tensors(numpy_batch: Batch, torch_... class ForwardPass (line 507) | class ForwardPass(Batch): function test_nesting (line 513) | def test_nesting(): function test_slicing_with_one_item (line 536) | def test_slicing_with_one_item(): FILE: sequoia/common/callbacks/knn_callback.py class KnnClassifierOptions (line 35) | class KnnClassifierOptions: class KnnCallback (line 47) | class KnnCallback(Callback): method __post_init__ (line 66) | def __post_init__(self): method on_train_start (line 72) | def on_train_start(self, trainer, pl_module): method setup (line 78) | def setup(self, trainer, pl_module, stage: str): method on_epoch_end (line 82) | def on_epoch_end(self, trainer: Trainer, pl_module: LightningModule): method log (line 110) | def log(self, loss_object: Loss): method get_dataloaders (line 114) | def get_dataloaders(self, model: LightningModule, mode: str) -> List[D... method evaluate_knn (line 126) | def evaluate_knn(self, model: LightningModule) -> Tuple[Loss, Loss]: function evaluate (line 239) | def evaluate( function get_hidden_codes_array (line 290) | def get_hidden_codes_array( function fit_knn (line 316) | def fit_knn( function get_knn_performance (line 340) | def get_knn_performance( FILE: sequoia/common/callbacks/vae_callback.py class SaveVaeSamplesCallback (line 17) | class SaveVaeSamplesCallback(Callback): method __post_init__ (line 24) | def __post_init__(self, *args, **kwargs): method setup (line 31) | def setup(self, trainer, pl_module, stage: str): method on_train_start (line 35) | def on_train_start(self, trainer, pl_module): method on_train_epoch_end (line 52) | def on_train_epoch_end(self, trainer: Trainer, pl_module: BaseModel): method reconstruct_samples (line 65) | def reconstruct_samples(self, data: Tensor): method generate_samples (line 85) | def generate_samples(self): FILE: sequoia/common/config/config.py class Config (line 27) | class Config(Serializable, Parseable): method __post_init__ (line 54) | def __post_init__(self): method __del__ (line 61) | def __del__(self): method get_display (line 65) | def get_display(self) -> Optional[Display]: method seed_everything (line 86) | def seed_everything(self) -> None: FILE: sequoia/common/config/wandb_config.py function patched_monitor (line 17) | def patched_monitor(): class WandbConfig (line 58) | class WandbConfig(Serializable): method log_dir (line 126) | def log_dir(self): method wandb_login (line 134) | def wandb_login(self) -> bool: method wandb_init_kwargs (line 156) | def wandb_init_kwargs(self) -> Dict: method wandb_init (line 179) | def wandb_init(self, config_dict: Dict = None) -> wandb.wandb_run.Run: method make_logger (line 217) | def make_logger(self, wandb_parent_dir: Path = None) -> WandbLogger: FILE: sequoia/common/gym_wrappers/action_limit.py class ActionCounter (line 13) | class ActionCounter(IterableWrapper): method __init__ (line 18) | def __init__(self, env: gym.Env): method step_count (line 22) | def step_count(self) -> int: method action_count (line 25) | def action_count(self) -> int: method step (line 28) | def step(self, action): class ActionLimit (line 34) | class ActionLimit(ActionCounter): method __init__ (line 42) | def __init__(self, env: gym.Env, max_steps: int): method max_steps (line 50) | def max_steps(self) -> int: method __len__ (line 53) | def __len__(self): method closed_error_message (line 56) | def closed_error_message(self) -> str: method step (line 59) | def step(self, action): FILE: sequoia/common/gym_wrappers/action_limit_test.py function test_basics (line 12) | def test_basics(): function test_EnvDataset_of_ActionLimit (line 17) | def test_EnvDataset_of_ActionLimit(): function test_ActionLimit_of_EnvDataset (line 51) | def test_ActionLimit_of_EnvDataset(): function test_delayed_EnvDataset_of_ActionLimit (line 86) | def test_delayed_EnvDataset_of_ActionLimit(): FILE: sequoia/common/gym_wrappers/add_done.py function add_done (line 24) | def add_done(observation: Any, done: Any) -> Any: function _add_done_to_array_obs (line 40) | def _add_done_to_array_obs(observation: T, done: bool) -> Dict[str, Unio... function _add_done_to_tuple_obs (line 46) | def _add_done_to_tuple_obs(observation: Tuple, done: bool) -> Tuple: function _add_done_to_dict_obs (line 51) | def _add_done_to_dict_obs(observation: Dict[K, V], done: bool) -> Dict[K... function add_done_to_space (line 58) | def add_done_to_space(observation: Space, done: Space) -> Space: function _add_done_to_box_space (line 74) | def _add_done_to_box_space(observation: Space, done: Space) -> spaces.Dict: function _add_done_to_tuple_space (line 83) | def _add_done_to_tuple_space(observation: spaces.Tuple, done: Space) -> ... function _add_done_to_dict_space (line 93) | def _add_done_to_dict_space(observation: spaces.Dict, done: Space) -> sp... class AddDoneToObservation (line 100) | class AddDoneToObservation(IterableWrapper): method __init__ (line 113) | def __init__(self, env: gym.Env, done_space: Space = None): method reset (line 124) | def reset(self, **kwargs): method step (line 132) | def step(self, action): FILE: sequoia/common/gym_wrappers/add_info.py function add_info (line 22) | def add_info(observation, info): function _add_info_to_array_obs (line 39) | def _add_info_to_array_obs(observation: np.ndarray, info: Info) -> Tuple... function _add_info_to_tuple_obs (line 44) | def _add_info_to_tuple_obs(observation: Tuple, info: Info) -> Tuple: function _add_info_to_dict_obs (line 49) | def _add_info_to_dict_obs(observation: Dict[K, V], info: Info) -> Dict[K... function add_info_to_space (line 56) | def add_info_to_space(observation: Space, info: Space) -> Space: function _add_info_to_box_space (line 66) | def _add_info_to_box_space(observation: spaces.Box, info: Space) -> spac... function _add_info_to_tuple_space (line 76) | def _add_info_to_tuple_space(observation: spaces.Tuple, info: Space) -> ... function _add_info_to_dict_space (line 86) | def _add_info_to_dict_space(observation: spaces.Dict, info: Space) -> sp... class AddInfoToObservation (line 93) | class AddInfoToObservation(IterableWrapper): method __init__ (line 101) | def __init__(self, env: gym.Env, info_space: spaces.Space = None): method reset (line 114) | def reset(self, **kwargs): method step (line 122) | def step(self, action): FILE: sequoia/common/gym_wrappers/convert_tensors.py function to_tensor (line 23) | def to_tensor(v, device: torch.device = None) -> Union[Tensor, Any]: function _ (line 43) | def _( function _ (line 53) | def _(v: Dict, device: torch.device = None) -> Dict: class ConvertToFromTensors (line 65) | class ConvertToFromTensors(IterableWrapper): method __init__ (line 81) | def __init__(self, env: gym.Env, device: Union[torch.device, str] = No... method reset (line 101) | def reset(self, *args, **kwargs): method observation (line 105) | def observation(self, observation): method action (line 108) | def action(self, action): method reward (line 117) | def reward(self, reward): method step (line 120) | def step(self, action): function supports_tensors (line 136) | def supports_tensors(space: S) -> bool: function has_tensor_support (line 141) | def has_tensor_support(space: S) -> bool: function _mark_supports_tensors (line 145) | def _mark_supports_tensors(space: S) -> None: function add_tensor_support (line 151) | def add_tensor_support(space: S, device: torch.device = None) -> S: function _ (line 187) | def _(space: Image, device: torch.device = None) -> Image: function _ (line 195) | def _(space: spaces.Dict, device: torch.device = None) -> spaces.Dict: function _ (line 205) | def _(space: TypedDictSpace, device: torch.device = None) -> TypedDictSp... function _ (line 215) | def _(space: Dict, device: torch.device = None) -> Dict: function _ (line 225) | def _(space: Dict, device: torch.device = None) -> Dict: function _ (line 236) | def _(space: spaces.Box, device: torch.device = None) -> spaces.Box: function _ (line 243) | def _(space: spaces.Discrete, device: torch.device = None) -> spaces.Box: function _ (line 250) | def _(space: spaces.MultiDiscrete, device: torch.device = None) -> space... FILE: sequoia/common/gym_wrappers/convert_tensors_test.py function test_convert_tensors_wrapper (line 26) | def test_convert_tensors_wrapper(device: Union[str, torch.device]): class Foo (line 55) | class Foo(Batch): function test_preserves_dtype_of_namedtuple_space (line 60) | def test_preserves_dtype_of_namedtuple_space(): function test_preserves_dtype_of_typeddict_space (line 71) | def test_preserves_dtype_of_typeddict_space(): FILE: sequoia/common/gym_wrappers/env_dataset.py class EnvDataset (line 24) | class EnvDataset( method __init__ (line 38) | def __init__( method reset_counters (line 97) | def reset_counters(self): method observation (line 103) | def observation(self, observation): method action (line 106) | def action(self, action): method reward (line 109) | def reward(self, reward): method step (line 112) | def step(self, action) -> StepResult: method __next__ (line 142) | def __next__( method send (line 191) | def send(self, action: ActionType) -> RewardType: method __iter__ (line 203) | def __iter__(self) -> Iterator[ObservationType]: method reached_step_limit (line 294) | def reached_step_limit(self) -> bool: method reached_episode_limit (line 300) | def reached_episode_limit(self) -> bool: method reached_episode_length_limit (line 306) | def reached_episode_length_limit(self) -> bool: method done_is_true (line 312) | def done_is_true(self) -> bool: method reset (line 340) | def reset(self, **kwargs) -> ObservationType: method close (line 348) | def close(self) -> None: method __add__ (line 365) | def __add__(self, other): FILE: sequoia/common/gym_wrappers/env_dataset_test.py class TestEnvDataset (line 17) | class TestEnvDataset: method dummy_env_fn (line 24) | def dummy_env_fn(self): method test_step_normally_works_fine (line 27) | def test_step_normally_works_fine(self, dummy_env_fn: Type[DummyEnviro... method test_iterating_with_send (line 57) | def test_iterating_with_send(self, dummy_env_fn: Type[DummyEnvironment]): method test_raise_error_when_missing_action (line 85) | def test_raise_error_when_missing_action(self, dummy_env_fn: Type[Dumm... method test_doesnt_raise_error_when_action_sent (line 95) | def test_doesnt_raise_error_when_action_sent(self, dummy_env_fn: Type[... method test_max_episodes (line 105) | def test_max_episodes(self): method test_max_steps (line 127) | def test_max_steps(self): method test_max_steps_per_episode (line 158) | def test_max_steps_per_episode(self): method test_not_setting_max_steps_per_episode_with_vector_env_raises_warning (line 178) | def test_not_setting_max_steps_per_episode_with_vector_env_raises_warn... method test_observation_wrapper_applies_to_yielded_objects (line 192) | def test_observation_wrapper_applies_to_yielded_objects(self): method test_iteration_with_more_than_one_wrapper (line 250) | def test_iteration_with_more_than_one_wrapper(self): FILE: sequoia/common/gym_wrappers/episode_limit.py class EpisodeCounter (line 18) | class EpisodeCounter(IterableWrapper): method __init__ (line 26) | def __init__(self, env: gym.Env): method episode_count (line 34) | def episode_count(self) -> int: method reset (line 37) | def reset(self): method step (line 61) | def step(self, action): class EpisodeLimit (line 76) | class EpisodeLimit(EpisodeCounter): method __init__ (line 84) | def __init__(self, env: gym.Env, max_episodes: int): method max_episodes (line 89) | def max_episodes(self) -> int: method closed_error_message (line 92) | def closed_error_message(self) -> str: method reset (line 101) | def reset(self): method __iter__ (line 126) | def __iter__(self): method step (line 129) | def step(self, action): FILE: sequoia/common/gym_wrappers/episode_limit_test.py function test_basics (line 15) | def test_basics(): function test_episode_limit_with_single_env (line 43) | def test_episode_limit_with_single_env(env_name: str): function test_episode_limit_with_single_env_dataset (line 84) | def test_episode_limit_with_single_env_dataset(env_name: str): function test_episode_limit_with_vectorized_env (line 115) | def test_episode_limit_with_vectorized_env(batch_size): function test_episode_limit_with_vectorized_env_dataset (line 164) | def test_episode_limit_with_vectorized_env_dataset(batch_size): function test_reset_vectorenv_with_unfinished_episodes_raises_warning (line 207) | def test_reset_vectorenv_with_unfinished_episodes_raises_warning(batch_s... FILE: sequoia/common/gym_wrappers/measure_performance.py class MeasurePerformanceWrapper (line 14) | class MeasurePerformanceWrapper(IterableWrapper[EnvType], Generic[EnvTyp... method __init__ (line 15) | def __init__(self, env: Environment): method get_online_performance (line 19) | def get_online_performance(self) -> Dict[int, List[MetricsType]]: method get_average_online_performance (line 29) | def get_average_online_performance(self) -> Optional[MetricsType]: FILE: sequoia/common/gym_wrappers/multi_task_environment.py function make_env_attributes_task (line 30) | def make_env_attributes_task( function add_task_labels (line 72) | def add_task_labels(observation: Any, task_labels: Any) -> Any: function _add_task_labels_to_single_obs (line 80) | def _add_task_labels_to_single_obs(observation: X, task_labels: T) -> Tu... function _add_task_labels_to_batch (line 92) | def _add_task_labels_to_batch(observation: Batch, task_labels: T) -> Batch: function _add_task_labels_to_space (line 100) | def _add_task_labels_to_space(observation: spaces.Space, task_labels: T)... function _add_task_labels_to_namedtuple (line 112) | def _add_task_labels_to_namedtuple( function _add_task_labels_to_tuple (line 123) | def _add_task_labels_to_tuple(observation: Tuple, task_labels: T) -> Tuple: function _add_task_labels_to_dict_space (line 128) | def _add_task_labels_to_dict_space(observation: spaces.Dict, task_labels... function _add_task_labels_to_typed_dict_space (line 136) | def _add_task_labels_to_typed_dict_space( function _add_task_labels_to_dict (line 149) | def _add_task_labels_to_dict(observation: Dict[str, V], task_labels: T) ... class MultiTaskEnvironment (line 157) | class MultiTaskEnvironment(MayCloseEarly): method __init__ (line 194) | def __init__( method current_task_id (line 300) | def current_task_id(self) -> int: method current_task_id (line 315) | def current_task_id(self, value: int) -> None: method set_on_task_switch_callback (line 318) | def set_on_task_switch_callback(self, callback: Callable[[int], None])... method on_task_switch (line 321) | def on_task_switch(self, task_id: int): method step (line 329) | def step(self, *args, **kwargs): method reset (line 358) | def reset(self, new_random_task: bool = None, **kwargs): method steps (line 394) | def steps(self) -> int: method steps (line 398) | def steps(self, value: int) -> None: method current_task (line 412) | def current_task(self) -> Dict[str, Any]: method current_task (line 439) | def current_task(self, task: Union[Dict[str, float], Sequence[float], ... method random_task (line 477) | def random_task(self) -> Dict: method update_task (line 512) | def update_task(self, values: Dict = None, **kwargs): method seed (line 532) | def seed(self, seed: Optional[int] = None) -> List[int]: method task_dict (line 538) | def task_dict(self, task_array: np.ndarray) -> Dict[str, float]: method task_schedule (line 545) | def task_schedule(self) -> Dict: method task_schedule (line 549) | def task_schedule(self, value: Dict[str, Any]): FILE: sequoia/common/gym_wrappers/multi_task_environment_test.py function test_task_schedule (line 20) | def test_task_schedule(): function test_multi_task (line 52) | def test_multi_task(environment_name: str): function test_monitor_env (line 72) | def test_monitor_env(environment_name): function test_update_task (line 106) | def test_update_task(): function test_add_task_dict_to_info (line 126) | def test_add_task_dict_to_info(): function test_add_task_id_to_obs (line 166) | def test_add_task_id_to_obs(): function test_starting_step_and_max_step (line 219) | def test_starting_step_and_max_step(): function test_task_id_is_added_even_when_no_known_task_schedule (line 284) | def test_task_id_is_added_even_when_no_known_task_schedule(): function test_task_schedule_monsterkong (line 315) | def test_task_schedule_monsterkong(): function test_task_schedule_with_callables (line 363) | def test_task_schedule_with_callables(): function test_random_task_on_each_episode (line 413) | def test_random_task_on_each_episode(): function test_random_task_on_each_episode_and_only_one_task_in_schedule (line 454) | def test_random_task_on_each_episode_and_only_one_task_in_schedule(): function env_fn_monsterkong (line 486) | def env_fn_monsterkong() -> gym.Env: function env_fn_cartpole (line 504) | def env_fn_cartpole() -> gym.Env: function test_task_sequence_is_reproducible (line 523) | def test_task_sequence_is_reproducible(env_id: str): function test_iteration (line 576) | def test_iteration(): FILE: sequoia/common/gym_wrappers/observation_limit.py class ObservationLimit (line 14) | class ObservationLimit(IterableWrapper): method __init__ (line 22) | def __init__(self, env: gym.Env, max_steps: int): method reset (line 29) | def reset(self): method is_closed (line 49) | def is_closed(self) -> bool: method step (line 52) | def step(self, action): method close (line 71) | def close(self): FILE: sequoia/common/gym_wrappers/observation_limit_test.py function test_step_limit_with_single_env (line 14) | def test_step_limit_with_single_env(env_name: str): function test_step_limit_with_single_env_dataset (line 40) | def test_step_limit_with_single_env_dataset(env_name: str): function test_step_limit_with_vectorized_env (line 71) | def test_step_limit_with_vectorized_env(batch_size): function test_step_limit_with_vectorized_env_partial_final_batch (line 99) | def test_step_limit_with_vectorized_env_partial_final_batch(batch_size): FILE: sequoia/common/gym_wrappers/pixel_observation.py class PixelObservationWrapper (line 13) | class PixelObservationWrapper(PixelObservationWrapper_): method __init__ (line 24) | def __init__(self, env: Union[str, gym.Env]): method step (line 41) | def step(self, *args, **kwargs): method reset (line 47) | def reset(self, *args, **kwargs): method render (line 52) | def render(self, mode: str = "human", **kwargs): method to_array (line 57) | def to_array(self, image) -> np.ndarray: class ImageObservations (line 70) | class ImageObservations(IterableWrapper): method __init__ (line 71) | def __init__(self, env: gym.Env): FILE: sequoia/common/gym_wrappers/pixel_observation_test.py function test_passing_string_to_constructor (line 10) | def test_passing_string_to_constructor(): function test_observation_space (line 15) | def test_observation_space(): function test_reset_gives_pixels (line 20) | def test_reset_gives_pixels(): function test_step_obs_is_pixels (line 27) | def test_step_obs_is_pixels(): function test_state_attribute_is_pixels (line 35) | def test_state_attribute_is_pixels(): function test_render_rgb_array (line 42) | def test_render_rgb_array(): function test_render_with_human_mode (line 54) | def test_render_with_human_mode(): function test_render_with_human_mode_with_env_dataset (line 66) | def test_render_with_human_mode_with_env_dataset(): FILE: sequoia/common/gym_wrappers/policy_env.py class Environment (line 27) | class Environment(gym.Env, Generic[ObservationType, ActionType, RewardTy... method step (line 28) | def step(self, action: ActionType) -> Tuple[ObservationType, RewardTyp... method reset (line 31) | def reset(self) -> ObservationType: class StateTransition (line 53) | class StateTransition(Batch, Generic[ObservationType, ActionType]): method state (line 62) | def state(self) -> ObservationType: method next_state (line 66) | def next_state(self) -> ObservationType: function default_dataset_item_creator (line 74) | def default_dataset_item_creator( class PolicyEnv (line 113) | class PolicyEnv(gym.Wrapper, IterableDataset, Iterable[DatasetItem]): method __init__ (line 128) | def __init__( method set_policy (line 146) | def set_policy(self, policy: Callable[[ObservationType, gym.Space], Ac... method step (line 150) | def step(self, action: Optional[Any] = None) -> StepResult: method close (line 168) | def close(self) -> None: method reset (line 174) | def reset(self, *args, **kwargs) -> None: method __iter__ (line 180) | def __iter__(self) -> Iterator[DatasetItem]: FILE: sequoia/common/gym_wrappers/policy_env_test.py function test_iterating_with_policy (line 8) | def test_iterating_with_policy(): FILE: sequoia/common/gym_wrappers/smooth_environment.py class SmoothTransitions (line 26) | class SmoothTransitions(MultiTaskEnvironment): method __init__ (line 51) | def __init__( method step (line 136) | def step(self, *args, **kwargs): method reset (line 142) | def reset(self, **kwargs): method current_task_id (line 149) | def current_task_id(self) -> Optional[int]: method task_array (line 156) | def task_array(self, task: Dict[str, float]) -> np.ndarray: method smooth_update (line 159) | def smooth_update(self) -> None: FILE: sequoia/common/gym_wrappers/smooth_environment_test.py function test_task_schedule (line 10) | def test_task_schedule(): function test_update_only_on_reset (line 64) | def test_update_only_on_reset(): function test_task_id_is_always_None (line 92) | def test_task_id_is_always_None(): FILE: sequoia/common/gym_wrappers/step_callback_wrapper.py class Callback (line 11) | class Callback(Callable[[int, gym.Env], None], ABC): method __call__ (line 13) | def __call__(self, step: int, env: gym.Env, step_results: Tuple) -> None: class StepCallback (line 17) | class StepCallback(Callback, ABC): method __init__ (line 18) | def __init__(self, step: int, func: Callable[[int, gym.Env, Tuple], No... method __call__ (line 22) | def __call__(self, step: int, env: gym.Env, step_results: Tuple) -> None: class PeriodicCallback (line 28) | class PeriodicCallback(Callback): method __init__ (line 29) | def __init__(self, period: int, offset: int = 0, func: Callable[[int, ... method __call__ (line 34) | def __call__(self, step: int, env: gym.Env, step_results: Tuple) -> None: class StepCallbackWrapper (line 40) | class StepCallbackWrapper(IterableWrapper): method __init__ (line 43) | def __init__( method add_callback (line 52) | def add_callback(self, callback: Union[Callback]) -> None: method add_step_callback (line 55) | def add_step_callback(self, step: int, callback: Callable[[int, gym.En... method add_periodic_callback (line 62) | def add_periodic_callback(self, period: int, callback: StepCallback, o... method step (line 70) | def step(self, action): FILE: sequoia/common/gym_wrappers/step_callback_wrapper_test.py function increment_i (line 10) | def increment_i(step: int, env: gym.Env, step_results: Tuple): function decrement_i (line 16) | def decrement_i(step: int, env: gym.Env, step_results: Tuple): function test_step_callback (line 22) | def test_step_callback(): function test_periodic_callback (line 40) | def test_periodic_callback(): FILE: sequoia/common/gym_wrappers/transform_wrappers.py class TransformObservation (line 22) | class TransformObservation(TransformObservation_, IterableWrapper): method __init__ (line 23) | def __init__(self, env: gym.Env, f: Union[Callable, Compose]): method __call__ (line 39) | def __call__(self, *args, **kwargs): method __iter__ (line 42) | def __iter__(self): class TransformReward (line 52) | class TransformReward(TransformReward_, IterableWrapper): method __init__ (line 53) | def __init__(self, env: gym.Env, f: Union[Callable, Compose]): class TransformAction (line 80) | class TransformAction(IterableWrapper): method __init__ (line 81) | def __init__(self, env: gym.Env, f: Callable[[Union[gym.Env, Space]], ... method step (line 93) | def step(self, action): method action (line 96) | def action(self, action): FILE: sequoia/common/gym_wrappers/transform_wrappers_test.py function test_compose_on_image_space (line 12) | def test_compose_on_image_space(): function test_move_wrapper_and_iteration (line 34) | def test_move_wrapper_and_iteration(): FILE: sequoia/common/gym_wrappers/utils.py function is_classic_control_env (line 54) | def is_classic_control_env(env: Union[str, gym.Env, Type[gym.Env]]) -> b... function is_proxy_to (line 108) | def is_proxy_to(env, env_type_or_types: Union[Type[gym.Env], Tuple[Type[... function is_atari_env (line 117) | def is_atari_env(env: Union[str, gym.Env]) -> bool: function get_env_class (line 198) | def get_env_class(env: Union[str, gym.Env, Type[gym.Env], Callable[[], g... function is_monsterkong_env (line 214) | def is_monsterkong_env(env: Union[str, gym.Env, Callable[[], gym.Env]]) ... class StepResult (line 237) | class StepResult(NamedTuple): function has_wrapper (line 244) | def has_wrapper( class MayCloseEarly (line 265) | class MayCloseEarly(gym.Wrapper, ABC): method __init__ (line 272) | def __init__(self, env: gym.Env): method is_closed (line 276) | def is_closed(self) -> bool: method closed_error_message (line 284) | def closed_error_message(self) -> str: method reset (line 293) | def reset(self, **kwargs): method step (line 300) | def step(self, action): method close (line 307) | def close(self) -> None: class IterableWrapper (line 319) | class IterableWrapper(MayCloseEarly, IterableDataset, Generic[EnvType], ... method __init__ (line 332) | def __init__(self, env: gym.Env): method is_vectorized (line 339) | def is_vectorized(self) -> bool: method __next__ (line 343) | def __next__(self): method observation (line 366) | def observation(self, observation): method action (line 370) | def action(self, action): method reward (line 373) | def reward(self, reward): method get_length (line 379) | def get_length(self) -> Optional[int]: method send (line 409) | def send(self, action): method __iter__ (line 446) | def __iter__(self) -> Iterator: class RenderEnvWrapper (line 583) | class RenderEnvWrapper(IterableWrapper): method __init__ (line 586) | def __init__(self, env: gym.Env, display: Any = None): method step (line 590) | def step(self, action): function tile_images (line 595) | def tile_images(img_nhwc): FILE: sequoia/common/gym_wrappers/utils_test.py function test_has_wrapper (line 27) | def test_has_wrapper(env, wrapper_type, result): FILE: sequoia/common/layers.py class Lambda (line 16) | class Lambda(nn.Module): method __init__ (line 17) | def __init__(self, func: Callable): method forward (line 21) | def forward(self, x): class Reshape (line 25) | class Reshape(nn.Module): method __init__ (line 26) | def __init__(self, target_shape: Union[List[int], Tuple[int, ...]]): method forward (line 30) | def forward(self, inputs): class ConvBlock (line 34) | class ConvBlock(nn.Module): method __init__ (line 35) | def __init__( method forward (line 53) | def forward(self, x): class DeConvBlock (line 60) | class DeConvBlock(nn.Module): method __init__ (line 71) | def __init__( method forward (line 106) | def forward(self, x): function n_output_features (line 118) | def n_output_features( class Conv2d (line 125) | class Conv2d(nn.Conv2d): method forward (line 127) | def forward(self, input: Union[Image, Tensor]) -> Union[Tensor, Image]: method _ (line 131) | def _(self, input: Image) -> Image: class MaxPool2d (line 167) | class MaxPool2d(nn.MaxPool2d): method forward (line 169) | def forward(self, input: Union[Image, Tensor]) -> Union[Tensor, Image]: method _ (line 173) | def _(self, input: Image) -> Image: class Sequential (line 205) | class Sequential(nn.Sequential): method forward (line 211) | def forward(self, input): FILE: sequoia/common/loss.py class Loss (line 67) | class Loss(Serializable, MappingABC): method __post_init__ (line 102) | def __post_init__( method __contains__ (line 137) | def __contains__(self, key: str) -> bool: method __getitem__ (line 142) | def __getitem__(self, key: str) -> Any: method __iter__ (line 147) | def __iter__(self) -> Iterable[str]: method __len__ (line 150) | def __len__(self) -> int: method total_loss (line 154) | def total_loss(self) -> Tensor: method requires_grad (line 158) | def requires_grad(self) -> bool: method backward (line 162) | def backward(self, *args, **kwargs): method metric (line 167) | def metric(self) -> Optional[Metrics]: method metric (line 176) | def metric(self, value: Metrics) -> None: method accuracy (line 188) | def accuracy(self) -> float: method mse (line 193) | def mse(self) -> Tensor: method __add__ (line 197) | def __add__(self, other: Union["Loss", Any]) -> "Loss": method __iadd__ (line 245) | def __iadd__(self, other: Union["Loss", Any]) -> "Loss": method __radd__ (line 276) | def __radd__(self, other: Any): method __mul__ (line 291) | def __mul__(self, factor: Union[float, Tensor]) -> "Loss": method __rmul__ (line 309) | def __rmul__(self, factor: Union[float, Tensor]) -> "Loss": method __truediv__ (line 313) | def __truediv__(self, coefficient: Union[float, Tensor]) -> "Loss": method unscaled_losses (line 317) | def unscaled_losses(self): method to_log_dict (line 324) | def to_log_dict(self, verbose: bool = False) -> Dict[str, Union[str, f... method to_pbar_message (line 370) | def to_pbar_message(self) -> Dict[str, float]: method clear_tensors (line 389) | def clear_tensors(self) -> None: method absorb (line 401) | def absorb(self, other: "Loss") -> None: method all_metrics (line 417) | def all_metrics(self) -> Dict[str, Metrics]: FILE: sequoia/common/loss_test.py function test_demo (line 7) | def test_demo(): function test_all_metrics (line 24) | def test_all_metrics(): function test_to_log_dict_order (line 35) | def test_to_log_dict_order(): FILE: sequoia/common/metrics/classification.py class ClassificationMetrics (line 39) | class ClassificationMetrics(Metrics): method __post_init__ (line 59) | def __post_init__( method objective_name (line 87) | def objective_name(self) -> str: method __add__ (line 90) | def __add__(self, other: "ClassificationMetrics") -> "ClassificationMe... method to_log_dict (line 113) | def to_log_dict(self, verbose=False): method to_pbar_message (line 127) | def to_pbar_message(self) -> Dict[str, Union[str, float]]: method detach (line 132) | def detach(self) -> "ClassificationMetrics": method to (line 140) | def to(self, device: Union[str, torch.device]) -> "ClassificationMetri... method objective (line 150) | def objective(self) -> float: FILE: sequoia/common/metrics/classification_test.py function test_classification_metrics_add_properly (line 8) | def test_classification_metrics_add_properly(): function test_metrics_from_tensors (line 55) | def test_metrics_from_tensors(): FILE: sequoia/common/metrics/get_metrics.py function to_optional_tensor (line 22) | def to_optional_tensor(x: Optional[Union[Tensor, np.ndarray, List]]) -> ... function get_metrics (line 28) | def get_metrics( FILE: sequoia/common/metrics/metrics.py class Metrics (line 19) | class Metrics(Serializable): method __post_init__ (line 26) | def __post_init__(self, **tensors): method __add__ (line 43) | def __add__(self, other): method __radd__ (line 48) | def __radd__(self, other): method __mul__ (line 58) | def __mul__(self, factor: Union[float, Tensor]) -> "Loss": method __rmul__ (line 63) | def __rmul__(self, factor: Union[float, Tensor]) -> "Loss": method __truediv__ (line 68) | def __truediv__(self, coefficient: Union[float, Tensor]) -> "Metrics": method to_log_dict (line 73) | def to_log_dict(self, verbose: bool = False) -> Dict: method to_pbar_message (line 104) | def to_pbar_message(self) -> Dict[str, Union[str, float]]: method numpy (line 107) | def numpy(self): method objective (line 120) | def objective(self) -> float: method objective_name (line 132) | def objective_name(self) -> str: FILE: sequoia/common/metrics/metrics_utils.py function get_confusion_matrix (line 10) | def get_confusion_matrix( function accuracy (line 59) | def accuracy(y_pred: Union[Tensor, np.ndarray], y: Union[Tensor, np.ndar... function get_accuracy (line 68) | def get_accuracy(confusion_matrix: Union[Tensor, np.ndarray]) -> float: function class_accuracy (line 77) | def class_accuracy(y_pred: Tensor, y: Tensor) -> Tensor: function get_class_accuracy (line 83) | def get_class_accuracy(confusion_matrix: Tensor) -> Tensor: FILE: sequoia/common/metrics/metrics_utils_test.py function test_accuracy (line 7) | def test_accuracy(): function test_per_class_accuracy_perfect (line 25) | def test_per_class_accuracy_perfect(): function test_per_class_accuracy_zero (line 47) | def test_per_class_accuracy_zero(): function test_confusion_matrix (line 69) | def test_confusion_matrix(): function test_per_class_accuracy_realistic (line 95) | def test_per_class_accuracy_realistic(): FILE: sequoia/common/metrics/regression.py class RegressionMetrics (line 24) | class RegressionMetrics(Metrics): method __post_init__ (line 35) | def __post_init__( method objective (line 55) | def objective(self) -> float: method __add__ (line 58) | def __add__(self, other: "RegressionMetrics") -> "RegressionMetrics": method to_pbar_message (line 81) | def to_pbar_message(self) -> Dict[str, Union[str, float]]: method to_log_dict (line 87) | def to_log_dict(self, verbose=False): method __mul__ (line 93) | def __mul__(self, factor: Union[float, Tensor]) -> "Loss": method __rmul__ (line 101) | def __rmul__(self, factor: Union[float, Tensor]) -> "Loss": method __truediv__ (line 106) | def __truediv__(self, coefficient: Union[float, Tensor]) -> "Regressio... method __lt__ (line 114) | def __lt__(self, other: Union["RegressionMetrics", Any]) -> bool: method __ge__ (line 119) | def __ge__(self, other: Union["RegressionMetrics", Any]) -> bool: FILE: sequoia/common/metrics/rl_metrics.py class EpisodeMetrics (line 8) | class EpisodeMetrics(Metrics): method n_episodes (line 21) | def n_episodes(self) -> int: method objective_name (line 25) | def objective_name(self) -> str: method mean_reward_per_step (line 36) | def mean_reward_per_step(self) -> float: method __add__ (line 39) | def __add__(self, other: Union["EpisodeMetrics", Any]): method total_reward (line 65) | def total_reward(self) -> float: method total_steps (line 69) | def total_steps(self) -> int: method to_pbar_message (line 72) | def to_pbar_message(self) -> Dict[str, Union[str, float]]: method objective (line 76) | def objective(self) -> float: method to_log_dict (line 79) | def to_log_dict(self, verbose: bool = False): method episodes (line 96) | def episodes(self) -> int: method mean_reward_per_episode (line 100) | def mean_reward_per_episode(self) -> float: class GradientUsageMetric (line 135) | class GradientUsageMetric(Metrics): method __post_init__ (line 144) | def __post_init__(self): method __add__ (line 149) | def __add__(self, other: Union["GradientUsageMetric", Any]) -> "Gradie... method to_pbar_message (line 157) | def to_pbar_message(self) -> Dict[str, Union[str, float]]: FILE: sequoia/common/replay.py class ReplayBuffer (line 22) | class ReplayBuffer(deque, Deque[T], Pickleable): method __init__ (line 29) | def __init__(self, capacity: int): method as_dataset (line 38) | def as_dataset(self) -> TensorDataset: method _push_and_sample (line 42) | def _push_and_sample(self, *values: T, size: int) -> List[T]: method _sample (line 64) | def _sample(self, size: int) -> List[T]: method full (line 71) | def full(self) -> bool: class UnlabeledReplayBuffer (line 75) | class UnlabeledReplayBuffer(ReplayBuffer[Tensor]): method sample_batch (line 76) | def sample_batch(self, size: int) -> Tensor: method push (line 80) | def push(self, x_batch: Tensor, y_batch: Tensor = None) -> None: method push_and_sample (line 83) | def push_and_sample(self, x_batch: Tensor, y_batch: Tensor = None, siz... class LabeledReplayBuffer (line 88) | class LabeledReplayBuffer(ReplayBuffer[Tuple[Tensor, Tensor]]): method sample (line 89) | def sample(self, size: int) -> Tuple[Tensor, Tensor]: method push (line 94) | def push(self, x_batch: Tensor, y_batch: Tensor) -> None: method push_and_sample (line 97) | def push_and_sample( method samples_per_class (line 105) | def samples_per_class(self) -> Dict[int, int]: class SemiSupervisedReplayBuffer (line 111) | class SemiSupervisedReplayBuffer(object): method __init__ (line 112) | def __init__(self, labeled_capacity: int, unlabeled_capacity: int = 0): method sample (line 133) | def sample(self, size: int) -> Tuple[Tensor, Tensor]: method sample_unlabeled (line 148) | def sample_unlabeled(self, size: int, take_from_labeled_buffer_first: ... method push_and_sample (line 205) | def push_and_sample(self, x: Tensor, y: Tensor, size: int = None) -> T... method push_and_sample_unlabeled (line 210) | def push_and_sample_unlabeled(self, x: Tensor, y: Tensor = None, size:... method clear (line 216) | def clear(self): class ReplayOptions (line 222) | class ReplayOptions(Serializable): method enabled (line 237) | def enabled(self) -> bool: FILE: sequoia/common/spaces/image.py function could_become_image (line 14) | def could_become_image(space: spaces.Space) -> bool: class Image (line 23) | class Image(spaces.Box, Space[T]): method __init__ (line 30) | def __init__( method channels (line 80) | def channels(self) -> int: method height (line 84) | def height(self) -> int: method width (line 88) | def width(self) -> int: method batch_size (line 92) | def batch_size(self) -> Optional[int]: method from_box (line 96) | def from_box(cls, box_space: spaces.Box): method wrap (line 100) | def wrap(cls, space: Union["Image", spaces.Box]): method channels_last (line 108) | def channels_last(self) -> bool: method __repr__ (line 111) | def __repr__(self): method sample (line 114) | def sample(self) -> T: class ImageTensorSpace (line 118) | class ImageTensorSpace(Image, TensorBox): method from_box (line 120) | def from_box(cls, box_space: TensorBox, device: torch.device = None): method __repr__ (line 124) | def __repr__(self): method sample (line 127) | def sample(self): function _batch_image_space (line 143) | def _batch_image_space(space: Image, n: int = 1) -> Union[Image, spaces.... FILE: sequoia/common/spaces/named_tuple.py class NamedTupleSpace (line 14) | class NamedTupleSpace(spaces.Tuple): method __init__ (line 28) | def __init__( method __getitem__ (line 61) | def __getitem__(self, index: Union[int, str]) -> Space: method __getattr__ (line 66) | def __getattr__(self, attr: str) -> Space: method __repr__ (line 73) | def __repr__(self): method _replace (line 83) | def _replace(self, **kwargs): method __eq__ (line 92) | def __eq__(self, other: Union["NamedTupleSpace", Any]) -> bool: method sample (line 95) | def sample(self): method contains (line 98) | def contains(self, x) -> bool: method keys (line 107) | def keys(self) -> List[str]: method values (line 110) | def values(self) -> List[Space]: method items (line 113) | def items(self) -> Iterable[Tuple[str, Space]]: function __eq__ (line 118) | def __eq__(self, other: Union["NamedTupleSpace", Any]) -> bool: function batch_namedtuple_space (line 133) | def batch_namedtuple_space(space: NamedTupleSpace, n: int = 1): function flatten_namedtuple_space_sample (line 140) | def flatten_namedtuple_space_sample(space: NamedTupleSpace, x: NamedTuple): FILE: sequoia/common/spaces/named_tuple_test.py function test_basic (line 14) | def test_basic(): class StateTransition (line 37) | class StateTransition(NamedTuple): function test_basic_with_dtype (line 43) | def test_basic_with_dtype(): function test_isinstance_namedtuple (line 66) | def test_isinstance_namedtuple(): function test_equals_tuple_space_with_same_items (line 77) | def test_equals_tuple_space_with_same_items(): function test_batch_objets_considered_valid_samples (line 98) | def test_batch_objets_considered_valid_samples(): function test_batch_space (line 127) | def test_batch_space(): FILE: sequoia/common/spaces/space.py class Space (line 9) | class Space(_Space, Generic[T]): method sample (line 10) | def sample(self) -> T: method __contains__ (line 13) | def __contains__(self, x: Union[T, Any]) -> bool: method contains (line 16) | def contains(self, v: Union[T, Any]) -> bool: FILE: sequoia/common/spaces/sparse.py class Sparse (line 28) | class Sparse(Space[Optional[T]]): method __init__ (line 37) | def __init__(self, base: Space[T], sparsity: float = 0.0): method sparsity (line 47) | def sparsity(self) -> float: method seed (line 53) | def seed(self, seed=None): method sample (line 57) | def sample(self) -> Optional[T]: method contains (line 68) | def contains(self, x: Union[Optional[T], Any]) -> bool: method __repr__ (line 75) | def __repr__(self): method __eq__ (line 78) | def __eq__(self, other: Any): method to_jsonable (line 83) | def to_jsonable(self, sample_n): method from_jsonable (line 92) | def from_jsonable(self, sample_n): function _is_singledispatch (line 110) | def _is_singledispatch(module_function): function register_sparse_variant (line 114) | def register_sparse_variant(module, module_fn_name: str): function flatdim_sparse (line 137) | def flatdim_sparse(space: Sparse) -> int: function flatten_sparse (line 142) | def flatten_sparse(space: Sparse[T], x: Optional[T]) -> Optional[np.ndar... function flatten_sparse_space (line 147) | def flatten_sparse_space(space: Sparse[T]) -> Optional[np.ndarray]: function unflatten_sparse (line 154) | def unflatten_sparse(space: Sparse[T], x: np.ndarray) -> Optional[T]: function create_empty_array_sparse (line 162) | def create_empty_array_sparse(space: Sparse, n=1, fn=np.zeros) -> np.nda... function create_shared_memory_for_sparse_space (line 167) | def create_shared_memory_for_sparse_space(space: Sparse, n: int = 1, ctx... function write_to_shared_memory (line 182) | def write_to_shared_memory( function read_from_shared_memory (line 213) | def read_from_shared_memory( function batch_sparse_space (line 237) | def batch_sparse_space(space: Sparse, n: int = 1) -> gym.Space: function concatenate_sparse_items (line 299) | def concatenate_sparse_items( function sparse_sample_to_tensor (line 330) | def sparse_sample_to_tensor( FILE: sequoia/common/spaces/sparse_test.py function equals (line 33) | def equals(value, expected) -> bool: function is_sparse (line 53) | def is_sparse(iterable: Iterable[bool]) -> bool: function test_sample (line 73) | def test_sample(base_space: gym.Space): function test_contains (line 91) | def test_contains(base_space: gym.Space, sparsity: float): function test_batching_works (line 101) | def test_batching_works(base_space: gym.Space, n: int = 3): function test_batching_works (line 116) | def test_batching_works(base_space: gym.Space, sparsity: float, n: int =... function test_change_doesnt_persist_after_import (line 157) | def test_change_doesnt_persist_after_import(): function test_change_persists_after_full_import (line 165) | def test_change_persists_after_full_import(): function test_flatdim (line 174) | def test_flatdim(base_space: gym.Space): function test_flatdim (line 184) | def test_flatdim(base_space: gym.Space): function test_seeding_works (line 198) | def test_seeding_works(base_space: gym.Space): function test_flatten (line 211) | def test_flatten(base_space: gym.Space): function test_equality (line 225) | def test_equality(base_space: gym.Space): FILE: sequoia/common/spaces/tensor_spaces.py function get_numpy_dtype_equivalent_to (line 29) | def get_numpy_dtype_equivalent_to(torch_dtype: torch.dtype) -> np.dtype: function get_torch_dtype_equivalent_to (line 43) | def get_torch_dtype_equivalent_to(numpy_dtype: np.dtype) -> torch.dtype: function is_numpy_dtype (line 61) | def is_numpy_dtype(dtype: Any) -> bool: function is_torch_dtype (line 65) | def is_torch_dtype(dtype: Any) -> bool: function supports_tensors (line 72) | def supports_tensors(space: gym.Space) -> bool: class TensorSpace (line 77) | class TensorSpace(gym.Space, ABC): method __init__ (line 82) | def __init__(self, *args, device: torch.device = None, **kwargs): class TensorBox (line 113) | class TensorBox(TensorSpace, spaces.Box): method __init__ (line 116) | def __init__(self, low, high, shape=None, dtype=np.float32, device: to... method sample (line 122) | def sample(self): method contains (line 128) | def contains(self, x: Union[list, np.ndarray, Tensor]) -> bool: method __repr__ (line 144) | def __repr__(self): method from_box (line 153) | def from_box(cls, box: spaces.Box, device: torch.device = None): class TensorDiscrete (line 163) | class TensorDiscrete(TensorSpace, spaces.Discrete): method contains (line 164) | def contains(self, v: Union[int, Tensor]) -> bool: method sample (line 169) | def sample(self): class TensorMultiDiscrete (line 176) | class TensorMultiDiscrete(TensorSpace, spaces.MultiDiscrete): method contains (line 177) | def contains(self, v: Tensor) -> bool: method sample (line 184) | def sample(self): function _batch_discrete_space (line 195) | def _batch_discrete_space(space: TensorDiscrete, n: int = 1) -> TensorMu... FILE: sequoia/common/spaces/tensor_spaces_test.py function test_tensor_box (line 10) | def test_tensor_box(np_dtype: np.dtype): FILE: sequoia/common/spaces/typed_dict.py class TypedDictSpace (line 44) | class TypedDictSpace(spaces.Dict, Space[M]): method __init__ (line 127) | def __init__(self, spaces: Mapping[str, Space] = None, dtype: Type[M] ... method keys (line 237) | def keys(self) -> Sequence[str]: method items (line 240) | def items(self) -> Iterable[Tuple[str, Space]]: method values (line 243) | def values(self) -> Sequence[Space]: method sample (line 246) | def sample(self) -> M: method __getattr__ (line 251) | def __getattr__(self, attr: str) -> Space: method __getitem__ (line 257) | def __getitem__(self, key: Union[str, int]) -> Space: method __len__ (line 266) | def __len__(self) -> int: method contains (line 272) | def contains(self, x: Union[M, Mapping[str, Space]]) -> bool: method __repr__ (line 295) | def __repr__(self) -> str: method __eq__ (line 303) | def __eq__(self, other): function _batch_typed_dict_space (line 310) | def _batch_typed_dict_space(space: TypedDictSpace, n: int = 1) -> spaces... function _concatenate_typed_dicts (line 318) | def _concatenate_typed_dicts( function _ (line 337) | def _(space: TypedDictSpace, sample: Union[T, Mapping]) -> T: function _ (line 347) | def _( FILE: sequoia/common/spaces/typed_dict_test.py function test_basic (line 15) | def test_basic(): function test_supports_dataclasses (line 36) | def test_supports_dataclasses(): class StateTransition (line 64) | class StateTransition(Mapping[str, T]): method __post_init__ (line 69) | def __post_init__(self): method __len__ (line 72) | def __len__(self) -> int: method __getitem__ (line 75) | def __getitem__(self, attr: str) -> T: method __iter__ (line 80) | def __iter__(self) -> Iterable[str]: function test_basic_with_dtype (line 84) | def test_basic_with_dtype(): function test_isinstance (line 106) | def test_isinstance(): function test_equals_dict_space_with_same_items (line 117) | def test_equals_dict_space_with_same_items(): function test_batch_objets_considered_valid_samples (line 136) | def test_batch_objets_considered_valid_samples(): function test_batch_space (line 165) | def test_batch_space(): function test_batch_space_preserves_dtype (line 180) | def test_batch_space_preserves_dtype(): class DummyDictEnv (line 241) | class DummyDictEnv(gym.Env): method __init__ (line 242) | def __init__(self): method reset (line 252) | def reset(self): method step (line 255) | def step(self, action): method seed (line 258) | def seed(self, seed=None): function test_vector_env (line 266) | def test_vector_env(): function test_object_with_extra_keys_fits (line 282) | def test_object_with_extra_keys_fits(): function test_order_of_keys_is_same_in_samples (line 303) | def test_order_of_keys_is_same_in_samples(): function test_debugging (line 316) | def test_debugging(): function test_equality (line 327) | def test_equality(): FILE: sequoia/common/task.py class Task (line 15) | class Task(Serializable): FILE: sequoia/common/transforms/channels.py function has_channels_last (line 22) | def has_channels_last(img_or_shape: Union[Img, Tuple[int, ...], spaces.B... function has_channels_first (line 30) | def has_channels_first(img_or_shape: Union[Img, Tuple[int, ...], spaces.... function channels_last_if_needed (line 43) | def channels_last_if_needed(x: Any) -> Any: function channels_first_if_needed (line 51) | def channels_first_if_needed(x: Any) -> Any: class NamedDimensions (line 59) | class NamedDimensions(Transform[Tensor, Tensor]): method __init__ (line 64) | def __init__(self, names: Iterable[str]): method __call__ (line 67) | def __call__(self, tensor: Tensor) -> Tensor: function three_channels (line 72) | def three_channels(x: Any) -> Any: function _ (line 87) | def _(x: Tensor) -> Tensor: function _ (line 116) | def _(x: np.ndarray) -> np.ndarray: function _ (line 139) | def _(x: spaces.Box) -> spaces.Box: function _ (line 145) | def _(x: Tuple[int, ...]) -> Tuple[int, ...]: function _three_channels (line 163) | def _three_channels(x: Any) -> Any: function _three_channels (line 172) | def _three_channels(x: Any) -> Any: function _three_channels (line 179) | def _three_channels(x: TypedDictSpace) -> TypedDictSpace: class ThreeChannels (line 187) | class ThreeChannels(Transform[Tensor, Tensor]): method __call__ (line 199) | def __call__(self, x: Tensor) -> Tensor: function channels_first (line 204) | def channels_first(x: Any) -> Any: function _ (line 215) | def _(x: Tensor) -> Tensor: function _ (line 228) | def _(x: Tuple[int, ...]) -> Tuple[int, ...]: function _ (line 238) | def _(x: spaces.Box) -> spaces.Box: function _ (line 248) | def _(x: Tuple[int, ...]) -> Tuple[int, ...]: function _ (line 257) | def _(x: spaces.Box) -> spaces.Box: class ChannelsFirst (line 266) | class ChannelsFirst(Transform[Union[np.ndarray, Tensor], Tensor]): method __call__ (line 274) | def __call__(self, x: Tensor) -> Tensor: method apply (line 278) | def apply(cls, x: Tensor) -> Tensor: class ChannelsFirstIfNeeded (line 308) | class ChannelsFirstIfNeeded(ChannelsFirst): method apply (line 312) | def apply(cls, x: Tensor) -> Tensor: function channels_last (line 325) | def channels_last(x: Any) -> Any: function _ (line 330) | def _(x: Tensor) -> Tensor: function _ (line 342) | def _(x: Tuple[int, ...]) -> Tuple[int, ...]: function _ (line 352) | def _(x: np.ndarray) -> np.ndarray: function _ (line 361) | def _(x: spaces.Box) -> spaces.Box: class ChannelsLast (line 370) | class ChannelsLast(Transform[Tensor, Tensor]): method __call__ (line 371) | def __call__(self, x: Tensor) -> Tensor: method apply (line 375) | def apply(cls, x: Tensor) -> Tensor: class ChannelsLastIfNeeded (line 380) | class ChannelsLastIfNeeded(ChannelsLast): method apply (line 384) | def apply(cls, x: Tensor) -> Tensor: FILE: sequoia/common/transforms/compose.py class Compose (line 15) | class Compose(List[T], ComposeBase, Transform[InputType, OutputType]): method __init__ (line 30) | def __init__(self, *args, **kwargs): method __call__ (line 34) | def __call__(self, img): FILE: sequoia/common/transforms/resize.py function resize (line 28) | def resize(x: Img, size: Tuple[int, ...], **kwargs) -> Img: function _ (line 34) | def _(x: Image.Image, size: Tuple[int, ...], **kwargs) -> Image.Image: function _resize_array_or_tensor (line 40) | def _resize_array_or_tensor(x: np.ndarray, size: Tuple[int, ...], **kwar... function _resize_namedtuple_space (line 69) | def _resize_namedtuple_space( function _resize_namedtuple (line 84) | def _resize_namedtuple(x: Dict, size: Tuple[int, ...], **kwargs) -> Dict: function _resize_typed_dict (line 97) | def _resize_typed_dict(x: TypedDictSpace, size: Tuple[int, ...], **kwarg... function _resize_image_shape (line 111) | def _resize_image_shape(x: Tuple[int, ...], size: Tuple[int, ...], **kwa... function _resize_space (line 136) | def _resize_space(x: spaces.Box, size: Tuple[int, ...], **kwargs) -> spa... class Resize (line 149) | class Resize(Resize_, Transform[Img, Img]): method __init__ (line 150) | def __init__(self, size: Tuple[int, ...], interpolation=InterpolationM... method __call__ (line 155) | def __call__(self, img): method forward (line 164) | def forward(self, img: Img) -> Img: FILE: sequoia/common/transforms/split_batch.py class SplitBatch (line 15) | class SplitBatch(Transform[Any, Tuple[ObservationType, RewardType]]): method __init__ (line 51) | def __init__(self, observation_type: Type[ObservationType], reward_typ... method __call__ (line 56) | def __call__(self, batch: Any) -> Tuple[ObservationType, RewardType]: function split_batch (line 60) | def split_batch( function n_fields (line 207) | def n_fields(batch_type: Type[Batch]) -> int: function n_required_fields (line 224) | def n_required_fields(batch_type: Type) -> int: FILE: sequoia/common/transforms/to_tensor.py function copy_if_negative_strides (line 31) | def copy_if_negative_strides(image: Img) -> Img: function image_to_tensor (line 52) | def image_to_tensor(image: Union[Img, Sequence[Img], gym.Space]) -> Unio... function _ (line 80) | def _(image: Union[Image, np.ndarray]) -> Tensor: function _list_of_images_to_tensor (line 110) | def _list_of_images_to_tensor(image: Sequence[Img]) -> Tensor: function _to_tensor_effect_on_image_shape (line 115) | def _to_tensor_effect_on_image_shape(image: Tuple[int, ...]) -> Tuple[in... function _ (line 125) | def _(image: spaces.Box) -> spaces.Box: function _ (line 144) | def _(space: Dict, device: torch.device = None) -> Dict: function _space_with_images_to_tensor (line 158) | def _space_with_images_to_tensor(space: Dict, device: torch.device = Non... function _space_with_images_to_tensor (line 170) | def _space_with_images_to_tensor( class ToTensor (line 211) | class ToTensor(ToTensor_, Transform): method __call__ (line 212) | def __call__(self, image): FILE: sequoia/common/transforms/transform.py class Transform (line 17) | class Transform(Generic[InputType, OutputType]): method __call__ (line 21) | def __call__(self, input: InputType) -> OutputType: method __call__ (line 25) | def __call__(self, input: Shape) -> Shape: method __call__ (line 29) | def __call__(self, input: Space) -> Space: method __call__ (line 33) | def __call__(self, input: Union[InputType, Space, Shape]) -> Union[Out... FILE: sequoia/common/transforms/transform_enum.py class Transforms (line 38) | class Transforms(Enum): method __call__ (line 60) | def __call__(self, x): method _missing_ (line 64) | def _missing_(cls, value: Any): method shape_change (line 74) | def shape_change(self, input_shape: Union[Tuple[int, ...], torch.Size]... method space_change (line 79) | def space_change(self, input_space: gym.Space) -> gym.Space: class Compose (line 88) | class Compose(List[T], ComposeBase): method __init__ (line 112) | def __init__(self, *args, **kwargs): function encode_transforms (line 133) | def encode_transforms(v: Transforms) -> str: function decode_transforms (line 138) | def decode_transforms(v: str) -> Transforms: FILE: sequoia/common/transforms/transforms_test.py function test_transform (line 68) | def test_transform(transform: Transforms, input_shape, output_shape): function test_to_tensor (line 103) | def test_to_tensor(transform: Transforms, input_shape, output_shape): function test_applying_transforms_on_weird_input_raises_error (line 123) | def test_applying_transforms_on_weird_input_raises_error( function test_compose_applied_on_shape (line 137) | def test_compose_applied_on_shape(): function test_channels_first_transform_on_gym_env (line 152) | def test_channels_first_transform_on_gym_env(): function test_preserves_device_when_possible (line 171) | def test_preserves_device_when_possible(): FILE: sequoia/common/transforms/utils.py function is_image (line 11) | def is_image(v: Any) -> bool: FILE: sequoia/conftest.py function xfail_param (line 42) | def xfail_param(*args, reason: str): function skip_param (line 46) | def skip_param(*args, reason: str): function skipif_param (line 50) | def skipif_param(condition, *args, reason: str): function add_np (line 55) | def add_np(doctest_namespace): function trainer_config (line 60) | def trainer_config(tmp_path_factory): function config (line 72) | def config(tmp_path: Path): function session_config (line 80) | def session_config(tmp_path_factory: Path): function id_fn (line 86) | def id_fn(params: Any) -> str: function get_all_dataset_names (line 103) | def get_all_dataset_names(method_class: Type[Method] = None) -> List[str]: function get_dataset_params (line 114) | def get_dataset_params( function pytest_addoption (line 134) | def pytest_addoption(parser): function slow_param (line 145) | def slow_param(*args): function find_class_under_test (line 150) | def find_class_under_test( function parametrize_test_datasets (line 174) | def parametrize_test_datasets(metafunc): function pytest_generate_tests (line 232) | def pytest_generate_tests(metafunc): class DummyEnvironment (line 240) | class DummyEnvironment(gym.Env): method __init__ (line 250) | def __init__(self, start: int = 0, target: int = 5, max_value: int = N... method step (line 266) | def step(self, action: int): method reset (line 281) | def reset(self): method seed (line 286) | def seed(self, seed: Optional[int]) -> List[int]: function param_requires_monsterkong (line 298) | def param_requires_monsterkong(*args): function param_requires_atari_py (line 311) | def param_requires_atari_py(*args): function param_requires_mtenv (line 322) | def param_requires_mtenv(*args): function param_requires_metaworld (line 336) | def param_requires_metaworld(*args): function param_requires_mujoco (line 349) | def param_requires_mujoco(*args): function param_requires_pyglet (line 370) | def param_requires_pyglet(*args): FILE: sequoia/experiments/experiment.py function get_method_names (line 26) | def get_method_names() -> Dict[str, Type[Method]]: class Experiment (line 32) | class Experiment(Parseable, Serializable): method __post_init__ (line 65) | def __post_init__(self): method run_experiment (line 170) | def run_experiment( method launch (line 221) | def launch( method main (line 270) | def main( function launch_batch_of_runs (line 326) | def launch_batch_of_runs( function parse_setting_and_method_instances (line 407) | def parse_setting_and_method_instances( function get_class_with_name (line 440) | def get_class_with_name( function check_has_descendants (line 464) | def check_has_descendants(potential_classes: List[Type[Method]]) -> List... function main (line 481) | def main(): FILE: sequoia/experiments/experiment_test.py function test_no_collisions_in_method_names (line 24) | def test_no_collisions_in_method_names(): function test_no_collisions_in_setting_names (line 29) | def test_no_collisions_in_setting_names(): function test_applicable_methods (line 33) | def test_applicable_methods(): function mock_apply (line 40) | def mock_apply(self: Setting, method: Method, config: Config) -> Results: function set_argv_for_debug (line 51) | def set_argv_for_debug(monkeypatch): function method_type (line 56) | def method_type(request, monkeypatch, set_argv_for_debug): function setting_type (line 62) | def setting_type(request, monkeypatch, set_argv_for_debug): function test_experiment_from_args (line 70) | def test_experiment_from_args( function test_launch_experiment_with_constructor (line 90) | def test_launch_experiment_with_constructor( function test_none_setting (line 105) | def test_none_setting(method_type: Optional[Type[Method]], tmp_path: Pat... function test_none_method (line 124) | def test_none_method(setting_type: Optional[Type[Setting]]): FILE: sequoia/experiments/hpo_sweep.py class HPOSweep (line 16) | class HPOSweep(Experiment): method __post_init__ (line 44) | def __post_init__(self): method launch (line 51) | def launch(self, argv: Union[str, List[str]] = None, strict_args: bool... method main (line 99) | def main( function main (line 140) | def main(): FILE: sequoia/experiments/hpo_sweep_test.py class MockResults (line 19) | class MockResults(Results): method __init__ (line 20) | def __init__(self, hparams): method objective (line 25) | def objective(self) -> float: method make_plots (line 28) | def make_plots(self): method to_log_dict (line 31) | def to_log_dict(self, verbose: bool = False): method summary (line 39) | def summary(self): function mock_apply (line 43) | def mock_apply(self: Setting, method: Method, config: Config = None) -> ... function set_argv_for_debug (line 56) | def set_argv_for_debug(monkeypatch): function method_type (line 61) | def method_type(request, monkeypatch, set_argv_for_debug): function setting_type (line 67) | def setting_type(request, monkeypatch, set_argv_for_debug): function test_launch_sweep_with_constructor (line 78) | def test_launch_sweep_with_constructor( FILE: sequoia/main.py function main (line 26) | def main(): function add_run_command (line 79) | def add_run_command(command_subparsers: _SubParsersAction) -> None: function run (line 92) | def run(setting: Setting, method: Method, config: Config) -> Results: class SweepConfig (line 111) | class SweepConfig(Config): function sweep (line 135) | def sweep(setting: Setting, method: Method, config: SweepConfig) -> Sett... function add_sweep_command (line 168) | def add_sweep_command(command_subparsers: _SubParsersAction) -> None: function add_info_command (line 180) | def add_info_command(command_subparsers: _SubParsersAction) -> None: function info (line 221) | def info(component: Union[Type[Setting], Type[Method]] = None) -> None: function get_help (line 247) | def get_help(component: Type[Setting]) -> str: function add_args_for_settings_and_methods (line 276) | def add_args_for_settings_and_methods(command_subparser: ArgumentParser): FILE: sequoia/methods/__init__.py function register_method (line 59) | def register_method( function get_external_methods (line 108) | def get_external_methods() -> Dict[str, Type[Method]]: function add_external_methods (line 204) | def add_external_methods(all_methods: List[Type[Method]]) -> List[Type[M... function get_all_methods (line 212) | def get_all_methods() -> List[Type[Method]]: FILE: sequoia/methods/aux_tasks/auxiliary_task.py class AuxiliaryTask (line 17) | class AuxiliaryTask(nn.Module): class Options (line 40) | class Options(HyperParameters): method __init__ (line 46) | def __init__(self, *args, options: Options = None, name: str = None, *... method encode (line 77) | def encode(self, x: Tensor) -> Tensor: method logits (line 81) | def logits(self, h_x: Tensor) -> Tensor: method get_loss (line 85) | def get_loss(self, forward_pass: Dict[str, Tensor], y: Tensor = None) ... method coefficient (line 118) | def coefficient(self) -> float: method coefficient (line 122) | def coefficient(self, value: float) -> None: method enable (line 129) | def enable(self) -> None: method disable (line 138) | def disable(self) -> None: method enabled (line 145) | def enabled(self) -> bool: method disabled (line 149) | def disabled(self) -> bool: method on_task_switch (line 152) | def on_task_switch(self, task_id: Optional[int]) -> None: method model (line 156) | def model(self) -> LightningModule: method set_model (line 160) | def set_model(model: "Model") -> None: method shared_modules (line 163) | def shared_modules(self) -> Dict[str, nn.Module]: FILE: sequoia/methods/aux_tasks/ewc.py class EWCTask (line 35) | class EWCTask(AuxiliaryTask): class Options (line 58) | class Options(AuxiliaryTask.Options): method __init__ (line 76) | def __init__(self, *args, name: str = None, options: "EWCTask.Options"... method get_loss (line 108) | def get_loss(self, forward_pass: ForwardPass, y: Tensor = None) -> Loss: method on_task_switch (line 127) | def on_task_switch(self, task_id: Optional[int]): method update_anchor_weights (line 172) | def update_anchor_weights(self, new_task_id: int) -> None: method _ignoring_task_boundaries (line 257) | def _ignoring_task_boundaries(self): method consolidate (line 263) | def consolidate(self, new_fims: List[PMatAbstract], task: Optional[int... method get_current_model_weights (line 306) | def get_current_model_weights(self) -> PVector: FILE: sequoia/methods/aux_tasks/reconstruction/ae.py class AEReconstructionTask (line 14) | class AEReconstructionTask(AuxiliaryTask): method __init__ (line 24) | def __init__(self, coefficient: float = None, options: AuxiliaryTask.O... method create_decoder (line 34) | def create_decoder(self, input_shape: Union[torch.Size, Tuple[int, ...... method get_loss (line 49) | def get_loss(self, forward_pass: Dict[str, Tensor], y: Tensor = None) ... method forward (line 65) | def forward(self, h_x: Tensor) -> Tensor: # type: ignore method reconstruct (line 70) | def reconstruct(self, x: Tensor) -> Tensor: method reconstruction_loss (line 75) | def reconstruction_loss(self, recon_x: Tensor, x: Tensor) -> Tensor: FILE: sequoia/methods/aux_tasks/reconstruction/decoder_for_dataset.py function get_decoder_class_for_dataset (line 16) | def get_decoder_class_for_dataset(input_shape: Union[Tuple[int, int, int... FILE: sequoia/methods/aux_tasks/reconstruction/decoders.py class Decoder (line 9) | class Decoder(nn.Sequential, ABC): class MnistDecoder (line 16) | class MnistDecoder(Decoder): method __init__ (line 19) | def __init__(self, code_size: int, out_channels: int = 3): class CifarDecoder (line 38) | class CifarDecoder(Decoder): method __init__ (line 41) | def __init__(self, code_size: int): class ImageNetDecoder (line 55) | class ImageNetDecoder(Decoder): method __init__ (line 58) | def __init__(self, code_size: int): FILE: sequoia/methods/aux_tasks/reconstruction/vae.py class VAEReconstructionTask (line 14) | class VAEReconstructionTask(AEReconstructionTask): class Options (line 25) | class Options(AEReconstructionTask.Options): method __init__ (line 31) | def __init__(self, coefficient: float = None, options: "VAEReconstruct... method forward (line 43) | def forward(self, h_x: Tensor) -> Tensor: # type: ignore method reparameterize (line 50) | def reparameterize(self, mu: Tensor, logvar: Tensor) -> Tensor: method get_loss (line 56) | def get_loss(self, forward_pass: Dict[str, Tensor], y: Tensor = None) ... method generate (line 71) | def generate(self, z: Tensor) -> Tensor: method kl_divergence_loss (line 76) | def kl_divergence_loss(mu: Tensor, logvar: Tensor) -> Tensor: FILE: sequoia/methods/aux_tasks/transformation_based/bases.py function wrap_pil_transform (line 19) | def wrap_pil_transform(function: Callable): class TransformationBasedTask (line 32) | class TransformationBasedTask(AuxiliaryTask): class Options (line 46) | class Options(AuxiliaryTask.Options): method __init__ (line 53) | def __init__( method get_loss (line 101) | def get_loss(self, x: Tensor, h_x: Tensor, y_pred: Tensor = None, y: T... method get_loss_for_arg (line 124) | def get_loss_for_arg(self, x: Tensor, h_x: Tensor, fn_arg: Any, alpha:... class ClassifyTransformationTask (line 156) | class ClassifyTransformationTask(TransformationBasedTask): method __init__ (line 166) | def __init__( method get_loss (line 182) | def get_loss(self, x: Tensor, h_x: Tensor, y_pred: Tensor = None, y: T... class RegressTransformationTask (line 188) | class RegressTransformationTask(TransformationBasedTask): method __init__ (line 200) | def __init__( method get_function_args (line 240) | def get_function_args(self) -> Tensor: method get_loss (line 247) | def get_loss(self, x: Tensor, h_x: Tensor, y_pred: Tensor = None, y: T... class ScaleToRange (line 256) | class ScaleToRange(nn.Module): method __init__ (line 257) | def __init__(self, arg_min: float, arg_amp: float): method forward (line 262) | def forward(self, x: Tensor) -> Tensor: FILE: sequoia/methods/aux_tasks/transformation_based/rotation.py function rotate (line 8) | def rotate(x: Tensor, angle: int) -> Tensor: class RotationTask (line 55) | class RotationTask(ClassifyTransformationTask): class Options (line 57) | class Options(ClassifyTransformationTask.Options): method __init__ (line 65) | def __init__(self, name="rotation", options: "RotationTask.Options" = ... FILE: sequoia/methods/avalanche_methods/agem.py class AGEMMethod (line 22) | class AGEMMethod(AvalancheMethod[AGEM]): FILE: sequoia/methods/avalanche_methods/agem_test.py class TestAGEMMethod (line 12) | class TestAGEMMethod(_TestAvalancheMethod): FILE: sequoia/methods/avalanche_methods/ar1.py class AR1Method (line 19) | class AR1Method(AvalancheMethod[AR1]): FILE: sequoia/methods/avalanche_methods/ar1_test.py class TestAR1Method (line 22) | class TestAR1Method(_TestAvalancheMethod): method test_short_task_incremental_setting (line 44) | def test_short_task_incremental_setting( FILE: sequoia/methods/avalanche_methods/base.py class WandBLogger (line 54) | class WandBLogger(_WandBLogger): method import_wandb (line 64) | def import_wandb(self): method args_parse (line 71) | def args_parse(self): method before_run (line 76) | def before_run(self): class AvalancheMethod (line 88) | class AvalancheMethod( method __post_init__ (line 163) | def __post_init__(self): method configure (line 171) | def configure(self, setting: ClassIncrementalSetting) -> None: method create_cl_strategy (line 236) | def create_cl_strategy(self, setting: ClassIncrementalSetting) -> Stra... method create_model (line 247) | def create_model(self, setting: ClassIncrementalSetting) -> Module: method make_optimizer (line 305) | def make_optimizer(self) -> Optimizer: method fit (line 316) | def fit(self, train_env: PassiveEnvironment, valid_env: PassiveEnviron... method get_actions (line 321) | def get_actions( method set_testing (line 342) | def set_testing(self): method on_task_switch (line 346) | def on_task_switch(self, task_id: Optional[int]) -> None: method get_search_space (line 367) | def get_search_space(self, setting: ClassIncrementalSetting): method adapt_to_new_hparams (line 370) | def adapt_to_new_hparams(self, new_hparams: Dict): method environment_to_experience (line 376) | def environment_to_experience(self, env: PassiveEnvironment, setting: ... function test_epoch (line 450) | def test_epoch(strategy, test_env: ContinualSLTestEnvironment, **kwargs): function test_epoch_gym_env (line 469) | def test_epoch_gym_env(strategy: BaseStrategy, test_env: ContinualSLTest... FILE: sequoia/methods/avalanche_methods/base_test.py class _TestAvalancheMethod (line 22) | class _TestAvalancheMethod(MethodTests): method method (line 39) | def method(cls, config: Config, request) -> AvalancheMethod: method test_hparams_have_same_defaults_as_in_avalanche (line 44) | def test_hparams_have_same_defaults_as_in_avalanche(self): method validate_results (line 71) | def validate_results( method test_short_sl_track (line 84) | def test_short_sl_track( function test_warning_if_environment_to_experience_isnt_overwritten (line 101) | def test_warning_if_environment_to_experience_isnt_overwritten(short_sl_... class MyDummyMethod (line 109) | class MyDummyMethod(AvalancheMethod): method environment_to_experience (line 110) | def environment_to_experience(self, env, setting): function test_no_warning_if_environment_to_experience_is_overwritten (line 170) | def test_no_warning_if_environment_to_experience_is_overwritten(short_sl... FILE: sequoia/methods/avalanche_methods/conftest.py function config (line 22) | def config(tmp_path_factory): function fast_scenario (line 28) | def fast_scenario(use_task_labels=False, shuffle=True): FILE: sequoia/methods/avalanche_methods/cwr_star.py class CWRStarMethod (line 19) | class CWRStarMethod(AvalancheMethod[CWRStar]): FILE: sequoia/methods/avalanche_methods/cwr_star_test.py class TestCWRStarMethod (line 12) | class TestCWRStarMethod(_TestAvalancheMethod): FILE: sequoia/methods/avalanche_methods/ewc.py class EWCMethod (line 24) | class EWCMethod(AvalancheMethod[EWC]): FILE: sequoia/methods/avalanche_methods/ewc_test.py class TestEWCMethod (line 21) | class TestEWCMethod(_TestAvalancheMethod): method method (line 50) | def method(cls, config: Config, request) -> AvalancheMethod: method test_short_task_incremental_setting (line 79) | def test_short_task_incremental_setting( method test_short_class_incremental_setting (line 112) | def test_short_class_incremental_setting( FILE: sequoia/methods/avalanche_methods/experience.py class SequoiaExperience (line 17) | class SequoiaExperience(IterableWrapper, Experience): method __init__ (line 18) | def __init__( method dataset (line 121) | def dataset(self) -> AvalancheDataset: method dataset (line 125) | def dataset(self, value: AvalancheDataset) -> None: method task_label (line 129) | def task_label(self): method task_labels (line 145) | def task_labels(self): method current_experience (line 149) | def current_experience(self): method origin_stream (line 154) | def origin_stream(self) -> SLSetting: FILE: sequoia/methods/avalanche_methods/gdumb.py class GDumbPlugin (line 32) | class GDumbPlugin(_GDumbPlugin): method __init__ (line 43) | def __init__(self, mem_size: int = 200): method after_train_dataset_adaptation (line 49) | def after_train_dataset_adaptation(self, strategy: BaseStrategy, **kwa... class GDumbMethod (line 122) | class GDumbMethod(AvalancheMethod[GDumb]): method create_cl_strategy (line 140) | def create_cl_strategy(self, setting: ClassIncrementalSetting) -> GDumb: FILE: sequoia/methods/avalanche_methods/gdumb_test.py class TestGDumbMethod (line 12) | class TestGDumbMethod(_TestAvalancheMethod): FILE: sequoia/methods/avalanche_methods/gem.py class GEMMethod (line 21) | class GEMMethod(AvalancheMethod[GEM]): FILE: sequoia/methods/avalanche_methods/gem_test.py class TestGEMMethod (line 12) | class TestGEMMethod(_TestAvalancheMethod): FILE: sequoia/methods/avalanche_methods/lwf.py class LwFPlugin (line 20) | class LwFPlugin(LwFPlugin_): method _distillation_loss (line 25) | def _distillation_loss(self, out: Tensor, prev_out: Tensor) -> Tensor: class LwFMethod (line 45) | class LwFMethod(AvalancheMethod[LwF]): method create_cl_strategy (line 66) | def create_cl_strategy(self, setting: SLSetting) -> LwF: FILE: sequoia/methods/avalanche_methods/lwf_test.py class TestLwFMethod (line 12) | class TestLwFMethod(_TestAvalancheMethod): FILE: sequoia/methods/avalanche_methods/naive.py class NaiveMethod (line 14) | class NaiveMethod(AvalancheMethod[Naive]): FILE: sequoia/methods/avalanche_methods/naive_test.py class TestNaiveMethod (line 12) | class TestNaiveMethod(_TestAvalancheMethod): FILE: sequoia/methods/avalanche_methods/patched_models.py class PatchedMultiTaskModule (line 21) | class PatchedMultiTaskModule(MultiTaskModule): method known_task_ids (line 24) | def known_task_ids(self) -> List[Any]: method task_inference_forward_pass (line 27) | def task_inference_forward_pass(self, x: Tensor) -> Tensor: class MultiHeadClassifier (line 127) | class MultiHeadClassifier(_MultiHeadClassifier): method __init__ (line 128) | def __init__(self, in_features: int, initial_out_features: int = 2): method adaptation (line 140) | def adaptation(self, dataset: AvalancheDataset): method forward (line 148) | def forward(self, x: Tensor, task_labels: Optional[Tensor]) -> Tensor: method forward_single_task (line 157) | def forward_single_task(self, x: Tensor, task_label: Optional[Tensor]): class MTSimpleCNN (line 187) | class MTSimpleCNN(_MTSimpleCNN, PatchedMultiTaskModule): method __init__ (line 188) | def __init__(self): method forward (line 192) | def forward(self, x: Tensor, task_labels: Optional[Tensor] = None) -> ... method known_task_ids (line 208) | def known_task_ids(self) -> List[Any]: class MTSimpleMLP (line 212) | class MTSimpleMLP(_MTSimpleMLP, PatchedMultiTaskModule): method __init__ (line 213) | def __init__(self, input_size: int = 28 * 28, hidden_size: int = 512): method forward (line 220) | def forward(self, x: Tensor, task_labels: Optional[Tensor] = None) -> ... method known_task_ids (line 230) | def known_task_ids(self) -> List[Any]: FILE: sequoia/methods/avalanche_methods/plugins.py class GatherDataset (line 14) | class GatherDataset(StrategyPlugin): method __init__ (line 19) | def __init__(self): method after_forward (line 31) | def after_forward(self, strategy, **kwargs): method after_training_epoch (line 38) | def after_training_epoch(self, strategy, **kwargs): method after_eval_forward (line 47) | def after_eval_forward(self, strategy, **kwargs): method after_eval_exp (line 54) | def after_eval_exp(self, strategy, **kwargs): method train (line 66) | def train(self): method eval (line 69) | def eval(self): method after_training_exp (line 72) | def after_training_exp(self, strategy: "BaseStrategy", **kwargs): class OnlineAccuracyPlugin (line 88) | class OnlineAccuracyPlugin(StrategyPlugin): method __init__ (line 89) | def __init__(self): method _calc_accuracy (line 94) | def _calc_accuracy(self, strategy: "BaseStrategy") -> float: method after_forward (line 100) | def after_forward(self, strategy: "BaseStrategy", **kwargs): method after_training_epoch (line 107) | def after_training_epoch(self, strategy, **kwargs): FILE: sequoia/methods/avalanche_methods/replay.py class ReplayPlugin (line 24) | class ReplayPlugin(ReplayPlugin_): method __init__ (line 25) | def __init__(self, mem_size: int = 200, storage_policy: Optional["Stor... class ExperienceBalancedStoragePolicy (line 37) | class ExperienceBalancedStoragePolicy(ExperienceBalancedStoragePolicy_): method __call__ (line 38) | def __call__(self, strategy: BaseStrategy, **kwargs): class ReplayMethod (line 73) | class ReplayMethod(AvalancheMethod[Replay]): method create_cl_strategy (line 86) | def create_cl_strategy(self, setting: SLSetting) -> Replay: FILE: sequoia/methods/avalanche_methods/replay_test.py class TestReplayMethod (line 12) | class TestReplayMethod(_TestAvalancheMethod): FILE: sequoia/methods/avalanche_methods/synaptic_intelligence.py class SynapticIntelligencePlugin (line 28) | class SynapticIntelligencePlugin(SynapticIntelligencePlugin_): method extract_weights (line 33) | def extract_weights(model: Module, target: ParamDict, excluded_paramet... method extract_grad (line 52) | def extract_grad(model, target: ParamDict, excluded_parameters: Set[st... method compute_ewc_loss (line 62) | def compute_ewc_loss( method post_update (line 103) | def post_update(model, syn_data: SynDataType, excluded_parameters: Set... method update_ewc_data (line 143) | def update_ewc_data( class SynapticIntelligenceMethod (line 214) | class SynapticIntelligenceMethod(AvalancheMethod[SynapticIntelligence]): method create_cl_strategy (line 237) | def create_cl_strategy(self, setting: SLSetting) -> SynapticIntelligence: FILE: sequoia/methods/avalanche_methods/synaptic_intelligence_test.py class TestSynapticIntelligenceMethod (line 12) | class TestSynapticIntelligenceMethod(_TestAvalancheMethod): FILE: sequoia/methods/base_method.py class BaseMethod (line 47) | class BaseMethod(Method, Serializable, Parseable, target_setting=SLSetti... method __init__ (line 67) | def __init__( method configure (line 162) | def configure(self, setting: SettingType) -> None: method fit (line 270) | def fit( method get_actions (line 303) | def get_actions(self, observations: Observations, action_space: gym.Sp... method create_model (line 324) | def create_model(self, setting: SettingType) -> BaseModel[SettingType]: method create_trainer (line 344) | def create_trainer(self, setting: SettingType) -> Trainer: method get_experiment_name (line 369) | def get_experiment_name(self, setting: Setting, experiment_id: str = N... method get_search_space (line 401) | def get_search_space(self, setting: Setting) -> Mapping[str, Union[str... method adapt_to_new_hparams (line 420) | def adapt_to_new_hparams(self, new_hparams: Dict[str, Any]) -> None: method hparam_sweep (line 439) | def hparam_sweep( method receive_results (line 470) | def receive_results(self, setting: Setting, results: Results): method configure_callbacks (line 476) | def configure_callbacks(self, setting: SettingType = None) -> List[Cal... method apply_all (line 501) | def apply_all(self, argv: Union[str, List[str]] = None) -> Dict[Type[S... method __init_subclass__ (line 525) | def __init_subclass__(cls, target_setting: Type[SettingType] = Setting... method on_task_switch (line 546) | def on_task_switch(self, task_id: Optional[int]) -> None: method setup_wandb (line 556) | def setup_wandb(self, run: Run) -> None: FILE: sequoia/methods/base_method_test.py class TestBaseMethod (line 21) | class TestBaseMethod(MethodTests): method trainer_options (line 27) | def trainer_options(cls, tmp_path_factory) -> TrainerConfig: method method (line 38) | def method(cls, config: Config, trainer_options: TrainerConfig) -> Bas... method validate_results (line 43) | def validate_results( method test_cartpole_state (line 57) | def test_cartpole_state(self, config: Config, trainer_options: Trainer... method test_incremental_cartpole_state (line 81) | def test_incremental_cartpole_state(self, config: Config, trainer_opti... method test_device_of_output_head_is_correct (line 101) | def test_device_of_output_head_is_correct( function test_weird_pl_bug (line 116) | def test_weird_pl_bug(): FILE: sequoia/methods/conftest.py function short_class_incremental_setting (line 15) | def short_class_incremental_setting(session_config: Config): function short_continual_sl_setting (line 54) | def short_continual_sl_setting(session_config: Config): function short_discrete_task_agnostic_sl_setting (line 92) | def short_discrete_task_agnostic_sl_setting(session_config: Config): function short_task_incremental_setting (line 130) | def short_task_incremental_setting(session_config: Config): function short_sl_track_setting (line 170) | def short_sl_track_setting(session_config: Config): FILE: sequoia/methods/d3rlpy_methods/base.py class OfflineRLWrapper (line 19) | class OfflineRLWrapper(gym.Wrapper): method __init__ (line 20) | def __init__(self, env): method reset (line 24) | def reset(self): method step (line 28) | def step(self, action): class BaseOfflineRLMethod (line 33) | class BaseOfflineRLMethod(Method, target_setting=OfflineRLSetting): method __init__ (line 36) | def __init__( method configure (line 55) | def configure(self, setting: OfflineRLSetting) -> None: method fit (line 60) | def fit( method get_actions (line 82) | def get_actions(self, obs: Union[np.ndarray, Observations], action_spa... class DQNMethod (line 98) | class DQNMethod(BaseOfflineRLMethod): class DoubleDQNMethod (line 102) | class DoubleDQNMethod(BaseOfflineRLMethod): class DDPGMethod (line 106) | class DDPGMethod(BaseOfflineRLMethod): class TD3Method (line 110) | class TD3Method(BaseOfflineRLMethod): class SACMethod (line 114) | class SACMethod(BaseOfflineRLMethod): class DiscreteSACMethod (line 118) | class DiscreteSACMethod(BaseOfflineRLMethod): class CQLMethod (line 122) | class CQLMethod(BaseOfflineRLMethod): class DiscreteCQLMethod (line 126) | class DiscreteCQLMethod(BaseOfflineRLMethod): class BEARMethod (line 130) | class BEARMethod(BaseOfflineRLMethod): class AWRMethod (line 134) | class AWRMethod(BaseOfflineRLMethod): class DiscreteAWRMethod (line 138) | class DiscreteAWRMethod(BaseOfflineRLMethod): class BCMethod (line 142) | class BCMethod(BaseOfflineRLMethod): class DiscreteBCMethod (line 146) | class DiscreteBCMethod(BaseOfflineRLMethod): class BCQMethod (line 150) | class BCQMethod(BaseOfflineRLMethod): class DiscreteBCQMethod (line 154) | class DiscreteBCQMethod(BaseOfflineRLMethod): FILE: sequoia/methods/d3rlpy_methods/base_test.py class BaseOfflineRLMethodTests (line 9) | class BaseOfflineRLMethodTests: method method (line 13) | def method(self): method test_offlinerl (line 17) | def test_offlinerl(self, method, dataset: str): method test_traditionalrl (line 39) | def test_traditionalrl(self, method, dataset): class TestDQNMethod (line 65) | class TestDQNMethod(BaseOfflineRLMethodTests): class TestDoubleDQNMethod (line 69) | class TestDoubleDQNMethod(BaseOfflineRLMethodTests): class TestDDPGMethod (line 73) | class TestDDPGMethod(BaseOfflineRLMethodTests): class TestTD3Method (line 77) | class TestTD3Method(BaseOfflineRLMethodTests): class TestSACMethod (line 81) | class TestSACMethod(BaseOfflineRLMethodTests): class TestDiscreteSACMethod (line 85) | class TestDiscreteSACMethod(BaseOfflineRLMethodTests): class TestCQLMethod (line 89) | class TestCQLMethod(BaseOfflineRLMethodTests): class TestDiscreteCQLMethod (line 93) | class TestDiscreteCQLMethod(BaseOfflineRLMethodTests): class TestBEARMethod (line 97) | class TestBEARMethod(BaseOfflineRLMethodTests): class TestAWRMethod (line 101) | class TestAWRMethod(BaseOfflineRLMethodTests): class TestDiscreteAWRMethod (line 105) | class TestDiscreteAWRMethod(BaseOfflineRLMethodTests): class TestBCMethod (line 109) | class TestBCMethod(BaseOfflineRLMethodTests): class TestDiscreteBCMethod (line 113) | class TestDiscreteBCMethod(BaseOfflineRLMethodTests): class TestBCQMethod (line 117) | class TestBCQMethod(BaseOfflineRLMethodTests): class TestDiscreteBCQMethod (line 121) | class TestDiscreteBCQMethod(BaseOfflineRLMethodTests): FILE: sequoia/methods/ewc_method.py class EwcModel (line 25) | class EwcModel(BaseModel): class HParams (line 29) | class HParams(BaseModel.HParams): method __init__ (line 35) | def __init__(self, setting: Setting, hparams: "EwcModel.HParams", conf... method get_loss (line 40) | def get_loss(self, forward_pass, rewards=None, loss_name=""): class EwcMethod (line 46) | class EwcMethod(BaseMethod, target_setting=IncrementalSLSetting): method __init__ (line 55) | def __init__( method configure (line 64) | def configure(self, setting: IncrementalAssumption): method on_task_switch (line 86) | def on_task_switch(self, task_id: Optional[int]): method create_model (line 89) | def create_model(self, setting: Setting) -> EwcModel: function demo (line 108) | def demo(): FILE: sequoia/methods/ewc_method_test.py class TestEWCMethod (line 26) | class TestEWCMethod(BaseMethodTests): method method (line 31) | def method(cls, config: Config, trainer_options: TrainerConfig) -> Ewc... method test_task_incremental_mnist (line 38) | def test_task_incremental_mnist(self, monkeypatch): method test_raises_warning_when_applied_to_non_cl_setting (line 101) | def test_raises_warning_when_applied_to_non_cl_setting(self, non_cl_se... FILE: sequoia/methods/experience_replay.py class ExperienceReplayMethod (line 34) | class ExperienceReplayMethod(Method, target_setting=ClassIncrementalSett... method __init__ (line 37) | def __init__( method configure (line 64) | def configure(self, setting: ClassIncrementalSetting): method fit (line 90) | def fit(self, train_env: Environment, valid_env: Environment): method get_actions (line 184) | def get_actions(self, observations: Observations, action_space: gym.Sp... method on_task_switch (line 201) | def on_task_switch(self, task_id: Optional[int]): method add_argparse_args (line 207) | def add_argparse_args(cls, parser: ArgumentParser) -> None: method from_argparse_args (line 222) | def from_argparse_args(cls, args: Namespace, dest: str = None): method get_search_space (line 247) | def get_search_space(self, setting: ClassIncrementalSetting) -> Dict: method adapt_to_new_hparams (line 255) | def adapt_to_new_hparams(self, new_hparams: Dict[str, Any]) -> None: method setup_wandb (line 280) | def setup_wandb(self, run: Run) -> None: class Buffer (line 305) | class Buffer(nn.Module): method __init__ (line 306) | def __init__( method x (line 338) | def x(self): method y (line 342) | def y(self): method add_reservoir (line 346) | def add_reservoir(self, batch: Dict[str, Tensor]) -> None: method sample (line 399) | def sample(self, n_samples: int, exclude_task: int = None) -> Dict[str... FILE: sequoia/methods/experience_replay_test.py class TestExperienceReplay (line 13) | class TestExperienceReplay(MethodTests): method method (line 19) | def method(cls, config: Config) -> ExperienceReplayMethod: method validate_results (line 23) | def validate_results( method test_class_incremental_mnist (line 34) | def test_class_incremental_mnist(self, config: Config): FILE: sequoia/methods/hat.py class Masks (line 37) | class Masks(NamedTuple): class HatNet (line 47) | class HatNet(torch.nn.Module): method __init__ (line 62) | def __init__(self, image_space: Image, n_classes_per_task: Dict[int, i... method forward (line 110) | def forward(self, observations: TaskIncrementalSLSetting.Observations)... method mask (line 147) | def mask(self, t: Tensor, s_hat: float) -> Masks: method shared_step (line 155) | def shared_step( function compute_conv_output_size (line 207) | def compute_conv_output_size( class HatMethod (line 214) | class HatMethod(Method, target_setting=TaskIncrementalSLSetting): class HParams (line 229) | class HParams(HyperParameters): method __init__ (line 241) | def __init__(self, hparams: HParams = None): method configure (line 248) | def configure(self, setting: TaskIncrementalSLSetting): method fit (line 272) | def fit(self, train_env: PassiveEnvironment, valid_env: PassiveEnviron... method get_actions (line 330) | def get_actions(self, observations: Observations, action_space: gym.Sp... method on_task_switch (line 338) | def on_task_switch(self, task_id: Optional[int]): method add_argparse_args (line 346) | def add_argparse_args(cls, parser: ArgumentParser) -> None: method from_argparse_args (line 352) | def from_argparse_args(cls, args: Namespace) -> "HatMethod": method get_search_space (line 358) | def get_search_space(self, setting: Setting) -> Mapping[str, Union[str... method adapt_to_new_hparams (line 374) | def adapt_to_new_hparams(self, new_hparams: Dict[str, Any]) -> None: method setup_wandb (line 392) | def setup_wandb(self, run: Run) -> None: FILE: sequoia/methods/method_test.py function key_fn (line 14) | def key_fn(setting_class: Type[Setting]): function make_setting_type_fixture (line 20) | def make_setting_type_fixture(method_type: Type[Method]) -> pytest.fixture: class MethodTests (line 43) | class MethodTests(ABC): method __init_subclass__ (line 55) | def __init_subclass__(cls, method: Type[MethodType] = None): method method (line 71) | def method(cls, config: Config) -> MethodType: method validate_results (line 80) | def validate_results( method setting (line 98) | def setting(self, setting_type: Type[Setting], session_config: Config): method test_debug (line 165) | def test_debug(self, method: MethodType, setting: Setting, config: Con... class NewSetting (line 172) | class NewSetting(Setting): class NewMethod (line 177) | class NewMethod(Method, target_setting=NewSetting): method fit (line 178) | def fit(self, train_env, valid_env): method get_actions (line 181) | def get_actions(self, observations, action_space): function test_passing_arg_to_class_constructor_works (line 185) | def test_passing_arg_to_class_constructor_works(): function test_cant_change_target_setting (line 191) | def test_cant_change_target_setting(): function test_target_setting_is_inherited (line 198) | def test_target_setting_is_inherited(): class SettingA (line 207) | class SettingA(Setting): class SettingA1 (line 212) | class SettingA1(SettingA): class SettingA2 (line 217) | class SettingA2(SettingA): class SettingB (line 222) | class SettingB(Setting): class MethodA (line 226) | class MethodA(Method, target_setting=SettingA): method fit (line 227) | def fit(self, train_env, valid_env): method get_actions (line 230) | def get_actions(self, observations, action_space): class MethodB (line 234) | class MethodB(Method, target_setting=SettingB): method fit (line 235) | def fit(self, train_env, valid_env): method get_actions (line 238) | def get_actions(self, observations, action_space): class CoolGeneralMethod (line 242) | class CoolGeneralMethod(Method, target_setting=Setting): method fit (line 243) | def fit(self, train_env, valid_env): method get_actions (line 246) | def get_actions(self, observations, action_space): function test_method_is_applicable_to_setting (line 250) | def test_method_is_applicable_to_setting(): function test_is_applicable_also_works_on_instances (line 290) | def test_is_applicable_also_works_on_instances(): FILE: sequoia/methods/models/base_model/base_model.py class BaseModel (line 36) | class BaseModel(SemiSupervisedModel, MultiHeadModel, SelfSupervisedModel... class HParams (line 48) | class HParams(SemiSupervisedModel.HParams, SelfSupervisedModel.HParams... method __init__ (line 113) | def __init__(self, setting: SettingType, hparams: HParams, config: Con... method on_fit_start (line 145) | def on_fit_start(self): method forward (line 150) | def forward(self, observations: Setting.Observations) -> ForwardPass: ... method create_output_head (line 187) | def create_output_head(self, task_id: Optional[int]) -> OutputHead: method output_head_type (line 209) | def output_head_type(self, setting: SettingType) -> Type[OutputHead]: method automatic_optimization (line 215) | def automatic_optimization(self) -> bool: method training_step (line 218) | def training_step( method validation_step (line 234) | def validation_step( method test_step (line 248) | def test_step( method shared_step (line 262) | def shared_step( method on_task_switch (line 280) | def on_task_switch(self, task_id: Optional[int]) -> None: FILE: sequoia/methods/models/base_model/model.py class Model (line 71) | class Model(LightningModule, Generic[SettingType]): class HParams (line 86) | class HParams(HyperParameters): method __init__ (line 148) | def __init__(self, setting: SettingType, hparams: HParams, config: Con... method make_encoder (line 218) | def make_encoder(self) -> Tuple[nn.Module, int]: method forward (line 241) | def forward(self, observations: IncrementalAssumption.Observations) ->... method encode (line 271) | def encode(self, observations: Observations) -> Tensor: method create_output_head (line 307) | def create_output_head(self, task_id: Optional[int]) -> OutputHead: method output_head_type (line 360) | def output_head_type(self, setting: SettingType) -> Type[OutputHead]: method training_step (line 386) | def training_step( method validation_step (line 403) | def validation_step( method test_step (line 418) | def test_step( method shared_step (line 433) | def shared_step( method training_step_end (line 469) | def training_step_end(self, step_outputs: Union[Loss, List[Loss]]) -> ... method validation_step_end (line 499) | def validation_step_end(self, step_outputs: Union[ForwardPass, List[Fo... method test_step_end (line 504) | def test_step_end(self, step_outputs: Union[ForwardPass, List[ForwardP... method shared_step_end (line 509) | def shared_step_end( method split_batch (line 563) | def split_batch(self, batch: Any) -> Tuple[Observations, Optional[Rewa... method get_loss (line 592) | def get_loss( method output_head_loss (line 640) | def output_head_loss( method preprocess_observations (line 652) | def preprocess_observations(self, observations: Observations) -> Obser... method preprocess_rewards (line 661) | def preprocess_rewards(self, reward: Rewards) -> Rewards: method configure_optimizers (line 664) | def configure_optimizers(self): method batch_size (line 677) | def batch_size(self) -> int: method batch_size (line 681) | def batch_size(self, value: int) -> None: method learning_rate (line 685) | def learning_rate(self) -> float: method learning_rate (line 689) | def learning_rate(self, value: float) -> None: method on_task_switch (line 692) | def on_task_switch(self, task_id: Optional[int]) -> None: method shared_modules (line 699) | def shared_modules(self) -> Dict[str, nn.Module]: method _are_batched (line 723) | def _are_batched(self, observations: IncrementalAssumption.Observation... FILE: sequoia/methods/models/base_model/multihead_model.py class MultiHeadModel (line 22) | class MultiHeadModel(Model[SettingType]): class HParams (line 28) | class HParams(Model.HParams): method __init__ (line 34) | def __init__(self, setting: SettingType, hparams: HParams, config: Con... method output_head_loss (line 58) | def output_head_loss( method on_before_zero_grad (line 214) | def on_before_zero_grad(self, optimizer): method shared_step (line 222) | def shared_step( method on_task_switch (line 250) | def on_task_switch(self, task_id: Optional[int]): method shared_modules (line 274) | def shared_modules(self) -> Dict[str, nn.Module]: method load_state_dict (line 296) | def load_state_dict( method get_or_create_output_head (line 331) | def get_or_create_output_head(self, task_id: int) -> nn.Module: method forward (line 349) | def forward(self, observations: IncrementalAssumption.Observations) ->... method setup_for_task (line 410) | def setup_for_task(self, task_id: int) -> None: method split_forward_pass (line 415) | def split_forward_pass(self, observations: Observations) -> ForwardPass: method task_inference_forward_pass (line 474) | def task_inference_forward_pass(self, observations: Observations) -> T... function get_task_indices (line 563) | def get_task_indices( function cleanup_task_labels (line 614) | def cleanup_task_labels( FILE: sequoia/methods/models/base_model/multihead_model_test.py function mixed_samples (line 29) | def mixed_samples(config: Config): class MockOutputHead (line 42) | class MockOutputHead(OutputHead): method __init__ (line 43) | def __init__(self, *args, Actions: Type, task_id: int = -1, **kwargs): method forward (line 49) | def forward(self, observations, representations) -> Tensor: # type: i... method get_loss (line 68) | def get_loss(self, forward_pass, actions, rewards): function test_multiple_tasks_within_same_batch (line 88) | def test_multiple_tasks_within_same_batch( function test_multitask_rl_bug_without_PL (line 135) | def test_multitask_rl_bug_without_PL(monkeypatch): function test_multitask_rl_bug_with_PL (line 236) | def test_multitask_rl_bug_with_PL(monkeypatch, config: Config): function test_get_task_indices (line 364) | def test_get_task_indices(input, expected): function test_task_inference_sl (line 378) | def test_task_inference_sl( function test_task_inference_rl_easy (line 428) | def test_task_inference_rl_easy(config: Config): function test_task_inference_rl_hard (line 449) | def test_task_inference_rl_hard(config: Config): function test_task_inference_multi_task_sl (line 471) | def test_task_inference_multi_task_sl(config: Config): FILE: sequoia/methods/models/base_model/self_supervised_model.py class SelfSupervisedModel (line 29) | class SelfSupervisedModel(Model[SettingType]): class HParams (line 38) | class HParams(Model.HParams): method __init__ (line 44) | def __init__(self, setting: Setting, hparams: HParams, config: Config): method get_loss (line 50) | def get_loss( method add_auxiliary_task (line 75) | def add_auxiliary_task( method create_auxiliary_tasks (line 93) | def create_auxiliary_tasks(self) -> Dict[str, AuxiliaryTask]: method on_task_switch (line 119) | def on_task_switch(self, task_id: Optional[int]) -> None: method shared_modules (line 130) | def shared_modules(self) -> Dict[str, nn.Module]: FILE: sequoia/methods/models/base_model/self_supervised_model_test.py function test_get_applicable_settings (line 25) | def test_get_applicable_settings(): function method_and_coefficients (line 42) | def method_and_coefficients(request, tmp_path_factory): function test_fast_dev_run (line 73) | def test_fast_dev_run( function validate_results (line 90) | def validate_results(results: Results, aux_task_coefficients: Dict[str, ... FILE: sequoia/methods/models/base_model/semi_supervised_model.py class SemiSupervisedModel (line 22) | class SemiSupervisedModel(Model[SettingType]): class HParams (line 24) | class HParams(Model.HParams): method get_loss (line 33) | def get_loss( FILE: sequoia/methods/models/fcnet.py class FCNet (line 10) | class FCNet(nn.Sequential): class HParams (line 14) | class HParams(HyperParameters): method __post_init__ (line 38) | def __post_init__(self): method __init__ (line 67) | def __init__(self, in_features: int, out_features: int, hparams: HPara... method __init__ (line 71) | def __init__( method __init__ (line 81) | def __init__(self, in_features: int, out_features: int, hparams: HPara... FILE: sequoia/methods/models/forward_pass.py class ForwardPass (line 14) | class ForwardPass(Batch, FlattenedAccess): method h_x (line 32) | def h_x(self) -> Any: FILE: sequoia/methods/models/output_heads/classification_head.py class ClassificationOutput (line 26) | class ClassificationOutput(Actions): method action (line 36) | def action(self) -> LongTensor: method y_pred_log_prob (line 40) | def y_pred_log_prob(self) -> Tensor: method y_pred_prob (line 45) | def y_pred_prob(self) -> Tensor: method probabilities (line 50) | def probabilities(self) -> Tensor: class ClassificationHead (line 57) | class ClassificationHead(OutputHead): class HParams (line 59) | class HParams(FCNet.HParams, OutputHead.HParams): method __init__ (line 86) | def __init__( method forward (line 115) | def forward(self, observations: Observations, representations: Tensor)... method get_loss (line 129) | def get_loss( FILE: sequoia/methods/models/output_heads/output_head.py class OutputHead (line 25) | class OutputHead(nn.Module, ABC): class HParams (line 41) | class HParams(HyperParameters, Parseable): method __init__ (line 44) | def __init__( method make_dense_network (line 64) | def make_dense_network( method forward (line 82) | def forward( method get_loss (line 102) | def get_loss(self, forward_pass: ForwardPass, actions: Actions, reward... method clear_all_buffers (line 108) | def clear_all_buffers(self) -> None: method upgrade_hparams (line 114) | def upgrade_hparams(self): FILE: sequoia/methods/models/output_heads/regression_head.py class RegressionHead (line 17) | class RegressionHead(OutputHead): class HParams (line 21) | class HParams(FCNet.HParams, OutputHead.HParams): method __init__ (line 24) | def __init__( method forward (line 63) | def forward(self, observations: Observations, representations: Tensor)... method get_loss (line 67) | def get_loss(self, forward_pass: ForwardPass, actions: Actions, reward... FILE: sequoia/methods/models/output_heads/rl/actor_critic_head.py class ActorCriticHead (line 29) | class ActorCriticHead(ClassificationHead): class HParams (line 31) | class HParams(ClassificationHead.HParams): method __init__ (line 37) | def __init__( method forward (line 86) | def forward( method get_loss (line 119) | def get_loss( function concat_obs_and_action (line 173) | def concat_obs_and_action(observation_action: Tuple[Tensor, Tensor]) -> ... FILE: sequoia/methods/models/output_heads/rl/episodic_a2c.py class A2CHeadOutput (line 27) | class A2CHeadOutput(PolicyHeadOutput): class EpisodicA2C (line 34) | class EpisodicA2C(PolicyHead): class HParams (line 45) | class HParams(PolicyHead.HParams): method __init__ (line 61) | def __init__( method actor (line 93) | def actor(self) -> nn.Module: method forward (line 96) | def forward( method num_stored_steps (line 113) | def num_stored_steps(self, env_index: int) -> Optional[int]: method get_episode_loss (line 123) | def get_episode_loss(self, env_index: int, done: bool) -> Optional[Loss]: method optimizer_step (line 200) | def optimizer_step(self): function compute_returns_and_advantage (line 211) | def compute_returns_and_advantage(self, last_values: Tensor, dones: np.n... FILE: sequoia/methods/models/output_heads/rl/episodic_a2c_test.py class FakeEnvironment (line 24) | class FakeEnvironment(SyncVectorEnv): method __init__ (line 25) | def __init__( method step (line 44) | def step(self, actions): function test_with_controllable_episode_lengths (line 67) | def test_with_controllable_episode_lengths(batch_size: int, monkeypatch): function test_loss_is_nonzero_at_episode_end (line 200) | def test_loss_is_nonzero_at_episode_end(batch_size: int): function test_loss_is_nonzero_at_episode_end_iterate (line 282) | def test_loss_is_nonzero_at_episode_end_iterate(batch_size: int): function test_buffers_are_stacked_correctly (line 356) | def test_buffers_are_stacked_correctly(monkeypatch): FILE: sequoia/methods/models/output_heads/rl/policy_head.py class PolicyHeadOutput (line 56) | class PolicyHeadOutput(ClassificationOutput): method y_pred_prob (line 65) | def y_pred_prob(self) -> Tensor: method y_pred_log_prob (line 70) | def y_pred_log_prob(self) -> Tensor: method action_log_prob (line 75) | def action_log_prob(self) -> Tensor: method action_prob (line 79) | def action_prob(self) -> Tensor: class PolicyHead (line 94) | class PolicyHead(ClassificationHead): class HParams (line 108) | class HParams(ClassificationHead.HParams): method __init__ (line 136) | def __init__( method create_buffers (line 191) | def create_buffers(self): method forward (line 203) | def forward( method to (line 238) | def to(self: T, device: Optional[Union[int, torch.device]] = None, **k... method get_loss (line 244) | def get_loss( method on_episode_end (line 373) | def on_episode_end(self, env_index: int) -> None: method get_episode_loss (line 378) | def get_episode_loss(self, env_index: int, done: bool) -> Optional[Loss]: method get_gradient_usage_metrics (line 434) | def get_gradient_usage_metrics(self, env_index: int) -> GradientUsageM... method get_returns (line 452) | def get_returns(rewards: Union[Tensor, List[Tensor]], gamma: float) ->... method policy_gradient (line 459) | def policy_gradient( method training (line 486) | def training(self) -> bool: method training (line 490) | def training(self, value: bool) -> None: method clear_all_buffers (line 503) | def clear_all_buffers(self) -> None: method clear_buffers (line 516) | def clear_buffers(self, env_index: int) -> None: method detach_all_buffers (line 522) | def detach_all_buffers(self): method detach_buffers (line 530) | def detach_buffers(self, env_index: int) -> None: method _detach_buffer (line 544) | def _detach_buffer(self, old_buffer: Sequence[Tensor]) -> deque: method _make_buffer (line 551) | def _make_buffer(self, elements: Sequence[T] = None) -> Deque[T]: method _make_buffers (line 557) | def _make_buffers(self) -> List[deque]: method stack_buffers (line 560) | def stack_buffers(self, env_index: int): function discounted_sum_of_future_rewards (line 586) | def discounted_sum_of_future_rewards(rewards: Union[Tensor, List[Tensor]... function vanilla_policy_gradient (line 605) | def vanilla_policy_gradient( function make_gamma_matrix (line 643) | def make_gamma_matrix(gamma: float, T: int, device=None) -> Tensor: function normalize (line 659) | def normalize(x: Tensor): function tuple_of_lists (line 666) | def tuple_of_lists(list_of_tuples: List[Tuple[T, ...]]) -> Tuple[List[T]... function list_of_tuples (line 670) | def list_of_tuples(tuple_of_lists: Tuple[List[T], ...]) -> List[Tuple[T,... FILE: sequoia/methods/models/output_heads/rl/policy_head_test.py class FakeEnvironment (line 29) | class FakeEnvironment(SyncVectorEnv): method __init__ (line 30) | def __init__( method step (line 49) | def step(self, actions): function test_with_controllable_episode_lengths (line 71) | def test_with_controllable_episode_lengths(batch_size: int, monkeypatch): function test_loss_is_nonzero_at_episode_end (line 209) | def test_loss_is_nonzero_at_episode_end(batch_size: int): function test_done_is_sometimes_True_when_iterating_through_env (line 292) | def test_done_is_sometimes_True_when_iterating_through_env(batch_size: i... function test_loss_is_nonzero_at_episode_end_iterate (line 308) | def test_loss_is_nonzero_at_episode_end_iterate(batch_size: int): function test_buffers_are_stacked_correctly (line 381) | def test_buffers_are_stacked_correctly(monkeypatch): function test_sanity_check_cartpole_done_vector (line 519) | def test_sanity_check_cartpole_done_vector(): FILE: sequoia/methods/models/output_heads/rl/wasted_steps_calc.py function get_fraction_of_observations_with_grad (line 7) | def get_fraction_of_observations_with_grad( FILE: sequoia/methods/models/simple_convnet.py class SimpleConvNet (line 4) | class SimpleConvNet(nn.Module): method __init__ (line 5) | def __init__(self, in_channels: int = 3, n_classes: int = 10): method forward (line 35) | def forward(self, x: Tensor) -> Tensor: FILE: sequoia/methods/packnet_method.py class PackNet (line 19) | class PackNet(Callback, nn.Module): class HParams (line 26) | class HParams(HyperParameters): method __init__ (line 34) | def __init__( method filtered_parameter_iterator (line 81) | def filtered_parameter_iterator(self, module: nn.Module) -> Iterable[T... method prune (line 112) | def prune(self, model: nn.Module, prune_quantile: float) -> Dict[str, ... method fine_tune_mask (line 169) | def fine_tune_mask(self, model: nn.Module): method training_mask (line 178) | def training_mask(self, model: nn.Module): method fix_biases (line 201) | def fix_biases(self, model: nn.Module): method fix_batch_norm (line 214) | def fix_batch_norm(self, model: nn.Module): method set_params_dict (line 224) | def set_params_dict(self, model: nn.Module): method fix_all_layers (line 234) | def fix_all_layers(self, model: nn.Module): method apply_eval_mask (line 248) | def apply_eval_mask(self, model: nn.Module, task_idx: int): method mask_remaining_params (line 266) | def mask_remaining_params(self, model: nn.Module) -> Dict[str, Tensor]: method total_epochs (line 282) | def total_epochs(self) -> int: method config_instructions (line 285) | def config_instructions(self): method save_final_state (line 299) | def save_final_state(self, model, PATH="model_weights.pth"): method load_final_state (line 308) | def load_final_state(self, model): method on_init_end (line 316) | def on_init_end(self, trainer: Trainer): method on_after_backward (line 319) | def on_after_backward(self, trainer: Trainer, pl_module: LightningModu... method on_train_epoch_end (line 326) | def on_train_epoch_end(self, trainer: Trainer, pl_module: LightningMod... method on_fit_end (line 340) | def on_fit_end(self, trainer: Trainer, pl_module: LightningModule): class PackNetMethod (line 353) | class PackNetMethod(BaseMethod, target_setting=IncrementalSLSetting): method __init__ (line 364) | def __init__( method configure (line 376) | def configure(self, setting: Setting): method fit (line 399) | def fit(self, train_env, valid_env): method on_task_switch (line 402) | def on_task_switch(self, task_id: Optional[int]) -> None: method configure_callbacks (line 416) | def configure_callbacks(self, setting: TaskIncrementalSLSetting = None... method create_trainer (line 442) | def create_trainer(self, setting) -> Trainer: method adapt_to_new_hparams (line 453) | def adapt_to_new_hparams(self, new_hparams: Dict[str, Any]) -> None: method get_search_space (line 468) | def get_search_space(self, setting: Setting) -> Mapping[str, Union[str... FILE: sequoia/methods/packnet_method_test.py class TestPackNetMethod (line 7) | class TestPackNetMethod(BaseMethodTests): method validate_results (line 10) | def validate_results(self, setting, method, results): FILE: sequoia/methods/pl_dqn.py class DQN (line 72) | class DQN(nn.Module): method __init__ (line 75) | def __init__(self, obs_size: int, n_actions: int, hidden_size: int = 1... method forward (line 89) | def forward(self, x: Tensor) -> Tensor: class Experience (line 98) | class Experience(Generic[T]): class ExperienceBatch (line 109) | class ExperienceBatch(Generic[T]): method __len__ (line 121) | def __len__(self) -> int: method __getitem__ (line 124) | def __getitem__(self, index: Union[int, slice]) -> Union[Experience[T]... method stack (line 142) | def stack(cls, items: Sequence["Experience[T]"]) -> "ExperienceBatch[T]": method _map (line 159) | def _map(self, fn: Callable[[T], V]) -> "ExperienceBatch[V]": method numpy (line 164) | def numpy(self) -> "ExperienceBatch[np.ndarray]": method to (line 170) | def to(self, device: torch.device = None, **kwargs) -> "ExperienceBatc... class ReplayBuffer (line 177) | class ReplayBuffer(Generic[T]): method __init__ (line 183) | def __init__(self, capacity: int) -> None: method __len__ (line 190) | def __len__(self) -> int: method append (line 193) | def append(self, experience: Experience[T]) -> None: method sample (line 201) | def sample( class RLDataset (line 210) | class RLDataset(IterableDataset[ExperienceBatch[T]]): method __init__ (line 217) | def __init__(self, buffer: ReplayBuffer, sample_size: int = 200) -> None: method __iter__ (line 226) | def __iter__(self) -> Iterator[Experience[T]]: class Agent (line 233) | class Agent: method __init__ (line 243) | def __init__(self, env: gym.Env, replay_buffer: ReplayBuffer) -> None: method reset (line 254) | def reset(self) -> None: method get_action (line 258) | def get_action(self, state: Tensor, net: nn.Module, epsilon: float) ->... method play_step (line 280) | def play_step( class DQNLightning (line 319) | class DQNLightning(pl.LightningModule): class HParams (line 328) | class HParams(Serializable): method __init__ (line 359) | def __init__(self, env: Union[str, gym.Env[np.ndarray, int]], hp: HPar... method populate (line 394) | def populate(self, steps: int = 1000) -> None: method forward (line 408) | def forward(self, x: torch.Tensor) -> torch.Tensor: method dqn_mse_loss (line 420) | def dqn_mse_loss(self, batch: ExperienceBatch[Tensor]) -> torch.Tensor: method training_step (line 446) | def training_step(self, batch: ExperienceBatch[Tensor], batch_idx: int... method configure_optimizers (line 494) | def configure_optimizers(self) -> List[Optimizer]: method __dataloader (line 499) | def __dataloader(self) -> DataLoader: method train_dataloader (line 510) | def train_dataloader(self) -> DataLoader: method get_device (line 514) | def get_device(self, batch) -> str: method add_model_specific_args (line 519) | def add_model_specific_args(cls, parent_parser: ArgumentParser): # pr... function get_max_episode_length (line 524) | def get_max_episode_length(env: Union[gym.Env, gym.Wrapper]) -> Optional... class PlDqnMethod (line 543) | class PlDqnMethod(Method, target_setting=RLSetting): method __init__ (line 544) | def __init__(self, hp: DQNLightning.HParams = None) -> None: method configure (line 549) | def configure(self, setting: RLSetting) -> None: method fit (line 553) | def fit(self, train_env: gym.Env, valid_env: gym.Env): method get_actions (line 580) | def get_actions(self, observations: Observations, action_space: Discre... function main (line 593) | def main() -> None: FILE: sequoia/methods/pnn/layers.py class PNNConvLayer (line 9) | class PNNConvLayer(nn.Module): method __init__ (line 10) | def __init__(self, col, depth, n_in, n_out, kernel_size=3): method forward (line 21) | def forward(self, inputs): class PNNLinearBlock (line 31) | class PNNLinearBlock(nn.Module): method __init__ (line 32) | def __init__(self, col: int, depth: int, n_in: int, n_out: int): method forward (line 40) | def forward(self, inputs): FILE: sequoia/methods/pnn/model_rl.py class PnnA2CAgent (line 11) | class PnnA2CAgent(nn.Module): method __init__ (line 21) | def __init__(self, arch="mlp", hidden_size=256): method forward (line 40) | def forward(self, observations): method new_task (line 93) | def new_task(self, device, num_inputs, num_actions=5): method unfreeze_columns (line 133) | def unfreeze_columns(self): method freeze_columns (line 145) | def freeze_columns(self, skip: List[int] = None): method parameters (line 166) | def parameters(self, task_id): method transfor_img (line 179) | def transfor_img(self, img): FILE: sequoia/methods/pnn/model_sl.py class PnnClassifier (line 16) | class PnnClassifier(nn.Module): method __init__ (line 26) | def __init__(self, n_layers): method forward (line 36) | def forward(self, observations: Observations): method new_task (line 90) | def new_task(self, device, sizes: List[int]): method freeze_columns (line 111) | def freeze_columns(self, skip: List[int] = None): method shared_step (line 126) | def shared_step( method parameters (line 177) | def parameters(self, task_id): FILE: sequoia/methods/pnn/pnn_method.py class PnnMethod (line 48) | class PnnMethod(Method, target_setting=IncrementalAssumption): class HParams (line 57) | class HParams(HyperParameters): method __init__ (line 73) | def __init__(self, hparams: HParams = None): method configure (line 81) | def configure(self, setting: Setting): method on_task_switch (line 160) | def on_task_switch(self, task_id: Optional[int]) -> None: method set_optimizer (line 184) | def set_optimizer(self): method get_actions (line 190) | def get_actions(self, observations: Observations, action_space: spaces... method fit (line 209) | def fit(self, train_env: Environment, valid_env: Environment): method fit_rl (line 221) | def fit_rl(self, train_env: gym.Env, valid_env: gym.Env): method fit_sl (line 297) | def fit_sl(self, train_env: PassiveEnvironment, valid_env: PassiveEnvi... method add_argparse_args (line 343) | def add_argparse_args(cls, parser: ArgumentParser) -> None: method from_argparse_args (line 347) | def from_argparse_args(cls, args: Namespace) -> "PnnMethod": method get_search_space (line 352) | def get_search_space(self, setting: Setting) -> Mapping[str, Union[str... method adapt_to_new_hparams (line 368) | def adapt_to_new_hparams(self, new_hparams: Dict[str, Any]) -> None: method setup_wandb (line 386) | def setup_wandb(self, run: Run) -> None: function main_rl (line 403) | def main_rl(): function main_sl (line 436) | def main_sl(): FILE: sequoia/methods/random_baseline.py class RandomBaselineMethod (line 25) | class RandomBaselineMethod(Method, target_setting=Setting): method __init__ (line 32) | def __init__(self): method configure (line 35) | def configure(self, setting: Setting): method fit (line 45) | def fit( method get_actions (line 83) | def get_actions(self, observations: Observations, action_space: gym.Sp... method get_search_space (line 86) | def get_search_space(self, setting: Setting) -> Mapping[str, Union[str... method adapt_to_new_hparams (line 109) | def adapt_to_new_hparams(self, new_hparams: Dict[str, Any]) -> None: method add_argparse_args (line 125) | def add_argparse_args(cls, parser: ArgumentParser): method from_argparse_args (line 129) | def from_argparse_args(cls, args: Namespace): FILE: sequoia/methods/random_baseline_test.py function test_is_applicable_to_all_settings (line 23) | def test_is_applicable_to_all_settings(): FILE: sequoia/methods/stable_baselines3_methods/a2c.py class A2CModel (line 24) | class A2CModel(A2C, OnPolicyModel): class HParams (line 37) | class HParams(OnPolicyModel.HParams): class A2CMethod (line 126) | class A2CMethod(OnPolicyMethod): method configure (line 137) | def configure(self, setting: ContinualRLSetting): method create_model (line 153) | def create_model(self, train_env: gym.Env, valid_env: gym.Env) -> A2CM... method fit (line 156) | def fit(self, train_env: gym.Env, valid_env: gym.Env): method get_actions (line 159) | def get_actions( method on_task_switch (line 167) | def on_task_switch(self, task_id: Optional[int]) -> None: method get_search_space (line 178) | def get_search_space(self, setting: ContinualRLSetting) -> Mapping[str... FILE: sequoia/methods/stable_baselines3_methods/a2c_test.py class TestA2C (line 8) | class TestA2C(DiscreteActionSpaceMethodTests): FILE: sequoia/methods/stable_baselines3_methods/base.py class RemoveInfoWrapper (line 78) | class RemoveInfoWrapper(gym.Wrapper): method step (line 83) | def step(self, action): class SB3BaseHParams (line 90) | class SB3BaseHParams(HyperParameters): class StableBaselines3Method (line 140) | class StableBaselines3Method(Method, ABC, target_setting=ContinualRLSett... method __post_init__ (line 179) | def __post_init__(self): method configure (line 205) | def configure(self, setting: ContinualRLSetting): method create_model (line 253) | def create_model(self, train_env: gym.Env, valid_env: gym.Env) -> Base... method fit (line 259) | def fit(self, train_env: gym.Env, valid_env: gym.Env): method get_actions (line 321) | def get_actions( method get_search_space (line 330) | def get_search_space(self, setting: Setting) -> Mapping[str, Union[str... method adapt_to_new_hparams (line 348) | def adapt_to_new_hparams(self, new_hparams: Dict[str, Any]) -> None: method setup_wandb (line 366) | def setup_wandb(self, run: Run) -> None: method on_task_switch (line 382) | def on_task_switch(self, task_id: Optional[int]) -> None: method clear_buffers (line 394) | def clear_buffers(self): FILE: sequoia/methods/stable_baselines3_methods/base_test.py class StableBaselines3MethodTests (line 31) | class StableBaselines3MethodTests(MethodTests): method test_clear_buffers_between_tasks (line 38) | def test_clear_buffers_between_tasks(self, clear_buffers: bool, config... method test_hparams_have_same_defaults_as_in_sb3 (line 68) | def test_hparams_have_same_defaults_as_in_sb3( method method (line 108) | def method(cls, config: Config) -> StableBaselines3Method: method validate_results (line 112) | def validate_results( method test_debug (line 123) | def test_debug(self, method: StableBaselines3Method, setting: RLSettin... class DiscreteActionSpaceMethodTests (line 130) | class DiscreteActionSpaceMethodTests(StableBaselines3MethodTests): method test_monsterkong (line 137) | def test_monsterkong(self): function get_current_length_of_replay_buffer (line 155) | def get_current_length_of_replay_buffer(algo: BaseAlgorithm) -> int: function _ (line 161) | def _(algo: OffPolicyAlgorithm): function _ (line 166) | def _(algo: OnPolicyAlgorithm): class ContinuousActionSpaceMethodTests (line 171) | class ContinuousActionSpaceMethodTests(StableBaselines3MethodTests): FILE: sequoia/methods/stable_baselines3_methods/ddpg.py class DDPGModel (line 23) | class DDPGModel(DDPG, OffPolicyModel): class HParams (line 27) | class HParams(OffPolicyModel.HParams): class DDPGMethod (line 52) | class DDPGMethod(OffPolicyMethod): method configure (line 63) | def configure(self, setting: ContinualRLSetting): method create_model (line 66) | def create_model(self, train_env: gym.Env, valid_env: gym.Env) -> DDPG... method fit (line 69) | def fit(self, train_env: gym.Env, valid_env: gym.Env): method get_actions (line 72) | def get_actions( method on_task_switch (line 80) | def on_task_switch(self, task_id: Optional[int]) -> None: FILE: sequoia/methods/stable_baselines3_methods/ddpg_test.py class TestDDPG (line 11) | class TestDDPG(ContinuousActionSpaceMethodTests): FILE: sequoia/methods/stable_baselines3_methods/dqn.py class DQNModel (line 24) | class DQNModel(DQN, OffPolicyModel): class HParams (line 28) | class HParams(OffPolicyModel.HParams): method train (line 75) | def train(self, gradient_steps: int, batch_size: int = 100) -> None: class DQNMethod (line 81) | class DQNMethod(OffPolicyMethod): method configure (line 92) | def configure(self, setting: ContinualRLSetting): method create_model (line 107) | def create_model(self, train_env: gym.Env, valid_env: gym.Env) -> DQNM... method fit (line 110) | def fit(self, train_env: gym.Env, valid_env: gym.Env): method get_actions (line 113) | def get_actions( method on_task_switch (line 125) | def on_task_switch(self, task_id: Optional[int]) -> None: FILE: sequoia/methods/stable_baselines3_methods/dqn_test.py class TestDQN (line 17) | class TestDQN(DiscreteActionSpaceMethodTests, OffPolicyMethodTests): method test_classic_control_state (line 25) | def test_classic_control_state(self, config: Config): method test_incremental_classic_control_state (line 29) | def test_incremental_classic_control_state(self, config: Config): method test_dqn_monsterkong_adds_channel_first_transform (line 32) | def test_dqn_monsterkong_adds_channel_first_transform(self): FILE: sequoia/methods/stable_baselines3_methods/off_policy_method.py function decode_trainfreq (line 25) | def decode_trainfreq(v: Any): class OffPolicyModel (line 34) | class OffPolicyModel(OffPolicyAlgorithm, ABC): class HParams (line 38) | class HParams(SB3BaseHParams): class OffPolicyMethod (line 89) | class OffPolicyMethod(StableBaselines3Method, ABC): method __post_init__ (line 99) | def __post_init__(self): method configure (line 103) | def configure(self, setting: ContinualRLSetting): method create_model (line 218) | def create_model(self, train_env: gym.Env, valid_env: gym.Env) -> OffP... method fit (line 221) | def fit(self, train_env: gym.Env, valid_env: gym.Env): method get_actions (line 224) | def get_actions( method on_task_switch (line 232) | def on_task_switch(self, task_id: Optional[int]) -> None: method clear_buffers (line 243) | def clear_buffers(self): FILE: sequoia/methods/stable_baselines3_methods/off_policy_method_test.py class OffPolicyMethodTests (line 6) | class OffPolicyMethodTests: FILE: sequoia/methods/stable_baselines3_methods/on_policy_method.py class OnPolicyModel (line 24) | class OnPolicyModel(OnPolicyAlgorithm, ABC): class HParams (line 28) | class HParams(SB3BaseHParams): class OnPolicyMethod (line 98) | class OnPolicyMethod(StableBaselines3Method, ABC): method configure (line 106) | def configure(self, setting: ContinualRLSetting): method create_model (line 131) | def create_model(self, train_env: gym.Env, valid_env: gym.Env) -> OnPo... method fit (line 135) | def fit(self, train_env: gym.Env, valid_env: gym.Env): method get_actions (line 138) | def get_actions( method on_task_switch (line 146) | def on_task_switch(self, task_id: Optional[int]) -> None: method clear_buffers (line 157) | def clear_buffers(self): method get_search_space (line 166) | def get_search_space(self, setting: ContinualRLSetting) -> Mapping[str... FILE: sequoia/methods/stable_baselines3_methods/policy_wrapper.py class PolicyWrapper (line 22) | class PolicyWrapper(BasePolicy, ABC, Generic[Policy]): method __init__ (line 36) | def __init__(self, *args, _already_initialized: bool = False, **kwargs): method get_loss (line 43) | def get_loss(self: Policy) -> Union[float, Tensor]: method before_optimizer_step (line 50) | def before_optimizer_step(self: Policy): method after_zero_grad (line 55) | def after_zero_grad(self: Policy): method wrap_policy (line 67) | def wrap_policy( method wrap_policy_class (line 120) | def wrap_policy_class( method wrap_algorithm (line 141) | def wrap_algorithm(cls: Type[Wrapper], algo: SB3Algo, **wrapper_kwargs... method wrap_algorithm_class (line 164) | def wrap_algorithm_class( class A2CWithEWC (line 215) | class A2CWithEWC(A2C): method __init__ (line 216) | def __init__(self, *args, ewc_coefficient: float = 1.0, ewc_p_norm: in... method _setup_model (line 222) | def _setup_model(self): method on_task_switch (line 231) | def on_task_switch(self, task_id: Optional[int]) -> None: FILE: sequoia/methods/stable_baselines3_methods/ppo.py class PPOModel (line 23) | class PPOModel(PPO, OnPolicyModel): class HParams (line 36) | class HParams(OnPolicyModel.HParams): class PPOMethod (line 134) | class PPOMethod(OnPolicyMethod): method configure (line 141) | def configure(self, setting: ContinualRLSetting): method create_model (line 144) | def create_model(self, train_env: gym.Env, valid_env: gym.Env) -> PPOM... method fit (line 148) | def fit(self, train_env: gym.Env, valid_env: gym.Env): method get_actions (line 151) | def get_actions( method on_task_switch (line 159) | def on_task_switch(self, task_id: Optional[int]) -> None: method get_search_space (line 170) | def get_search_space(self, setting: ContinualRLSetting) -> Mapping[str... FILE: sequoia/methods/stable_baselines3_methods/ppo_test.py class TestPPO (line 8) | class TestPPO(DiscreteActionSpaceMethodTests): FILE: sequoia/methods/stable_baselines3_methods/sac.py class SACModel (line 22) | class SACModel(SAC, OffPolicyModel): class HParams (line 26) | class HParams(OffPolicyModel.HParams): class SACMethod (line 50) | class SACMethod(OffPolicyMethod): method configure (line 61) | def configure(self, setting: ContinualRLSetting): method create_model (line 64) | def create_model(self, train_env: gym.Env, valid_env: gym.Env) -> SACM... method fit (line 67) | def fit(self, train_env: gym.Env, valid_env: gym.Env): method get_actions (line 70) | def get_actions( method on_task_switch (line 78) | def on_task_switch(self, task_id: Optional[int]) -> None: FILE: sequoia/methods/stable_baselines3_methods/sac_test.py class TestSAC (line 17) | class TestSAC(ContinuousActionSpaceMethodTests): method test_continuous_mountaincar (line 29) | def test_continuous_mountaincar(self, Setting: Type[Setting], observe_... FILE: sequoia/methods/stable_baselines3_methods/td3.py class TD3Model (line 21) | class TD3Model(TD3, OffPolicyModel): class HParams (line 23) | class HParams(OffPolicyModel.HParams): class TD3Method (line 48) | class TD3Method(OffPolicyMethod): method configure (line 57) | def configure(self, setting: ContinualRLSetting): method create_model (line 60) | def create_model(self, train_env: gym.Env, valid_env: gym.Env) -> TD3M... method fit (line 63) | def fit(self, train_env: gym.Env, valid_env: gym.Env): method get_actions (line 66) | def get_actions( method on_task_switch (line 74) | def on_task_switch(self, task_id: Optional[int]) -> None: FILE: sequoia/methods/stable_baselines3_methods/td3_test.py class TestTD3 (line 8) | class TestTD3(ContinuousActionSpaceMethodTests): FILE: sequoia/methods/trainer.py class TrainerConfig (line 36) | class TrainerConfig(HyperParameters, Parseable): method make_trainer (line 79) | def make_trainer( class Trainer (line 120) | class Trainer(_Trainer): method __init__ (line 121) | def __init__(self, **kwargs): method fit (line 124) | def fit(self, model, train_dataloader=None, val_dataloaders=None, data... function _apply_to_batch (line 160) | def _apply_to_batch( class ProfiledEnvironment (line 178) | class ProfiledEnvironment(IterableWrapper, DataLoader): method __iter__ (line 179) | def __iter__(self): class PatchedDataConnector (line 193) | class PatchedDataConnector(DataConnector): method get_profiled_train_dataloader (line 194) | def get_profiled_train_dataloader(self, train_dataloader: DataLoader): FILE: sequoia/settings/assumptions/base.py class AssumptionBase (line 17) | class AssumptionBase(SettingABC): FILE: sequoia/settings/assumptions/context_discreteness.py class ContinuousContextAssumption (line 9) | class ContinuousContextAssumption(AssumptionBase): class DiscreteContextAssumption (line 16) | class DiscreteContextAssumption(ContinuousContextAssumption): FILE: sequoia/settings/assumptions/context_visibility.py class HiddenContextAssumption (line 9) | class HiddenContextAssumption(AssumptionBase): class PartiallyObservableContextAssumption (line 23) | class PartiallyObservableContextAssumption(HiddenContextAssumption): class FullyObservableContextAssumption (line 33) | class FullyObservableContextAssumption(PartiallyObservableContextAssumpt... FILE: sequoia/settings/assumptions/continual.py class ContinualResults (line 34) | class ContinualResults(TaskResults[MetricsType]): method online_performance (line 39) | def online_performance(self) -> Dict[int, MetricsType]: method online_performance_metrics (line 55) | def online_performance_metrics(self) -> MetricsType: method to_log_dict (line 58) | def to_log_dict(self, verbose: bool = False) -> Dict: method summary (line 67) | def summary(self, verbose: bool = False) -> str: class ContinualAssumption (line 75) | class ContinualAssumption(AssumptionBase): class Observations (line 97) | class Observations(AssumptionBase.Observations): class Actions (line 101) | class Actions(AssumptionBase.Actions): class Rewards (line 105) | class Rewards(AssumptionBase.Rewards): method main_loop (line 120) | def main_loop(self, method: Method) -> ContinualResults: method test_loop (line 159) | def test_loop(self, method: Method) -> "IncrementalAssumption.Results": method setup_wandb (line 248) | def setup_wandb(self, method: Method) -> Run: method log_results (line 291) | def log_results(self, method: Method, results: Results, prefix: str = ... method phases (line 329) | def phases(self) -> int: class TestEnvironment (line 345) | class TestEnvironment(gym.wrappers.Monitor, IterableWrapper[EnvType], ABC): method __init__ (line 350) | def __init__( method step (line 371) | def step(self, action): method reset (line 379) | def reset(self, **kwargs): method get_results (line 386) | def get_results(self) -> Results: method step (line 404) | def step(self, action): FILE: sequoia/settings/assumptions/discrete_results.py class TaskSequenceResults (line 16) | class TaskSequenceResults(Results, Generic[MetricType]): method __post_init__ (line 25) | def __post_init__(self): method objective_name (line 33) | def objective_name(self) -> str: method num_tasks (line 37) | def num_tasks(self) -> int: method average_metrics (line 48) | def average_metrics(self) -> MetricType: method average_metrics_per_task (line 52) | def average_metrics_per_task(self) -> List[MetricType]: method objective (line 56) | def objective(self) -> float: method to_log_dict (line 59) | def to_log_dict(self, verbose: bool = False) -> Dict: method summary (line 66) | def summary(self, verbose: bool = False): method make_plots (line 72) | def make_plots(self) -> Dict[str, plt.Figure]: FILE: sequoia/settings/assumptions/iid.py class TraditionalSetting (line 14) | class TraditionalSetting(TaskIncrementalAssumption): method phases (line 22) | def phases(self) -> int: FILE: sequoia/settings/assumptions/iid_results.py class TaskResults (line 14) | class TaskResults(Results, Generic[MetricType]): method __post_init__ (line 27) | def __post_init__(self): method __str__ (line 33) | def __str__(self) -> str: method __repr__ (line 36) | def __repr__(self) -> str: method average_metrics (line 40) | def average_metrics(self) -> MetricType: method objective (line 45) | def objective(self) -> float: method objective_name (line 59) | def objective_name(self) -> str: method __str__ (line 63) | def __str__(self): method to_log_dict (line 66) | def to_log_dict(self, verbose: bool = False) -> Dict: method summary (line 84) | def summary(self) -> str: method make_plots (line 87) | def make_plots(self) -> Dict[str, plt.Figure]: FILE: sequoia/settings/assumptions/incremental.py class IncrementalAssumption (line 26) | class IncrementalAssumption(ContinualAssumption): class Observations (line 44) | class Observations(Setting.Observations): method __post_init__ (line 78) | def __post_init__(self): method phases (line 92) | def phases(self) -> int: method current_task_id (line 102) | def current_task_id(self) -> Optional[int]: method current_task_id (line 115) | def current_task_id(self, value: int) -> None: method task_boundary_reached (line 119) | def task_boundary_reached(self, method: Method, task_id: int, training... method main_loop (line 151) | def main_loop(self, method: Method) -> IncrementalResults: method test_loop (line 220) | def test_loop(self, method: Method) -> "IncrementalAssumption.Results": method train_dataloader (line 298) | def train_dataloader( method val_dataloader (line 305) | def val_dataloader( method test_dataloader (line 314) | def test_dataloader( method _get_objective_scaling_factor (line 320) | def _get_objective_scaling_factor(self) -> float: FILE: sequoia/settings/assumptions/incremental_results.py class IncrementalResults (line 23) | class IncrementalResults(Results, Generic[MetricType]): method __post_init__ (line 38) | def __post_init__(self): method runtime_minutes (line 45) | def runtime_minutes(self) -> Optional[float]: method runtime_hours (line 49) | def runtime_hours(self) -> Optional[float]: method transfer_matrix (line 53) | def transfer_matrix(self) -> List[List[TaskResults]]: method metrics_matrix (line 59) | def metrics_matrix(self) -> List[List[MetricType]]: method objective_matrix (line 77) | def objective_matrix(self) -> List[List[float]]: method cl_score (line 94) | def cl_score(self) -> float: method _runtime_score (line 115) | def _runtime_score(self) -> float: method _online_performance_score (line 144) | def _online_performance_score(self) -> float: method _final_performance_score (line 154) | def _final_performance_score(self) -> float: method objective (line 165) | def objective(self) -> float: method num_tasks (line 170) | def num_tasks(self) -> int: method online_performance (line 174) | def online_performance(self) -> List[Dict[int, MetricType]]: method online_performance_metrics (line 193) | def online_performance_metrics(self) -> List[MetricType]: method final_performance (line 200) | def final_performance(self) -> List[TaskResults[MetricType]]: method final_performance_metrics (line 204) | def final_performance_metrics(self) -> List[MetricType]: method average_online_performance (line 208) | def average_online_performance(self) -> MetricType: method average_final_performance (line 212) | def average_final_performance(self) -> MetricType: method to_log_dict (line 215) | def to_log_dict(self, verbose: bool = False) -> Dict: method summary (line 238) | def summary(self, verbose: bool = False): method make_plots (line 246) | def make_plots(self) -> Dict[str, Union[plt.Figure, Dict]]: method __str__ (line 273) | def __str__(self) -> str: FILE: sequoia/settings/assumptions/incremental_test.py class DummyMethod (line 14) | class DummyMethod(Method, target_setting=IncrementalAssumption): method __init__ (line 19) | def __init__(self): method fit (line 27) | def fit(self, train_env: gym.Env = None, valid_env: gym.Env = None): method test (line 39) | def test(self, test_env: TestEnvironment): method get_actions (line 47) | def get_actions( method on_task_switch (line 52) | def on_task_switch(self, task_id: int = None): class OtherDummyMethod (line 58) | class OtherDummyMethod(Method, target_setting=IncrementalAssumption): method __init__ (line 59) | def __init__(self): method fit (line 62) | def fit(self, train_env: Environment, valid_env: Environment): method get_actions (line 98) | def get_actions(self, observations: Observations, action_space: Space)... FILE: sequoia/settings/assumptions/task_incremental.py class TaskIncrementalAssumption (line 10) | class TaskIncrementalAssumption(FullyObservableContextAssumption, Increm... FILE: sequoia/settings/assumptions/task_type.py class ClassificationActions (line 10) | class ClassificationActions(Actions): method action (line 20) | def action(self) -> LongTensor: method y_pred_log_prob (line 24) | def y_pred_log_prob(self) -> Tensor: method y_pred_prob (line 29) | def y_pred_prob(self) -> Tensor: method probabilities (line 34) | def probabilities(self) -> Tensor: FILE: sequoia/settings/base/bases.py class SettingABC (line 52) | class SettingABC: method apply (line 78) | def apply(self, method: "Method", config: "Config" = None) -> "Setting... method prepare_data (line 120) | def prepare_data(self, *args, **kwargs): method setup (line 124) | def setup(self, stage: Optional[str] = None): method train_dataloader (line 128) | def train_dataloader(self, *args, **kwargs) -> Environment[Observation... method val_dataloader (line 132) | def val_dataloader(self, *args, **kwargs) -> Environment[Observations,... method test_dataloader (line 136) | def test_dataloader(self, *args, **kwargs) -> Environment[Observations... method get_available_datasets (line 141) | def get_available_datasets(cls) -> Iterable[str]: method __init_subclass__ (line 154) | def __init_subclass__(cls, **kwargs): method get_applicable_methods (line 168) | def get_applicable_methods(cls) -> List[Type["Method"]]: method register_method (line 179) | def register_method(cls, method: Type["Method"]): method get_name (line 184) | def get_name(cls) -> str: method immediate_children (line 193) | def immediate_children(cls) -> Iterable[Type["SettingABC"]]: method get_immediate_children (line 200) | def get_immediate_children(cls) -> List[Type["SettingABC"]]: method children (line 205) | def children(cls) -> Iterable[Type["SettingABC"]]: method get_children (line 214) | def get_children(cls) -> List[Type["SettingABC"]]: method immediate_parents (line 218) | def immediate_parents(cls) -> List[Type["SettingABC"]]: method get_immediate_parents (line 225) | def get_immediate_parents(cls) -> List[Type["SettingABC"]]: method parents (line 232) | def parents(cls) -> Iterable[Type["SettingABC"]]: method get_parents (line 244) | def get_parents(cls) -> List[Type["SettingABC"]]: method get_path_to_source_file (line 248) | def get_path_to_source_file(cls: Type) -> Path: method get_tree_string (line 254) | def get_tree_string( class Method (line 283) | class Method(Generic[SettingType], Parseable, ABC): method configure (line 293) | def configure(self, setting: SettingType) -> None: method get_actions (line 301) | def get_actions( method fit (line 309) | def fit( method test (line 319) | def test(self, test_env: Environment[Observations, Actions, Optional[R... method receive_results (line 351) | def receive_results(self, setting: SettingType, results: Results) -> N... method setup_wandb (line 431) | def setup_wandb(self, run: Run) -> None: method set_training (line 446) | def set_training(self) -> None: method set_testing (line 463) | def set_testing(self) -> None: method training (line 481) | def training(self) -> bool: method testing (line 492) | def testing(self) -> bool: method main (line 508) | def main(cls, argv: Optional[Union[str, List[str]]] = None) -> Results: method is_applicable (line 532) | def is_applicable(cls, setting: Union[SettingType, Type[SettingType]])... method get_applicable_settings (line 567) | def get_applicable_settings(cls) -> List[Type[SettingType]]: method all_evaluation_settings (line 578) | def all_evaluation_settings(cls, **kwargs) -> Iterable[SettingType]: method get_name (line 591) | def get_name(cls) -> str: method get_family (line 600) | def get_family(cls) -> Optional[str]: method get_full_name (line 609) | def get_full_name(cls) -> str: method __init_subclass__ (line 619) | def __init_subclass__(cls, target_setting: Type[SettingType] = None, *... method get_path_to_source_file (line 642) | def get_path_to_source_file(cls) -> Path: method get_experiment_name (line 645) | def get_experiment_name(self, setting: SettingABC, experiment_id: str ... method get_search_space (line 675) | def get_search_space(self, setting: SettingABC) -> Mapping[str, Union[... method adapt_to_new_hparams (line 694) | def adapt_to_new_hparams(self, new_hparams: Dict[str, Any]) -> None: method hparam_sweep (line 716) | def hparam_sweep( FILE: sequoia/settings/base/environment.py class Environment (line 21) | class Environment( method is_closed (line 34) | def is_closed(self) -> bool: FILE: sequoia/settings/base/objects.py class Observations (line 11) | class Observations(Batch): method state (line 17) | def state(self) -> Tensor: method __len__ (line 20) | def __len__(self) -> int: class Actions (line 25) | class Actions(Batch): method actions (line 36) | def actions(self) -> Tensor: method actions_np (line 40) | def actions_np(self) -> np.ndarray: method predictions (line 47) | def predictions(self) -> Tensor: class Rewards (line 55) | class Rewards(Batch, Generic[T]): method labels (line 69) | def labels(self) -> T: method reward (line 73) | def reward(self) -> T: FILE: sequoia/settings/base/results.py class Results (line 37) | class Results(Serializable, ABC): method objective (line 53) | def objective(self) -> float: method summary (line 62) | def summary(self) -> str: method make_plots (line 70) | def make_plots(self) -> Dict[str, plt.Figure]: method to_log_dict (line 79) | def to_log_dict(self, verbose: bool = False) -> Dict[str, Any]: method save (line 83) | def save(self, path: Union[str, Path], dump_fn=None, **kwargs) -> None: method save_to_dir (line 88) | def save_to_dir(self, save_dir: Union[str, Path], filename: str = "res... method __eq__ (line 112) | def __eq__(self, other: Any) -> bool: method __gt__ (line 119) | def __gt__(self, other: Any) -> bool: FILE: sequoia/settings/base/setting.py class Setting (line 60) | class Setting( method __post_init__ (line 165) | def __post_init__( method apply (line 247) | def apply(self, method: Method, config: Config = None) -> "Setting.Res... method get_metrics (line 281) | def get_metrics(self, actions: Actions, rewards: Rewards) -> Union[flo... method image_space (line 323) | def image_space(self) -> Optional[gym.Space]: method observation_space (line 338) | def observation_space(self) -> gym.Space: method observation_space (line 342) | def observation_space(self, value: gym.Space) -> None: method action_space (line 365) | def action_space(self) -> gym.Space: method action_space (line 369) | def action_space(self, value: gym.Space) -> None: method reward_space (line 373) | def reward_space(self) -> gym.Space: method reward_space (line 377) | def reward_space(self, value: gym.Space) -> None: method get_available_datasets (line 381) | def get_available_datasets(cls) -> Iterable[str]: method _setup_config (line 385) | def _setup_config(self, method: Method) -> Config: method main (line 403) | def main(cls, argv: Optional[Union[str, List[str]]] = None) -> Results: method apply_all (line 417) | def apply_all(self, argv: Union[str, List[str]] = None) -> Dict[Type["... method _check_environments (line 436) | def _check_environments(self): method _check_observations (line 525) | def _check_observations(self, env: Environment, observations: Any): method _check_actions (line 549) | def _check_actions(self, env: Environment, actions: Any): method _check_rewards (line 559) | def _check_rewards(self, env: Environment, rewards: Any): method __new__ (line 573) | def __new__(cls, *args, **kwargs): method load_benchmark (line 577) | def load_benchmark(cls: Type[SettingType], benchmark: Union[str, Path]... FILE: sequoia/settings/base/setting_meta.py class SettingMeta (line 13) | class SettingMeta(Type["Setting"]): method __call__ (line 32) | def __call__(cls, *args, **kwargs): method __instancecheck__ (line 71) | def __instancecheck__(self, instance): FILE: sequoia/settings/base/setting_test.py class Setting1 (line 15) | class Setting1(Setting): method __post_init__ (line 19) | def __post_init__(self): class Setting2 (line 25) | class Setting2(Setting1): method __post_init__ (line 28) | def __post_init__(self): function test_settings_override_with_constant_take_init (line 34) | def test_settings_override_with_constant_take_init(): function test_loading_benchmark_doesnt_overwrite_constant (line 48) | def test_loading_benchmark_doesnt_overwrite_constant(): function test_init_still_works (line 58) | def test_init_still_works(): function test_passing_unexpected_arg_raises_typeerror (line 63) | def test_passing_unexpected_arg_raises_typeerror(): class SettingA (line 69) | class SettingA(Setting): class SettingA1 (line 74) | class SettingA1(SettingA): class SettingA2 (line 79) | class SettingA2(SettingA): class SettingB (line 84) | class SettingB(Setting): class MethodA (line 88) | class MethodA(Method, target_setting=SettingA): class MethodB (line 92) | class MethodB(Method, target_setting=SettingB): class CoolGeneralMethod (line 96) | class CoolGeneralMethod(Method, target_setting=Setting): function test_that_transforms_can_be_set_through_command_line (line 100) | def test_that_transforms_can_be_set_through_command_line(): class SettingTests (line 123) | class SettingTests: method __init_subclass__ (line 182) | def __init_subclass__(cls, setting: Type[Setting] = None): method assert_chance_level (line 196) | def assert_chance_level(self, setting: Setting, results: Setting.Resul... method test_random_baseline (line 209) | def test_random_baseline(self, config: Config): function make_dataset_fixture (line 237) | def make_dataset_fixture(setting_type: Union[Type[Setting], functools.pa... FILE: sequoia/settings/offline_rl/setting.py class OfflineRLResults (line 21) | class OfflineRLResults(Results): method summary (line 24) | def summary(self) -> str: method make_plots (line 27) | def make_plots(self) -> Dict[str, plt.Figure]: method to_log_dict (line 30) | def to_log_dict(self, verbose: bool = False) -> Dict[str, Any]: method objective (line 41) | def objective(self): class OfflineRLSetting (line 62) | class OfflineRLSetting(Setting): method __post_init__ (line 79) | def __post_init__(self): method train_dataloader (line 96) | def train_dataloader(self, batch_size: int = None) -> DataLoader: method val_dataloader (line 99) | def val_dataloader(self, batch_size: int = None) -> DataLoader: method test (line 102) | def test(self, method, test_env: gym.Env): method apply (line 119) | def apply(self, method) -> OfflineRLResults: FILE: sequoia/settings/rl/continual/environment.py class GymDataLoader (line 57) | class GymDataLoader( method __init__ (line 102) | def __init__( method num_workers (line 189) | def num_workers(self) -> Optional[int]: method num_workers (line 193) | def num_workers(self, value: Any) -> Optional[int]: method batch_size (line 202) | def batch_size(self) -> Optional[int]: method batch_size (line 206) | def batch_size(self, value: Any) -> Optional[int]: method __next__ (line 214) | def __next__(self) -> ObservationType: method _obs_have_done_signal (line 224) | def _obs_have_done_signal(self) -> bool: method __iter__ (line 233) | def __iter__(self) -> Iterator: method step (line 316) | def step(self, action: Union[ActionType, Any]) -> StepResult: method send (line 320) | def send(self, action: Union[ActionType, Any]) -> RewardType: FILE: sequoia/settings/rl/continual/environment_test.py class TestGymDataLoader (line 22) | class TestGymDataLoader: method test_spaces (line 31) | def test_spaces(self, env_name: str, batch_size: int): method test_max_steps_is_respected (line 63) | def test_max_steps_is_respected(self, env_name: str, batch_size: int): method test_multiple_epochs_works (line 86) | def test_multiple_epochs_works(self, batch_size: Optional[int], seed: ... method test_reward_isnt_always_one (line 157) | def test_reward_isnt_always_one(self, env_name: str, batch_size: int): method test_batched_state (line 177) | def test_batched_state(self, env_name: str, batch_size: int): method test_batched_pixels (line 213) | def test_batched_pixels(self, env_name: str, batch_size: int): FILE: sequoia/settings/rl/continual/make_env.py function make_batched_env (line 21) | def make_batched_env( function wrap (line 128) | def wrap(env: gym.Env, wrappers: Iterable[Union[Type[Wrapper], WrapperAn... function _make_wrapper_fns (line 138) | def _make_wrapper_fns( FILE: sequoia/settings/rl/continual/make_env_test.py function test_make_batched_env (line 19) | def test_make_batched_env(env_name: str, batch_size: int): function test_make_batched_env_envs_have_distinct_ids (line 40) | def test_make_batched_env_envs_have_distinct_ids(env_name: str, batch_si... function get_unwrapped_id (line 66) | def get_unwrapped_id(env): function test_make_env_with_wrapper (line 73) | def test_make_env_with_wrapper(env_name: str, batch_size: int): function test_make_env_with_wrapper_and_kwargs (line 99) | def test_make_env_with_wrapper_and_kwargs(env_name: str, batch_size: int): FILE: sequoia/settings/rl/continual/objects.py class Observations (line 11) | class Observations(RLSetting.Observations, ContinualAssumption.Observati... class Actions (line 23) | class Actions(RLSetting.Actions, ContinualAssumption.Actions): class Rewards (line 30) | class Rewards(RLSetting.Rewards, ContinualAssumption.Rewards): FILE: sequoia/settings/rl/continual/results.py class ContinualRLResults (line 10) | class ContinualRLResults(ContinualResults, Generic[MetricType]): method mean_reward_plot (line 24) | def mean_reward_plot(self): FILE: sequoia/settings/rl/continual/setting.py class SB3AtariWrapper (line 25) | class SB3AtariWrapper: class ContinualRLSetting (line 91) | class ContinualRLSetting(RLSetting, ContinualAssumption): method __post_init__ (line 274) | def __post_init__(self): method create_train_task_schedule (line 599) | def create_train_task_schedule(self) -> TaskSchedule: method create_val_task_schedule (line 623) | def create_val_task_schedule(self) -> TaskSchedule: method create_test_task_schedule (line 627) | def create_test_task_schedule(self) -> TaskSchedule[ContinuousTask]: method create_task_schedule (line 647) | def create_task_schedule( method observation_space (line 684) | def observation_space(self) -> TypedDictSpace: method task_label_space (line 729) | def task_label_space(self) -> gym.Space: method action_space (line 746) | def action_space(self) -> gym.Space: method reward_space (line 755) | def reward_space(self) -> gym.Space: method apply (line 763) | def apply(self, method: Method, config: Config = None) -> "ContinualRL... method setup (line 816) | def setup(self, stage: str = None) -> None: method prepare_data (line 827) | def prepare_data(self, *args, **kwargs) -> None: method train_dataloader (line 833) | def train_dataloader( method val_dataloader (line 895) | def val_dataloader(self, batch_size: int = None, num_workers: int = No... method test_dataloader (line 950) | def test_dataloader(self, batch_size: int = None, num_workers: int = N... method phases (line 1051) | def phases(self) -> int: method steps_per_phase (line 1063) | def steps_per_phase(self) -> Optional[int]: method _make_env (line 1078) | def _make_env( method _make_env_dataloader (line 1101) | def _make_env_dataloader( method create_train_wrappers (line 1167) | def create_train_wrappers(self) -> List[Callable[[gym.Env], gym.Env]]: method create_valid_wrappers (line 1194) | def create_valid_wrappers(self) -> List[Callable[[gym.Env], gym.Env]]: method create_test_wrappers (line 1220) | def create_test_wrappers(self) -> List[Callable[[gym.Env], gym.Env]]: method _make_wrappers (line 1242) | def _make_wrappers( method _get_objective_scaling_factor (line 1337) | def _get_objective_scaling_factor(self) -> float: method _get_simple_name (line 1365) | def _get_simple_name(self, env_name_or_id: str) -> Optional[str]: function _load_task_schedule (line 1382) | def _load_task_schedule(file_path: Path) -> Dict[int, Dict]: function find_matching_dataset (line 1393) | def find_matching_dataset( FILE: sequoia/settings/rl/continual/setting_test.py function test_passing_unsupported_dataset_raises_error (line 42) | def test_passing_unsupported_dataset_raises_error(dataset: Any): function test_acrobot_attributes_change_over_time (line 47) | def test_acrobot_attributes_change_over_time(): function wrap (line 177) | def wrap( function wrap_reversed (line 203) | def wrap_reversed( function _equal (line 210) | def _equal(a: Any, b: Any) -> bool: function _partials_equal (line 230) | def _partials_equal(a: partial, b: partial) -> bool: function _lists_equal (line 243) | def _lists_equal(a: List, b: List) -> bool: function _dicts_equal (line 248) | def _dicts_equal(a: Dict, b: Dict) -> bool: function all_different_from_next (line 260) | def all_different_from_next(sequence: Sequence) -> bool: class TestContinualRLSetting (line 265) | class TestContinualRLSetting(SettingTests): method setting_kwargs (line 270) | def setting_kwargs(self, dataset: str, config: Config): method test_passing_supported_dataset (line 274) | def test_passing_supported_dataset(self, setting_kwargs: Dict): method test_task_schedule_is_reproducible (line 285) | def test_task_schedule_is_reproducible(self, dataset: str, seed: Optio... method test_using_deprecated_fields (line 295) | def test_using_deprecated_fields(self): method test_tasks_are_different (line 316) | def test_tasks_are_different(self, setting_kwargs: Dict[str, Any], con... method test_settings_attributes_are_the_same_for_given_seed (line 327) | def test_settings_attributes_are_the_same_for_given_seed( method test_tasks_are_different_when_seed_is_different (line 348) | def test_tasks_are_different_when_seed_is_different( method test_env_attributes_change (line 390) | def test_env_attributes_change(self, setting_kwargs: Dict[str, Any], c... method validate_env_value_changes (line 448) | def validate_env_value_changes( method validate_results (line 496) | def validate_results( method test_check_iterate_and_step (line 514) | def test_check_iterate_and_step( method test_show_distributions (line 701) | def test_show_distributions(self, config: Config): function test_passing_task_schedule_sets_other_attributes_correctly (line 780) | def test_passing_task_schedule_sets_other_attributes_correctly(): function test_fit_and_on_task_switch_calls (line 824) | def test_fit_and_on_task_switch_calls(): function test_mujoco_env_name_maps_to_continual_variant (line 874) | def test_mujoco_env_name_maps_to_continual_variant( FILE: sequoia/settings/rl/continual/tasks.py class TaskSchedule (line 42) | class TaskSchedule(Dict[int, TaskType]): class EnvironmentNotSupportedError (line 46) | class EnvironmentNotSupportedError(gym.error.UnregisteredEnv): function names_match (line 50) | def names_match(name_a: str, name_b: str) -> bool: function _is_supported (line 59) | def _is_supported( function task_sampling_function (line 123) | def task_sampling_function( function make_continuous_task (line 220) | def make_continuous_task( function make_task_for_classic_control_env (line 310) | def make_task_for_classic_control_env( function make_task_for_modified_gravity_env (line 364) | def make_task_for_modified_gravity_env( FILE: sequoia/settings/rl/continual/tasks_test.py function test_mujoco_tasks (line 29) | def test_mujoco_tasks(env_type: Type[MujocoEnv]): FILE: sequoia/settings/rl/continual/test_environment.py class ContinualRLTestEnvironment (line 12) | class ContinualRLTestEnvironment(TestEnvironment): method __init__ (line 13) | def __init__(self, *args, task_schedule: Dict, **kwargs): method __len__ (line 18) | def __len__(self): method get_results (line 21) | def get_results(self) -> ContinualResults[EpisodeMetrics]: method render (line 49) | def render(self, mode="human", **kwargs): method _after_reset (line 56) | def _after_reset(self, observation): FILE: sequoia/settings/rl/discrete/multienv_wrappers.py function instantiate_env (line 22) | def instantiate_env(env: Union[str, gym.Env, Callable[[], gym.Env]]) -> ... class MultiEnvWrapper (line 31) | class MultiEnvWrapper(IterableWrapper, ABC): method __init__ (line 38) | def __init__(self, envs: List[gym.Env], add_task_ids: bool = False): method _instantiate_env (line 54) | def _instantiate_env(self, index: int) -> None: method set_task (line 57) | def set_task(self, task_id: int) -> None: method next_task (line 75) | def next_task(self) -> int: method reset (line 78) | def reset(self): method step (line 87) | def step(self, action): method is_closed (line 92) | def is_closed(self, env_index: int = None): method close (line 116) | def close(self, env_index: int = None) -> None: method seed (line 136) | def seed(self, seed: Optional[int] = None) -> List[int]: method observation (line 164) | def observation(self, observation): class ConcatEnvsWrapper (line 170) | class ConcatEnvsWrapper(MultiEnvWrapper): method __init__ (line 173) | def __init__( method set_task (line 182) | def set_task(self, task_id: int) -> None: method reset (line 187) | def reset(self): method next_task (line 195) | def next_task(self) -> int: method __iter__ (line 202) | def __iter__(self): method send (line 205) | def send(self, action): function _concatenate_gym_envs (line 213) | def _concatenate_gym_envs(first_env: gym.Env, *other_envs: gym.Env) -> C... class RoundRobinWrapper (line 217) | class RoundRobinWrapper(MultiEnvWrapper): method __init__ (line 222) | def __init__(self, envs, add_task_ids=False): method next_task (line 226) | def next_task(self) -> int: class RandomMultiEnvWrapper (line 235) | class RandomMultiEnvWrapper(MultiEnvWrapper): method next_task (line 236) | def next_task(self) -> int: class CustomMultiEnvWrapper (line 242) | class CustomMultiEnvWrapper(MultiEnvWrapper): method __init__ (line 245) | def __init__( method next_task (line 255) | def next_task(self): FILE: sequoia/settings/rl/discrete/multienv_wrappers_test.py class TestMultiEnvWrappers (line 19) | class TestMultiEnvWrappers: method iterable_env (line 21) | def iterable_env(self) -> gym.Env: method test_concat (line 27) | def test_concat(self, add_task_ids: bool, nb_tasks: int, pass_fn_inste... method test_roundrobin (line 110) | def test_roundrobin(self, add_task_ids: bool, nb_tasks: int): method test_random (line 144) | def test_random(self): method test_iteration (line 183) | def test_iteration(self, iterable_env: gym.Env): method test_adding_envs (line 278) | def test_adding_envs(self): function test_batched_envs (line 295) | def test_batched_envs(): FILE: sequoia/settings/rl/discrete/results.py class DiscreteTaskAgnosticRLResults (line 9) | class DiscreteTaskAgnosticRLResults(TaskSequenceResults[MetricType]): FILE: sequoia/settings/rl/discrete/setting.py class DiscreteTaskAgnosticRLSetting (line 35) | class DiscreteTaskAgnosticRLSetting(DiscreteContextAssumption, Continual... method __post_init__ (line 97) | def __post_init__(self): method create_train_task_schedule (line 109) | def create_train_task_schedule(self) -> TaskSchedule[DiscreteTask]: method create_val_task_schedule (line 114) | def create_val_task_schedule(self) -> TaskSchedule[DiscreteTask]: method create_test_task_schedule (line 118) | def create_test_task_schedule(self) -> TaskSchedule[DiscreteTask]: FILE: sequoia/settings/rl/discrete/setting_test.py class TestDiscreteTaskAgnosticRLSetting (line 17) | class TestDiscreteTaskAgnosticRLSetting(ContinualRLSettingTests): method nb_tasks (line 22) | def nb_tasks(self, request): method setting_kwargs (line 27) | def setting_kwargs(self, dataset: str, nb_tasks: int, config: Config): method test_passing_name_variant_works (line 40) | def test_passing_name_variant_works(self, dataset: str, expected_resul... method validate_results (line 43) | def validate_results( method test_fields_are_consistent (line 84) | def test_fields_are_consistent( function test_fit_and_on_task_switch_calls (line 151) | def test_fit_and_on_task_switch_calls(config: Config): function test_monsterkong_env_name_maps_to_continual_variant (line 197) | def test_monsterkong_env_name_maps_to_continual_variant( FILE: sequoia/settings/rl/discrete/tasks.py function make_discrete_task (line 28) | def make_discrete_task( function make_task_for_monsterkong_env (line 61) | def make_task_for_monsterkong_env( FILE: sequoia/settings/rl/discrete/tasks_test.py function test_monsterkong_tasks (line 10) | def test_monsterkong_tasks(): FILE: sequoia/settings/rl/discrete/test_environment.py class DiscreteTaskAgnosticRLTestEnvironment (line 12) | class DiscreteTaskAgnosticRLTestEnvironment(ContinualRLTestEnvironment): method __init__ (line 13) | def __init__(self, *args, task_schedule: Dict, **kwargs): method __len__ (line 20) | def __len__(self): method get_results (line 23) | def get_results(self) -> TaskSequenceResults[EpisodeMetrics]: method render (line 63) | def render(self, mode="human", **kwargs): method _after_reset (line 70) | def _after_reset(self, observation): FILE: sequoia/settings/rl/environment.py class RLEnvironment (line 20) | class RLEnvironment(DataLoader, Environment[ObservationType, ActionType,... method __init__ (line 43) | def __init__(self, dataset: Union[Dataset, IterableDataset], **dataloa... method send (line 52) | def send(self, action: ActionType) -> RewardType: FILE: sequoia/settings/rl/environment_test.py class ActiveMnistEnvironment (line 11) | class ActiveMnistEnvironment(ActiveEnvironment[Tensor, Tensor, Tensor]): method __init__ (line 18) | def __init__(self, start_class: int = 0, **kwargs): method __next__ (line 27) | def __next__(self) -> Tensor: method __iter__ (line 39) | def __iter__(self) -> Generator[Tensor, Tensor, None]: method send (line 47) | def send(self, action: Tensor) -> Tensor: function test_active_mnist_environment (line 59) | def test_active_mnist_environment(): FILE: sequoia/settings/rl/envs/__init__.py class AtariEnv (line 35) | class AtariEnv(gym.Env): class MetaMonsterKongEnv (line 49) | class MetaMonsterKongEnv(gym.Env): class MTEnv (line 65) | class MTEnv(gym.Env): class MujocoEnv (line 101) | class MujocoEnv(gym.Env): class ContinualHalfCheetahEnv (line 104) | class ContinualHalfCheetahEnv(MujocoEnv): class ContinualHalfCheetahV2Env (line 107) | class ContinualHalfCheetahV2Env(MujocoEnv): class ContinualHalfCheetahV3Env (line 110) | class ContinualHalfCheetahV3Env(MujocoEnv): class ContinualHopperEnv (line 113) | class ContinualHopperEnv(MujocoEnv): class ContinualHopperV2Env (line 116) | class ContinualHopperV2Env(MujocoEnv): class ContinualHopperV3Env (line 119) | class ContinualHopperV3Env(MujocoEnv): class ContinualWalker2dEnv (line 122) | class ContinualWalker2dEnv(MujocoEnv): class ContinualWalker2dV2Env (line 125) | class ContinualWalker2dV2Env(MujocoEnv): class ContinualWalker2dV3Env (line 128) | class ContinualWalker2dV3Env(MujocoEnv): class MetaWorldEnv (line 186) | class MetaWorldEnv(gym.Env, ABC): class MetaWorldMujocoEnv (line 189) | class MetaWorldMujocoEnv(gym.Env, ABC): class SawyerXYZEnv (line 192) | class SawyerXYZEnv(gym.Env, ABC): FILE: sequoia/settings/rl/envs/classic_control.py function register_classic_control_variants (line 12) | def register_classic_control_variants(env_registry: EnvRegistry = regist... FILE: sequoia/settings/rl/envs/monsterkong.py function observe_state (line 15) | def observe_state(env: MetaMonsterKongEnv) -> MetaMonsterKongEnv: function register_monsterkong_variants (line 29) | def register_monsterkong_variants(env_registry: EnvRegistry = registry) ... FILE: sequoia/settings/rl/envs/mujoco/__init__.py function get_entry_point (line 58) | def get_entry_point(Env: Type[gym.Env]) -> str: function register_mujoco_variants (line 85) | def register_mujoco_variants(env_registry: EnvRegistry = registry) -> None: FILE: sequoia/settings/rl/envs/mujoco/half_cheetah.py class HalfCheetahV2Env (line 15) | class HalfCheetahV2Env(_HalfCheetahV2Env): method __init__ (line 31) | def __init__(self, model_path: str = "half_cheetah.xml", frame_skip: i... class HalfCheetahV3Env (line 38) | class HalfCheetahV3Env(_HalfCheetahV3Env): method __init__ (line 49) | def __init__( class HalfCheetahWithSensorEnv (line 81) | class HalfCheetahWithSensorEnv(HalfCheetahV2Env): method __init__ (line 87) | def __init__(self, model_path: str, frame_skip: int = 5, n_bins: int =... method _get_obs (line 91) | def _get_obs(self): class ContinualHalfCheetahV2Env (line 105) | class ContinualHalfCheetahV2Env( method __init__ (line 108) | def __init__( class ContinualHalfCheetahV3Env (line 125) | class ContinualHalfCheetahV3Env( method __init__ (line 128) | def __init__( FILE: sequoia/settings/rl/envs/mujoco/half_cheetah_test.py class TestHalfCheetahV2 (line 14) | class TestHalfCheetahV2(ModifiedGravityEnvTests, ModifiedSizeEnvTests, M... class TestHalfCheetahV3 (line 19) | class TestHalfCheetahV3(ModifiedGravityEnvTests, ModifiedSizeEnvTests, M... FILE: sequoia/settings/rl/envs/mujoco/hopper.py class HopperV2Env (line 18) | class HopperV2Env(_HopperV2Env): method __init__ (line 26) | def __init__(self, model_path: str = "hopper.xml", frame_skip: int = 4): class HopperV3Env (line 31) | class HopperV3Env(_HopperV3Env): method __init__ (line 34) | def __init__( class HopperV2GravityEnv (line 65) | class HopperV2GravityEnv(ModifiedGravityEnv, HopperV2Env): method __init__ (line 67) | def __init__( class ContinualHopperV2Env (line 76) | class ContinualHopperV2Env(ModifiedGravityEnv, ModifiedSizeEnv, Modified... method __init__ (line 77) | def __init__( class ContinualHopperV3Env (line 94) | class ContinualHopperV3Env(ModifiedGravityEnv, ModifiedSizeEnv, Modified... method __init__ (line 95) | def __init__( FILE: sequoia/settings/rl/envs/mujoco/hopper_test.py class TestContinualHopperV2Env (line 27) | class TestContinualHopperV2Env(ModifiedGravityEnvTests, ModifiedSizeEnvT... class TestContinualHopperV3Env (line 32) | class TestContinualHopperV3Env(ModifiedGravityEnvTests, ModifiedSizeEnvT... function load_tree (line 36) | def load_tree(model_path: Path) -> ElementTree: function elements_equal (line 78) | def elements_equal(e1, e2) -> bool: function test_change_torso (line 127) | def test_change_torso(input_xml_str: str, scale_factor: float, output_xm... FILE: sequoia/settings/rl/envs/mujoco/modified_friction.py class ModifiedFrictionEnv (line 7) | class ModifiedFrictionEnv(MujocoEnv): FILE: sequoia/settings/rl/envs/mujoco/modified_gravity.py class ModifiedGravityEnv (line 11) | class ModifiedGravityEnv(MujocoEnv): method __init__ (line 23) | def __init__(self, model_path: str, frame_skip: int, gravity: float = ... method gravity (line 35) | def gravity(self) -> float: method gravity (line 39) | def gravity(self, value: float) -> None: method set_gravity (line 44) | def set_gravity(self, value: float) -> None: FILE: sequoia/settings/rl/envs/mujoco/modified_gravity_test.py class ModifiedGravityEnvTests (line 15) | class ModifiedGravityEnvTests: method test_change_gravity_each_step (line 19) | def test_change_gravity_each_step(self): method test_task_schedule (line 79) | def test_task_schedule(self): FILE: sequoia/settings/rl/envs/mujoco/modified_mass.py class ModifiedMassEnv (line 10) | class ModifiedMassEnv(MujocoEnv): method __init__ (line 23) | def __init__( method __init_subclass__ (line 47) | def __init_subclass__(cls): method _update (line 58) | def _update(self) -> None: method reset_masses (line 66) | def reset_masses(self) -> None: method get_masses_dict (line 74) | def get_masses_dict(self) -> Dict[str, float]: method set_mass (line 80) | def set_mass(self, **body_name_to_mass: Dict[str, Union[int, float]]) ... method get_mass (line 87) | def get_mass(self, body_part: str) -> float: method scale_masses (line 97) | def scale_masses( method get_and_modify_bodymass (line 127) | def get_and_modify_bodymass(self, body_name: str, scale: float): method _mass_setter (line 134) | def _mass_setter(body_part: str, env: MujocoEnv, mass: float) -> None: FILE: sequoia/settings/rl/envs/mujoco/modified_mass_test.py class ModifiedMassEnvTests (line 15) | class ModifiedMassEnvTests: method test_generated_properties_change_the_actual_mass (line 21) | def test_generated_properties_change_the_actual_mass(self): method test_change_mass_each_step (line 33) | def test_change_mass_each_step(self): method test_set_mass_with_task_schedule (line 76) | def test_set_mass_with_task_schedule(self): FILE: sequoia/settings/rl/envs/mujoco/modified_size.py function change_size_in_xml (line 16) | def change_size_in_xml( function get_geom_sizes (line 36) | def get_geom_sizes(tree: ET.ElementTree, body_name: str) -> List[float]: class ModifiedSizeEnv (line 49) | class ModifiedSizeEnv(MujocoEnv): method __init__ (line 64) | def __init__( FILE: sequoia/settings/rl/envs/mujoco/modified_size_test.py class ModifiedSizeEnvTests (line 14) | class ModifiedSizeEnvTests: method test_change_size_per_task (line 17) | def test_change_size_per_task(self): FILE: sequoia/settings/rl/envs/mujoco/mujoco_model_utils.py function pos_to_str (line 8) | def pos_to_str(pos: Tuple[float, ...]) -> str: function str_to_pos (line 12) | def str_to_pos(pos_str: str) -> "Pos": class Pos (line 16) | class Pos(NamedTuple): method to_str (line 21) | def to_str(self) -> str: method from_str (line 26) | def from_str(cls, pos_str: str) -> "Pos": method __mul__ (line 29) | def __mul__(self, value: Union[int, float, np.ndarray]) -> "Pos": method __eq__ (line 37) | def __eq__(self, other: Union[Tuple[float, ...], np.ndarray]): method __rmul__ (line 42) | def __rmul__(self, value: Any): method __truediv__ (line 45) | def __truediv__(self, other: Union[int, float, Sequence[float]]): method __add__ (line 53) | def __add__(self, other: Union[int, float, np.ndarray]) -> "Pos": method __radd__ (line 61) | def __radd__(self, other: Any) -> "Pos": method __neg__ (line 64) | def __neg__(self) -> "Pos": method __sub__ (line 67) | def __sub__(self, other: Union[int, float, np.ndarray]) -> "Pos": method __rsub__ (line 76) | def __rsub__(self, other: Any) -> "Pos": method of_element (line 80) | def of_element(cls, element: Element, field: str = "pos") -> "Pos": method set_in_element (line 85) | def set_in_element(self, element: Element, field: str = "pos") -> None: class FromTo (line 92) | class FromTo(NamedTuple): method to_str (line 96) | def to_str(self) -> str: method from_str (line 101) | def from_str(cls, fromto: str) -> "FromTo": method of_element (line 107) | def of_element(cls, element: Element, field: str = "fromto") -> "FromTo": method set_in_element (line 112) | def set_in_element(self, element: Element, field: str = "fromto") -> N... method center (line 119) | def center(self) -> Pos: method __str__ (line 135) | def __str__(self): class FromTo (line 127) | class FromTo: method to_str (line 96) | def to_str(self) -> str: method from_str (line 101) | def from_str(cls, fromto: str) -> "FromTo": method of_element (line 107) | def of_element(cls, element: Element, field: str = "fromto") -> "FromTo": method set_in_element (line 112) | def set_in_element(self, element: Element, field: str = "fromto") -> N... method center (line 119) | def center(self) -> Pos: method __str__ (line 135) | def __str__(self): class TorsoGeom (line 143) | class TorsoGeom: method render_xml (line 150) | def render_xml(self) -> str: class HoperV3Model (line 155) | class HoperV3Model: method render_xml (line 158) | def render_xml(self) -> str: FILE: sequoia/settings/rl/envs/mujoco/walker2d.py class Walker2dV2Env (line 12) | class Walker2dV2Env(_Walker2dV2Env): method __init__ (line 28) | def __init__(self, model_path: str = "walker2d.xml", frame_skip: int =... class Walker2dV3Env (line 32) | class Walker2dV3Env(_Walker2dV3Env): method __init__ (line 43) | def __init__( class Walker2dGravityEnv (line 72) | class Walker2dGravityEnv(ModifiedGravityEnv, Walker2dV2Env): method __init__ (line 74) | def __init__( class ContinualWalker2dV2Env (line 83) | class ContinualWalker2dV2Env(ModifiedGravityEnv, ModifiedSizeEnv, Modifi... method __init__ (line 84) | def __init__( class ContinualWalker2dV3Env (line 103) | class ContinualWalker2dV3Env(ModifiedGravityEnv, ModifiedSizeEnv, Modifi... method __init__ (line 106) | def __init__( FILE: sequoia/settings/rl/envs/mujoco/walker2d_test.py class TestContinualWalker2dV2Env (line 13) | class TestContinualWalker2dV2Env( class TestContinualWalker2dV3Env (line 19) | class TestContinualWalker2dV3Env( FILE: sequoia/settings/rl/envs/variant_spec.py class EnvVariantSpec (line 10) | class EnvVariantSpec(EnvSpec, Generic[EnvType]): method __init__ (line 11) | def __init__( method make (line 31) | def make(self, **kwargs) -> EnvType: method of (line 35) | def of( FILE: sequoia/settings/rl/incremental/objects.py class Observations (line 14) | class Observations(DiscreteTaskAgnosticRLSetting.Observations, Increment... class Actions (line 26) | class Actions(DiscreteTaskAgnosticRLSetting.Actions, IncrementalAssumpti... class Rewards (line 33) | class Rewards(DiscreteTaskAgnosticRLSetting.Rewards, IncrementalAssumpti... FILE: sequoia/settings/rl/incremental/results.py class IncrementalRLResults (line 11) | class IncrementalRLResults(IncrementalResults[MetricType]): FILE: sequoia/settings/rl/incremental/setting.py class IncrementalRLSetting (line 84) | class IncrementalRLSetting(IncrementalAssumption, DiscreteTaskAgnosticRL... method __post_init__ (line 125) | def __post_init__(self): method current_task_id (line 458) | def current_task_id(self) -> int: method current_task_id (line 462) | def current_task_id(self, value: int) -> None: method train_task_lengths (line 474) | def train_task_lengths(self) -> List[int]: method train_phase_lengths (line 482) | def train_phase_lengths(self) -> List[int]: method current_train_task_length (line 492) | def current_train_task_length(self) -> int: method task_label_space (line 499) | def task_label_space(self) -> gym.Space: method setup (line 512) | def setup(self, stage: str = None) -> None: method test_dataloader (line 608) | def test_dataloader(self, batch_size: Optional[int] = None, num_worker... method test_loop (line 626) | def test_loop(self, method: Method["IncrementalRLSetting"]): method phases (line 709) | def phases(self) -> int: method _make_env (line 719) | def _make_env( method create_task_schedule (line 775) | def create_task_schedule( method create_train_wrappers (line 813) | def create_train_wrappers(self) -> List[Callable[[gym.Env], gym.Env]]: method create_valid_wrappers (line 861) | def create_valid_wrappers(self): method create_test_wrappers (line 892) | def create_test_wrappers(self): method _check_all_envs_have_same_spaces (line 923) | def _check_all_envs_have_same_spaces( method _make_wrappers (line 1000) | def _make_wrappers( class MTEnvAdapterWrapper (line 1072) | class MTEnvAdapterWrapper(TransformObservation): method __init__ (line 1075) | def __init__(self, env: MTEnv, f: Callable = operator.itemgetter("env_... function make_metaworld_env (line 1083) | def make_metaworld_env(env_class: Type[MetaWorldEnv], tasks: List["Task"... function wrap (line 1099) | def wrap(env_or_env_fn: Union[gym.Env, EnvFactory], wrappers: List[gym.W... function create_env (line 1107) | def create_env( function make_lpg_ftw_datasets (line 1127) | def make_lpg_ftw_datasets( FILE: sequoia/settings/rl/incremental/setting_test.py class TestIncrementalRLSetting (line 38) | class TestIncrementalRLSetting(DiscreteTaskAgnosticRLSettingTests): method setting_kwargs (line 43) | def setting_kwargs(self, dataset: str, nb_tasks: int, config: Config): method test_passing_supported_dataset (line 55) | def test_passing_supported_dataset(self, setting_kwargs: Dict): method validate_results (line 68) | def validate_results( method test_tasks_are_different (line 105) | def test_tasks_are_different(self, setting_kwargs: Dict[str, Any], con... method test_number_of_tasks (line 131) | def test_number_of_tasks(self): method test_max_number_of_steps_per_task_is_respected (line 141) | def test_max_number_of_steps_per_task_is_respected(self): method test_monsterkong (line 182) | def test_monsterkong(self, state: bool): method test_LPG_FTW_datasets (line 232) | def test_LPG_FTW_datasets( function test_action_space_always_matches_obs_batch_size_in_RL (line 591) | def test_action_space_always_matches_obs_batch_size_in_RL(config: Config): function test_mtenv_meta_world_support (line 631) | def test_mtenv_meta_world_support(): function test_metaworld_support (line 684) | def test_metaworld_support(config: Config): function test_continual_world_support (line 716) | def test_continual_world_support(dataset: str, config: Config): function test_metaworld_auto_task_schedule (line 764) | def test_metaworld_auto_task_schedule(pass_env_id_instead_of_env_instanc... function test_dm_control_support (line 818) | def test_dm_control_support(): class PeriodTypeEnum (line 842) | class PeriodTypeEnum(enum.Enum): class Period (line 847) | class Period(NamedTuple): function make_random_cartpole_env (line 863) | def make_random_cartpole_env(gravity_scale: float): class TestPassingEnvsForEachTask (line 870) | class TestPassingEnvsForEachTask: method test_raises_warning_when_envs_have_different_obs_spaces (line 875) | def test_raises_warning_when_envs_have_different_obs_spaces(self): method test_passing_env_fns_for_each_task (line 881) | def test_passing_env_fns_for_each_task(self): method test_passing_env_for_each_task (line 931) | def test_passing_env_for_each_task(self): method test_command_line (line 977) | def test_command_line(self): method test_raises_warning_when_envs_have_different_obs_spaces (line 985) | def test_raises_warning_when_envs_have_different_obs_spaces(self): method test_random_baseline (line 991) | def test_random_baseline(self): function test_incremental_mujoco_like_LPG_FTW (line 1010) | def test_incremental_mujoco_like_LPG_FTW(): FILE: sequoia/settings/rl/incremental/tasks.py function make_incremental_task (line 34) | def make_incremental_task( function make_task_for_mtenv_env (line 73) | def make_task_for_mtenv_env( function make_task_for_metaworld_env (line 114) | def make_task_for_metaworld_env( FILE: sequoia/settings/rl/multi_task/setting.py class MultiTaskRLSetting (line 18) | class MultiTaskRLSetting(TaskIncrementalRLSetting, TraditionalRLSetting): method phases (line 30) | def phases(self) -> int: method create_train_wrappers (line 41) | def create_train_wrappers(self) -> List[Callable[[gym.Env], gym.Env]]: method create_test_wrappers (line 44) | def create_test_wrappers(self) -> List[Callable[[gym.Env], gym.Env]]: FILE: sequoia/settings/rl/multi_task/setting_test.py class TestMultiTaskRLSetting (line 14) | class TestMultiTaskRLSetting(TaskIncrementalRLSettingTests): method validate_results (line 31) | def validate_results( FILE: sequoia/settings/rl/objects.py class Observations (line 12) | class Observations(Setting.Observations): class Actions (line 20) | class Actions(Setting.Actions): class Rewards (line 29) | class Rewards(Setting.Rewards[T]): FILE: sequoia/settings/rl/setting.py class RLSetting (line 12) | class RLSetting(Setting[RLEnvironment[ObservationType, ActionType, Rewar... FILE: sequoia/settings/rl/setting_test.py class DummyMethod (line 13) | class DummyMethod(RandomBaselineMethod): method __init__ (line 19) | def __init__( method configure (line 44) | def configure(self, setting): method fit (line 55) | def fit( method on_task_switch (line 117) | def on_task_switch(self, task_id: Optional[int] = None): class CheckAttributesWrapper (line 123) | class CheckAttributesWrapper(IterableWrapper): method __init__ (line 126) | def __init__(self, env, attributes: List[str]): method _store_current_attributes (line 132) | def _store_current_attributes(self): method step (line 141) | def step(self, action): FILE: sequoia/settings/rl/task_incremental/setting.py class TaskIncrementalRLSetting (line 9) | class TaskIncrementalRLSetting(IncrementalRLSetting): FILE: sequoia/settings/rl/task_incremental/setting_test.py class TestTaskIncrementalRLSetting (line 13) | class TestTaskIncrementalRLSetting(IncrementalRLSettingTests): function test_task_label_space_of_env_has_right_n (line 18) | def test_task_label_space_of_env_has_right_n(): function test_task_schedule_is_used (line 27) | def test_task_schedule_is_used(): FILE: sequoia/settings/rl/traditional/setting.py class TraditionalRLSetting (line 17) | class TraditionalRLSetting(IncrementalRLSetting): method __post_init__ (line 38) | def __post_init__(self): method apply (line 42) | def apply(self, method, config=None): method phases (line 52) | def phases(self) -> int: FILE: sequoia/settings/rl/traditional/setting_test.py class TestTraditionalRLSetting (line 14) | class TestTraditionalRLSetting(IncrementalRLSettingTests): method test_on_task_switch_is_called (line 18) | def test_on_task_switch_is_called(self): method validate_results (line 38) | def validate_results( method validate_results (line 69) | def validate_results( FILE: sequoia/settings/rl/wrappers/measure_performance.py class MeasureRLPerformanceWrapper (line 20) | class MeasureRLPerformanceWrapper( method __init__ (line 25) | def __init__( method in_evaluation_period (line 48) | def in_evaluation_period(self) -> bool: method reset (line 62) | def reset(self) -> Union[Observations, Any]: method step (line 67) | def step(self, action: Actions): method get_metrics (line 131) | def get_metrics( FILE: sequoia/settings/rl/wrappers/measure_performance_test.py function test_measure_RL_performance_basics (line 17) | def test_measure_RL_performance_basics(): function test_measure_RL_performance_iteration (line 57) | def test_measure_RL_performance_iteration(): function test_measure_RL_performance_batched_env (line 103) | def test_measure_RL_performance_batched_env(): FILE: sequoia/settings/rl/wrappers/task_labels.py function hide_task_labels (line 21) | def hide_task_labels(observation: Tuple[T, int]) -> Tuple[T, Optional[in... function _hide_task_labels_in_dict (line 27) | def _hide_task_labels_in_dict(observation: Dict) -> Dict: function _hide_task_labels_on_batch (line 35) | def _hide_task_labels_on_batch(observation: Batch) -> Batch: function hide_task_labels_in_space (line 40) | def hide_task_labels_in_space(observation: Space) -> Space: function _hide_task_labels_in_namedtuple_space (line 47) | def _hide_task_labels_in_namedtuple_space( function _hide_task_labels_in_tuple_space (line 68) | def _hide_task_labels_in_tuple_space(observation: spaces.Tuple) -> space... function hide_task_labels_in_dict_space (line 82) | def hide_task_labels_in_dict_space(observation: spaces.Dict) -> spaces.D... function hide_task_labels_in_typed_dict_space (line 98) | def hide_task_labels_in_typed_dict_space( class HideTaskLabelsWrapper (line 116) | class HideTaskLabelsWrapper(TransformObservation): method __init__ (line 125) | def __init__(self, env: gym.Env, f=hide_task_labels): function remove_task_labels (line 131) | def remove_task_labels(observation: Any) -> Any: function _ (line 142) | def _(observation: Tuple[T, Any]) -> Tuple[T]: function _remove_task_labels_in_namedtuple_space (line 151) | def _remove_task_labels_in_namedtuple_space( function _ (line 161) | def _(observation: Dict) -> Dict: class RemoveTaskLabelsWrapper (line 168) | class RemoveTaskLabelsWrapper(TransformObservation): method __init__ (line 171) | def __init__(self, env: gym.Env, f=remove_task_labels): method space_change (line 176) | def space_change(cls, input_space: gym.Space) -> gym.Space: class FixedTaskLabelWrapper (line 182) | class FixedTaskLabelWrapper(IterableWrapper): method __init__ (line 189) | def __init__(self, env: gym.Env, task_label: Optional[int], task_label... method observation (line 197) | def observation(self, observation: Union[ObservationType, Any]) -> Obs... method reset (line 200) | def reset(self): method step (line 203) | def step(self, action): FILE: sequoia/settings/rl/wrappers/typed_objects.py class TypedObjectsWrapper (line 28) | class TypedObjectsWrapper(IterableWrapper, Environment[ObservationType, ... method __init__ (line 46) | def __init__( method step (line 192) | def step( method observation (line 205) | def observation(self, observation: Any) -> ObservationType: method action (line 220) | def action(self, action: ActionType) -> Any: method reward (line 232) | def reward(self, reward: Any) -> RewardType: method reset (line 235) | def reset(self, **kwargs) -> ObservationType: method __iter__ (line 239) | def __iter__(self): method send (line 248) | def send(self, action: ActionType) -> RewardType: function unwrap (line 260) | def unwrap(obj: Any) -> Any: function _unwrap_scalar (line 269) | def _unwrap_scalar(v): function _unwrap_actions (line 274) | def _unwrap_actions(obj: Actions) -> Union[Tensor, np.ndarray]: function _unwrap_rewards (line 279) | def _unwrap_rewards(obj: Rewards) -> Union[Tensor, np.ndarray]: function _unwrap_observations (line 284) | def _unwrap_observations(obj: Observations) -> Union[Tensor, np.ndarray]: function _unwrap_space (line 291) | def _unwrap_space(obj: NamedTupleSpace) -> Space: function _unwrap_space (line 298) | def _unwrap_space(obj: TypedDictSpace) -> spaces.Dict: class NoTypedObjectsWrapper (line 304) | class NoTypedObjectsWrapper(IterableWrapper): method __init__ (line 319) | def __init__(self, env: gym.Env): method step (line 323) | def step(self, action): method reset (line 334) | def reset(self, **kwargs): FILE: sequoia/settings/sl/continual/environment.py function split_batch (line 101) | def split_batch( function default_split_batch_function (line 141) | def default_split_batch_function( class ContinualSLEnvironment (line 155) | class ContinualSLEnvironment(PassiveEnvironment[ObservationType, ActionT... method __init__ (line 166) | def __init__( method step (line 204) | def step( method __iter__ (line 212) | def __iter__(self): class ContinualSLTestEnvironment (line 236) | class ContinualSLTestEnvironment(TestEnvironment[ContinualSLEnvironment]): method __init__ (line 237) | def __init__( method get_results (line 274) | def get_results(self) -> ContinualSLResults: method __iter__ (line 281) | def __iter__(self): method send (line 304) | def send(self, actions: ActionType) -> Optional[RewardType]: method reset (line 317) | def reset(self): method _before_step (line 330) | def _before_step(self, action): method _after_step (line 334) | def _after_step(self, observation, reward, done, info): method _after_reset (line 404) | def _after_reset(self, observation: ObservationType): method render (line 436) | def render(self, mode="human", **kwargs): FILE: sequoia/settings/sl/continual/environment_test.py class TestContinualSLTestEnvironment (line 22) | class TestContinualSLTestEnvironment: method base_env (line 27) | def base_env(self): method test_iteration_produces_results (line 52) | def test_iteration_produces_results( method validate_results (line 80) | def validate_results(self, results: ContinualSLResults): method test_gym_interaction_produces_results (line 88) | def test_gym_interaction_produces_results( FILE: sequoia/settings/sl/continual/envs.py class Task (line 103) | class Task: class TaskGenerator (line 106) | class TaskGenerator: function get_observation_space (line 137) | def get_observation_space(dataset: Any) -> gym.Space: function _get_observation_space_for_subset (line 145) | def _get_observation_space_for_subset(dataset: Subset) -> gym.Space: function _get_observation_space_for_dataset_name (line 152) | def _get_observation_space_for_dataset_name(dataset: str) -> gym.Space: function _get_observation_space_for_taskset (line 163) | def _get_observation_space_for_taskset(dataset: TaskSet) -> gym.Space: function _get_observation_space_for_tensor_dataset (line 169) | def _get_observation_space_for_tensor_dataset(dataset: TensorDataset) ->... function get_action_space (line 186) | def get_action_space(dataset: Any) -> gym.Space: function _get_action_space_for_subset (line 193) | def _get_action_space_for_subset(dataset: Subset) -> gym.Space: function _get_action_space_for_dataset_name (line 200) | def _get_action_space_for_dataset_name(dataset: str) -> gym.Space: function get_reward_space (line 211) | def get_reward_space(dataset: Any) -> gym.Space: function _get_reward_space_for_subset (line 218) | def _get_reward_space_for_subset(dataset: Subset) -> gym.Space: function _get_reward_space_for_dataset_name (line 226) | def _get_reward_space_for_dataset_name(dataset: str) -> gym.Space: function get_y_space_for_tensor_dataset (line 238) | def get_y_space_for_tensor_dataset(dataset: TensorDataset) -> gym.Space: function _get_action_space_for_list_of_datasets (line 263) | def _get_action_space_for_list_of_datasets(datasets: Sequence[TaskSet]) ... function _get_reward_space_for_list_of_datasets (line 286) | def _get_reward_space_for_list_of_datasets(datasets: Sequence[TaskSet]) ... FILE: sequoia/settings/sl/continual/objects.py class Observations (line 13) | class Observations(SLSetting.Observations, ContinualAssumption.Observati... class ObservationSpace (line 24) | class ObservationSpace(TypedDictSpace[ObservationType]): class Actions (line 41) | class Actions(SLSetting.Actions): class ActionSpace (line 47) | class ActionSpace(TypedDictSpace): class Rewards (line 54) | class Rewards(SLSetting.Rewards): class RewardSpace (line 60) | class RewardSpace(TypedDictSpace): FILE: sequoia/settings/sl/continual/results.py class ContinualSLResults (line 5) | class ContinualSLResults(ContinualResults[MetricsType]): FILE: sequoia/settings/sl/continual/setting.py class ContinualSLSetting (line 88) | class ContinualSLSetting(SLSetting, ContinualAssumption): method __post_init__ (line 185) | def __post_init__(self): method apply (line 323) | def apply( method train_dataloader (line 343) | def train_dataloader( method val_dataloader (line 409) | def val_dataloader( method test_dataloader (line 478) | def test_dataloader( method prepare_data (line 551) | def prepare_data(self, data_dir: Path = None) -> None: method setup (line 566) | def setup(self, stage: str = None): method _make_train_dataset (line 627) | def _make_train_dataset(self) -> Union[TaskSet, Dataset]: method _make_val_dataset (line 642) | def _make_val_dataset(self) -> Dataset: method _make_test_dataset (line 652) | def _make_test_dataset(self) -> Dataset: method make_dataset (line 658) | def make_dataset( method observation_space (line 684) | def observation_space(self) -> ObservationSpace[Observations]: method action_space (line 726) | def action_space(self) -> spaces.Discrete: method reward_space (line 756) | def reward_space(self) -> spaces.Discrete: function smooth_task_boundaries_concat (line 779) | def smooth_task_boundaries_concat( function subset (line 884) | def subset(dataset: TaskSet, indices: Sequence[int]) -> TaskSet: function subset (line 889) | def subset(dataset: DatasetType, indices: Sequence[int]) -> Union[Subset... function taskset_subset (line 895) | def taskset_subset(taskset: TaskSet, indices: np.ndarray) -> TaskSet: function random_subset (line 905) | def random_subset( function shuffle (line 924) | def shuffle(dataset: DatasetType, seed: int = None) -> DatasetType: function smart_class_prediction (line 935) | def smart_class_prediction( function limit_to_available_classes (line 947) | def limit_to_available_classes( function _has_channels_last (line 996) | def _has_channels_last(obs: ContinualSLSetting.Observations) -> bool: FILE: sequoia/settings/sl/continual/setting_test.py function test_continuum_shuffle (line 21) | def test_continuum_shuffle(config: Config): class TestContinualSLSetting (line 33) | class TestContinualSLSetting(SettingTests): method short_setting (line 44) | def short_setting(self, session_config): method test_shared_action_space (line 80) | def test_shared_action_space(self, config: Config): method test_only_one_epoch (line 131) | def test_only_one_epoch(self, short_setting): method test_show_distributions (line 151) | def test_show_distributions(self, config: Config): method test_passing_datasets_to_setting (line 180) | def test_passing_datasets_to_setting(self, config: Config): method test_ctrl_stream_support (line 237) | def test_ctrl_stream_support(self, stream: str, config: Config): function create_image_classification_dataset (line 246) | def create_image_classification_dataset( function test_concat_smooth_boundaries (line 290) | def test_concat_smooth_boundaries(config: Config): FILE: sequoia/settings/sl/continual/wrappers.py function relabel (line 16) | def relabel(data: Any, mapping: Dict[int, int] = None) -> Any: function relabel_ndarray (line 22) | def relabel_ndarray(y: np.ndarray, mapping: Dict[int, int] = None) -> np... function relabel_tensor (line 31) | def relabel_tensor(y: Tensor, mapping: Dict[int, int] = None) -> Tensor: function relabel_taskset (line 40) | def relabel_taskset(task_set: TaskSet, mapping: Dict[int, int] = None) -... function replace_taskset_attributes (line 57) | def replace_taskset_attributes(task_set: TaskSet, **kwargs) -> TaskSet: class SharedActionSpaceWrapper (line 71) | class SharedActionSpaceWrapper(IterableWrapper): method __init__ (line 73) | def __init__(self, env: gym.Env, task_classes: List[int]): class ShowLabelDistributionWrapper (line 84) | class ShowLabelDistributionWrapper(IterableWrapper[ContinualSLEnvironmen... method __init__ (line 90) | def __init__(self, env: ContinualSLEnvironment, env_name: str): method observation (line 100) | def observation(self, observation: ObservationType) -> ObservationType: method reward (line 110) | def reward(self, reward: RewardType) -> RewardType: method make_figure (line 116) | def make_figure(self) -> plt.Figure: FILE: sequoia/settings/sl/discrete/setting.py class DiscreteTaskAgnosticSLSetting (line 8) | class DiscreteTaskAgnosticSLSetting(DiscreteContextAssumption, Continual... FILE: sequoia/settings/sl/discrete/setting_test.py class TestDiscreteTaskAgnosticSLSetting (line 10) | class TestDiscreteTaskAgnosticSLSetting(ContinualSLSettingTests): FILE: sequoia/settings/sl/domain_incremental/setting.py class DomainIncrementalSLSetting (line 8) | class DomainIncrementalSLSetting(IncrementalSLSetting): FILE: sequoia/settings/sl/domain_incremental/setting_test.py class TestDiscreteTaskAgnosticSLSetting (line 17) | class TestDiscreteTaskAgnosticSLSetting(IncrementalSLSettingTests): method assert_chance_level (line 27) | def assert_chance_level( function test_domain_incremental_mnist_setup (line 59) | def test_domain_incremental_mnist_setup(): FILE: sequoia/settings/sl/environment.py class PassiveEnvironment (line 34) | class PassiveEnvironment( method __init__ (line 54) | def __init__( method is_closed (line 192) | def is_closed(self) -> bool: method reset (line 195) | def reset(self) -> ObservationType: method close (line 212) | def close(self) -> None: method __del__ (line 220) | def __del__(self): method render (line 224) | def render(self, mode: str = "rgb_array") -> np.ndarray: method get_next_batch (line 268) | def get_next_batch(self) -> Tuple[ObservationType, RewardType]: method step (line 294) | def step(self, action: ActionType) -> Tuple[ObservationType, RewardTyp... method action (line 325) | def action(self, action: ActionType) -> ActionType: method observation (line 340) | def observation(self, observation: ObservationType) -> ObservationType: method reward (line 355) | def reward(self, reward: RewardType) -> RewardType: method get_info (line 370) | def get_info(self) -> Dict: method __iter__ (line 383) | def __iter__(self) -> Iterable[Tuple[ObservationType, Optional[RewardT... method send (line 427) | def send(self, action: Actions) -> Rewards: FILE: sequoia/settings/sl/environment_test.py function check_env (line 19) | def check_env(env: PassiveEnvironment): class TestPassiveEnvironment (line 44) | class TestPassiveEnvironment: method mnist_dataset (line 50) | def mnist_dataset(self): method test_passive_environment_as_dataloader (line 55) | def test_passive_environment_as_dataloader(self, mnist_dataset): method test_mnist_as_gym_env (line 81) | def test_mnist_as_gym_env(self, mnist_dataset): method test_env_gives_done_on_last_item (line 103) | def test_env_gives_done_on_last_item(self): method test_env_done_works_with_batch_size (line 134) | def test_env_done_works_with_batch_size(self): method test_multiple_epochs_env (line 167) | def test_multiple_epochs_env(self): method test_cant_iterate_after_closing_passive_env (line 206) | def test_cant_iterate_after_closing_passive_env(self): method test_multiple_epochs_dataloader (line 244) | def test_multiple_epochs_dataloader(self): method test_multiple_epochs_dataloader_with_split_batch_fn (line 269) | def test_multiple_epochs_dataloader_with_split_batch_fn(self): method test_env_requires_reset_before_step (line 306) | def test_env_requires_reset_before_step(self): method test_split_batch_fn (line 321) | def test_split_batch_fn(self): method test_observation_wrapper_applied_to_passive_environment (line 388) | def test_observation_wrapper_applied_to_passive_environment(self): method test_passive_environment_interaction (line 430) | def test_passive_environment_interaction(self): method test_passive_environment_without_pretend_to_be_active (line 468) | def test_passive_environment_without_pretend_to_be_active(self): method test_passive_environment_needs_actions_to_be_sent (line 503) | def test_passive_environment_needs_actions_to_be_sent(self): method test_passive_environment_active_mode_action_reward_match (line 542) | def test_passive_environment_active_mode_action_reward_match(self): FILE: sequoia/settings/sl/incremental/environment.py class IncrementalSLEnvironment (line 18) | class IncrementalSLEnvironment(ContinualSLEnvironment[ObservationType, A... method __init__ (line 19) | def __init__( class IncrementalSLTestEnvironment (line 63) | class IncrementalSLTestEnvironment(ContinualSLTestEnvironment): method __init__ (line 64) | def __init__(self, env: gym.Env, *args, task_schedule: Dict[int, Any] ... method get_results (line 83) | def get_results(self) -> IncrementalSLResults: method reset (line 86) | def reset(self): method _before_step (line 97) | def _before_step(self, action): method _after_step (line 101) | def _after_step(self, observation, reward, done, info): method _after_reset (line 184) | def _after_reset(self, observation: Observations): method render (line 216) | def render(self, mode="human", **kwargs): FILE: sequoia/settings/sl/incremental/environment_test.py class TestIncrementalSLTestEnvironment (line 13) | class TestIncrementalSLTestEnvironment(ContinualSLTestEnvironmentTests): method validate_results (line 19) | def validate_results(self, results: TaskSequenceResults): FILE: sequoia/settings/sl/incremental/objects.py class IncrementalSLObservations (line 17) | class IncrementalSLObservations(DiscreteTaskAgnosticSLSetting.Observatio... class IncrementalSLActions (line 25) | class IncrementalSLActions(DiscreteTaskAgnosticSLSetting.Actions): class IncrementalSLRewards (line 30) | class IncrementalSLRewards(DiscreteTaskAgnosticSLSetting.Rewards): FILE: sequoia/settings/sl/incremental/results.py class IncrementalSLResults (line 19) | class IncrementalSLResults(IncrementalAssumption.Results): method make_plots (line 48) | def make_plots(self): method task_accuracies_plot (line 58) | def task_accuracies_plot(self): method cumul_metrics_plot (line 72) | def cumul_metrics_plot(self): FILE: sequoia/settings/sl/incremental/setting.py class IncrementalSLSetting (line 60) | class IncrementalSLSetting(IncrementalAssumption, DiscreteTaskAgnosticSL... method __post_init__ (line 96) | def __post_init__(self): method apply (line 111) | def apply(self, method: Method, config: Config = None) -> IncrementalS... method prepare_data (line 127) | def prepare_data(self, data_dir: Path = None, **kwargs): method setup (line 142) | def setup(self, stage: str = None): method train_dataloader (line 163) | def train_dataloader( method val_dataloader (line 183) | def val_dataloader(self, batch_size: int = None, num_workers: int = No... method test_dataloader (line 188) | def test_dataloader( method split_batch_function (line 273) | def split_batch_function( method make_train_cl_scenario (line 317) | def make_train_cl_scenario(self, train_dataset: _ContinuumDataset) -> ... method make_test_cl_scenario (line 328) | def make_test_cl_scenario(self, test_dataset: _ContinuumDataset) -> _B... method make_dataset (line 339) | def make_dataset( method num_classes_in_task (line 371) | def num_classes_in_task(self, task_id: int, train: bool) -> Union[int,... method num_classes_in_current_task (line 378) | def num_classes_in_current_task(self, train: bool = None) -> int: method task_classes (line 384) | def task_classes(self, task_id: int, train: bool) -> List[int]: method current_task_classes (line 394) | def current_task_classes(self, train: bool) -> List[int]: method _check_environments (line 398) | def _check_environments(self): FILE: sequoia/settings/sl/incremental/setting_test.py class TestIncrementalSLSetting (line 22) | class TestIncrementalSLSetting(DiscreteTaskAgnosticSLSettingTests): method assert_chance_level (line 29) | def assert_chance_level( method test_observation_spaces_match_dataset (line 84) | def test_observation_spaces_match_dataset(self, dataset_name: str): method test_task_label_space (line 106) | def test_task_label_space(self, dataset_name: str, nb_tasks: int): method test_setting_obs_space_changes_when_transforms_change (line 117) | def test_setting_obs_space_changes_when_transforms_change(self, datase... function test_render (line 224) | def test_render(config: Config): function test_class_incremental_random_baseline (line 241) | def test_class_incremental_random_baseline(): FILE: sequoia/settings/sl/incremental/unused_batch_transforms.py function relabel (line 14) | def relabel(y: Tensor, task_classes: List[int]) -> Tensor: class RelabelWrapper (line 21) | class RelabelWrapper(TransformReward): method __init__ (line 22) | def __init__(self, env: gym.Env, task_classes: List[int]): class RelabelTransform (line 28) | class RelabelTransform(Callable[[Tuple[Tensor, ...]], Tuple[Tensor, ...]]): method __call__ (line 45) | def __call__(self, batch: Tuple[Tensor, ...]): class ReorderTensors (line 63) | class ReorderTensors(Callable[[Tuple[Tensor, ...]], Tuple[Tensor, ...]]): method __call__ (line 68) | def __call__(self, batch: Tuple[Tensor, ...]): class DropTaskLabels (line 83) | class DropTaskLabels(Callable[[Tuple[Tensor, ...]], Tuple[Tensor, ...]]): method __call__ (line 84) | def __call__(self, batch: Union[Tuple[Tensor, ...], Observations]): FILE: sequoia/settings/sl/multi_task/setting.py class MultiTaskSLSetting (line 18) | class MultiTaskSLSetting(TaskIncrementalSLSetting, TraditionalSLSetting): method __post_init__ (line 28) | def __post_init__(self): method phases (line 34) | def phases(self) -> int: FILE: sequoia/settings/sl/multi_task/setting_test.py function check_is_multitask_env (line 26) | def check_is_multitask_env(env: Environment, has_rewards: bool): function test_multitask_setting (line 77) | def test_multitask_setting(config: Config): function test_multitask_setting_test_env (line 101) | def test_multitask_setting_test_env(): function test_on_task_switch_is_called_multi_task (line 119) | def test_on_task_switch_is_called_multi_task(): FILE: sequoia/settings/sl/setting.py class SLSetting (line 16) | class SLSetting(Setting[PassiveEnvironment[ObservationType, ActionType, ... class Observations (line 30) | class Observations(Setting.Observations): class Actions (line 34) | class Actions(Setting.Actions): class Rewards (line 38) | class Rewards(Setting.Rewards): FILE: sequoia/settings/sl/task_incremental/setting.py class TaskIncrementalSLSetting (line 17) | class TaskIncrementalSLSetting(TaskIncrementalAssumption, IncrementalSLS... FILE: sequoia/settings/sl/task_incremental/setting_test.py class TestTaskIncrementalSLSetting (line 17) | class TestTaskIncrementalSLSetting(IncrementalSLSettingTests): function check_only_right_classes_present (line 25) | def check_only_right_classes_present(setting: TaskIncrementalSLSetting): function test_task_incremental_mnist_setup (line 117) | def test_task_incremental_mnist_setup(): function test_task_incremental_mnist_setup_reversed_class_order (line 136) | def test_task_incremental_mnist_setup_reversed_class_order(): function test_class_incremental_mnist_setup_with_nb_tasks (line 152) | def test_class_incremental_mnist_setup_with_nb_tasks(): function test_action_space_always_matches_obs_batch_size (line 167) | def test_action_space_always_matches_obs_batch_size(config: Config): FILE: sequoia/settings/sl/traditional/results.py class IIDResults (line 11) | class IIDResults(IncrementalSLResults): method save_to_dir (line 17) | def save_to_dir(self, save_dir: Union[str, Path]) -> None: method make_plots (line 38) | def make_plots(self) -> Dict[str, plt.Figure]: method class_accuracies_plot (line 44) | def class_accuracies_plot(self): method to_log_dict (line 67) | def to_log_dict(self, verbose: bool = False) -> Dict[str, float]: FILE: sequoia/settings/sl/traditional/setting.py class TraditionalSLSetting (line 28) | class TraditionalSLSetting(IncrementalSLSetting): method phases (line 63) | def phases(self) -> int: FILE: sequoia/settings/sl/traditional/setting_test.py class ContinualSLMethod (line 17) | class ContinualSLMethod(Method, target_setting=ContinualSLSetting): class DiscreteTaskAgnosticSLMethod (line 21) | class DiscreteTaskAgnosticSLMethod(Method, target_setting=DiscreteTaskAg... class IncrementalSLMethod (line 25) | class IncrementalSLMethod(Method, target_setting=IncrementalSLSetting): class ClassIncrementalSLMethod (line 29) | class ClassIncrementalSLMethod(Method, target_setting=ClassIncrementalSe... class DomainIncrementalSLMethod (line 33) | class DomainIncrementalSLMethod(Method, target_setting=DomainIncremental... class TaskIncrementalSLMethod (line 37) | class TaskIncrementalSLMethod(Method, target_setting=TaskIncrementalSLSe... class TraditionalSLMethod (line 41) | class TraditionalSLMethod(Method, target_setting=TraditionalSLSetting): class MultiTaskSLMethod (line 45) | class MultiTaskSLMethod(Method, target_setting=MultiTaskSLSetting): function test_methods_applicable_to_iid_setting (line 49) | def test_methods_applicable_to_iid_setting(): function test_get_parents (line 128) | def test_get_parents(): function test_get_parents_domain_incremental (line 144) | def test_get_parents_domain_incremental(): function test_method_applicability_domain_incremental (line 150) | def test_method_applicability_domain_incremental(): function test_get_parents_domain_incremental (line 158) | def test_get_parents_domain_incremental(): FILE: sequoia/settings/sl/wrappers/measure_performance.py class MeasureSLPerformanceWrapper (line 28) | class MeasureSLPerformanceWrapper( method __init__ (line 33) | def __init__( method reset (line 65) | def reset(self) -> Observations: method in_evaluation_period (line 69) | def in_evaluation_period(self) -> bool: method step (line 75) | def step(self, action: Actions): method send (line 98) | def send(self, action: Actions): method get_metrics (line 126) | def get_metrics(self, action: Actions, reward: Rewards) -> Metrics: method __iter__ (line 138) | def __iter__(self) -> Iterator[Tuple[Observations, Optional[Rewards]]]: FILE: sequoia/settings/sl/wrappers/measure_performance_test.py function with_is_last (line 24) | def with_is_last(iterable: Iterable[T]) -> Iterable[Tuple[T, bool]]: function test_measure_performance_wrapper (line 40) | def test_measure_performance_wrapper(): function make_dummy_env (line 99) | def make_dummy_env(n_samples: int = 100, batch_size: int = 1, drop_last:... function test_measure_performance_wrapper_first_epoch_only (line 118) | def test_measure_performance_wrapper_first_epoch_only(): function test_measure_performance_wrapper_odd_vs_even (line 162) | def test_measure_performance_wrapper_odd_vs_even(): function test_measure_performance_wrapper_odd_vs_even_passive (line 192) | def test_measure_performance_wrapper_odd_vs_even_passive(): function test_last_batch (line 232) | def test_last_batch(): function test_last_batch_baseline_model (line 257) | def test_last_batch_baseline_model(): function test_delayed_actions (line 299) | def test_delayed_actions(drop_last: bool): FILE: sequoia/utils/categorical.py class Categorical (line 8) | class Categorical(Categorical_): method __init__ (line 15) | def __init__( method __getitem__ (line 24) | def __getitem__(self, index: Optional[int]) -> "Categorical": method __iter__ (line 28) | def __iter__(self) -> Iterable["Categorical"]: method __add__ (line 32) | def __add__(self, other: Union["Categorical_", Any]) -> "Categorical": method __mul__ (line 37) | def __mul__(self, other: Union["Categorical_", Any]) -> "Categorical": method device (line 43) | def device(self) -> torch.device: method to (line 50) | def to(self, device: Union[str, torch.device]) -> "Categorical": FILE: sequoia/utils/data_utils.py function train_valid_split (line 16) | def train_valid_split( function unbatch (line 34) | def unbatch(dataloader: Iterable[Tuple[Tensor, Tensor]]) -> Iterable[Tup... class unlabeled (line 45) | class unlabeled(Iterable[Tuple[Tensor]], Sized): method __init__ (line 48) | def __init__(self, labeled_dataloader: DataLoader): method __iter__ (line 51) | def __iter__(self) -> Iterator[Tuple[Tensor]]: method __len__ (line 57) | def __len__(self) -> int: function keep_in_memory (line 61) | def keep_in_memory(dataset: VisionDataset) -> None: class FixChannels (line 77) | class FixChannels(nn.Module): method __call__ (line 87) | def __call__(self, x: Tensor) -> Tensor: function get_imagenet_location (line 98) | def get_imagenet_location() -> Path: FILE: sequoia/utils/encode.py function no_op_encode (line 23) | def no_op_encode(value: Any): function encode_tensor (line 34) | def encode_tensor(obj: Union[Tensor, np.ndarray]) -> List: function encode_type (line 39) | def encode_type(obj: type) -> List: function encode_path (line 48) | def encode_path(obj: Path) -> str: function encode_device (line 53) | def encode_device(obj: torch.device) -> str: function encode_enum (line 58) | def encode_enum(value: enum.Enum): FILE: sequoia/utils/generic_functions/_namedtuple.py function is_namedtuple (line 9) | def is_namedtuple(obj: Any) -> bool: function is_namedtuple_type (line 14) | def is_namedtuple_type(obj: Type) -> bool: FILE: sequoia/utils/generic_functions/_namedtuple_test.py class DummyTuple (line 8) | class DummyTuple(NamedTuple): function test_is_namedtuple (line 13) | def test_is_namedtuple(): function test_is_namedtuple_type (line 18) | def test_is_namedtuple_type(): function test_instance_check (line 27) | def test_instance_check(): function test_instance_check (line 35) | def test_instance_check(): FILE: sequoia/utils/generic_functions/concatenate.py function concatenate (line 33) | def concatenate(first_item: Union[T, List[T]], *others: T, **kwargs) -> ... function _concatenate_ndarrays (line 52) | def _concatenate_ndarrays(first_item: None, *others: None, **kwargs) -> ... function _concatenate_ndarrays (line 60) | def _concatenate_ndarrays(first_item: np.ndarray, *others: np.ndarray, *... function _concatenate_tensors (line 68) | def _concatenate_tensors(first_item: Tensor, *others: Tensor, **kwargs) ... function _concatenate_dicts (line 76) | def _concatenate_dicts(first_item: Dict, *others: Dict, **kwargs) -> Dict: function _concatenate_distributions (line 86) | def _concatenate_distributions( function _concatenate_tasksets (line 95) | def _concatenate_tasksets(first_item: TaskSet, *others: TaskSet) -> Task... function _concatenate_datasets (line 100) | def _concatenate_datasets(first_item: Dataset[T], *others: Dataset[T]) -... function _concatenate_iterable_datasets (line 105) | def _concatenate_iterable_datasets( FILE: sequoia/utils/generic_functions/detach.py function detach (line 15) | def detach(value: T) -> T: function no_op_detach (line 30) | def no_op_detach(v: Any) -> Any: function _detach_sequence (line 37) | def _detach_sequence(x: Sequence[T]) -> Sequence[T]: function _detach_dict (line 44) | def _detach_dict(d: Dict[str, Any]) -> Dict[str, Any]: function _detach_categorical (line 50) | def _detach_categorical(v: Categorical) -> Categorical: FILE: sequoia/utils/generic_functions/move.py function move (line 16) | def move(x: T, device: Union[str, torch.device]) -> T: function move_dict (line 26) | def move_dict(x: Dict[K, V], device: Union[str, torch.device]) -> Dict[K... function move_sequence (line 33) | def move_sequence(x: Sequence[T], device: Union[str, torch.device]) -> S... FILE: sequoia/utils/generic_functions/replace.py class Dataclass (line 15) | class Dataclass(type): method __instancecheck__ (line 20) | def __instancecheck__(self, instance) -> bool: method __subclasscheck__ (line 26) | def __subclasscheck__(self, subclass) -> bool: function replace (line 34) | def replace(obj: T, **items) -> T: function _replace_dataclass_attribute (line 45) | def _replace_dataclass_attribute(obj: Dataclass, **items) -> Dataclass: function _replace_dict_item (line 51) | def _replace_dict_item(obj: Dict, **items) -> Dict: function _replace_sequence_items (line 63) | def _replace_sequence_items(obj: Sequence, **items) -> Tuple: function _replace_dict_items (line 70) | def _replace_dict_items(obj: spaces.Dict, **items) -> Dict: FILE: sequoia/utils/generic_functions/slicing.py function get_slice (line 19) | def get_slice(value: T, indices: Sequence[int]) -> T: function _get_dict_slice (line 27) | def _get_dict_slice(value: Dict[K, V], indices: Sequence[int]) -> Dict[K... function _get_tuple_slice (line 32) | def _get_tuple_slice(value: Tuple[T, ...], indices: Sequence[int]) -> Tu... function set_slice (line 41) | def set_slice(target: Any, indices: Sequence[int], values: Sequence[Any]... function _set_slice_categorical (line 53) | def _set_slice_categorical( function _set_slice_ndarray (line 60) | def _set_slice_ndarray(target: np.ndarray, indices: Sequence[int], value... function _set_slice_ndarray (line 69) | def _set_slice_ndarray(target: Tensor, indices: Sequence[int], values: S... function _set_dict_slice (line 74) | def _set_dict_slice( function _set_tuple_slice (line 82) | def _set_tuple_slice(target: Tuple[T, ...], indices: Sequence[int], valu... FILE: sequoia/utils/generic_functions/slicing_test.py class DummyTuple (line 9) | class DummyTuple(NamedTuple): function test_get_slice (line 34) | def test_get_slice(source, indices, expected): function test_set_slice (line 78) | def test_set_slice(target, indices, values, result): function test_concat (line 123) | def test_concat(a, b, kwargs, expected): FILE: sequoia/utils/generic_functions/stack.py function stack (line 27) | def stack(first_item: Union[T, List[T]], *others: T, **kwargs) -> Any: function _stack_none (line 49) | def _stack_none(first_item: None, *others: None, **kwargs) -> Union[None... function _stack_ndarrays (line 62) | def _stack_ndarrays(first_item: np.ndarray, *others: np.ndarray, **kwarg... function _stack_tensors (line 67) | def _stack_tensors(first_item: Tensor, *others: Tensor, **kwargs) -> Ten... function _stack_dicts (line 72) | def _stack_dicts(first_item: Dict, *others: Dict, **kwargs) -> Dict: function _stack_distributions (line 82) | def _stack_distributions(first_item: Categorical, *others: Categorical, ... FILE: sequoia/utils/generic_functions/to_from_tensor.py function from_tensor (line 13) | def from_tensor(space: Space, sample: Union[Tensor, Any]) -> Union[np.nd... function _ (line 21) | def _(space: spaces.Discrete, sample: Tensor) -> int: function _ (line 35) | def _( function _ (line 45) | def _(space: spaces.Tuple, sample: Tuple[Union[Tensor, Any]]) -> Tuple[U... function to_tensor (line 57) | def to_tensor( function _ (line 67) | def _( function _ (line 74) | def _( function _ (line 102) | def _(space: NamedTupleSpace, sample: NamedTuple, device: torch.device =... function sparse_sample_to_tensor (line 115) | def sparse_sample_to_tensor( FILE: sequoia/utils/logging_utils.py function pbar (line 23) | def pbar(dataloader: Iterable[T], description: str = "", *args, **kwargs... function get_logger (line 31) | def get_logger(name: str, level: int = None) -> logging.Logger: function log_calls (line 69) | def log_calls(function: Callable, level=logging.INFO) -> Callable: function get_new_file (line 96) | def get_new_file(file: Path) -> Path: function cleanup (line 117) | def cleanup( class TqdmLoggingHandler (line 165) | class TqdmLoggingHandler(logging.Handler): method __init__ (line 166) | def __init__(self, level=logging.NOTSET): method emit (line 169) | def emit(self, record): FILE: sequoia/utils/module_dict.py class ModuleDict (line 10) | class ModuleDict(nn.ModuleDict, MutableMapping[str, M]): method get (line 11) | def get(self, key: str, default: Any = None) -> Union[M, Any]: FILE: sequoia/utils/parseable.py class Parseable (line 19) | class Parseable: method add_argparse_args (line 23) | def add_argparse_args(cls, parser: ArgumentParser) -> None: method from_argparse_args (line 50) | def from_argparse_args(cls: Type[P], args: Namespace) -> P: method from_args (line 83) | def from_args( method from_known_args (line 139) | def from_known_args( method upgrade (line 179) | def upgrade(self, target_type: Type[P]) -> P: FILE: sequoia/utils/plotting.py function autolabel (line 7) | def autolabel(axis, rects: List[plt.Rectangle], bar_height_scale: float ... function maximize_figure (line 27) | def maximize_figure(): class PlotSectionLabel (line 42) | class PlotSectionLabel: method middle (line 50) | def middle(self) -> float: method width (line 54) | def width(self) -> int: method annotate (line 57) | def annotate(self, ax: plt.Axes, height: float = -0.1): FILE: sequoia/utils/pretrained_utils.py function get_pretrained_encoder (line 10) | def get_pretrained_encoder( FILE: sequoia/utils/readme.py function get_relative_path_to (line 18) | def get_relative_path_to(something: Type) -> Path: function get_tree_string (line 29) | def get_tree_string( function get_tree_string_markdown (line 109) | def get_tree_string_markdown( function print_methods (line 181) | def print_methods(): function add_stuff_to_readme (line 208) | def add_stuff_to_readme(readme_path=Path("README.md"), settings: bool = ... FILE: sequoia/utils/serialization.py function cpu (line 23) | def cpu(x: Any) -> Any: class Pickleable (line 27) | class Pickleable: method __getstate__ (line 30) | def __getstate__(self): method __setstate__ (line 38) | def __setstate__(self, state: Dict): class Serializable (line 47) | class Serializable(SerializableBase, Pickleable, decode_into_subclasses=... method save (line 51) | def save(self, path: Union[str, Path], **kwargs) -> None: method detach (line 61) | def detach(self: S) -> S: method to (line 72) | def to(self, device: Union[str, torch.device]): method items (line 82) | def items(self) -> Iterable[Tuple[str, Any]]: method cpu (line 86) | def cpu(self): method cuda (line 89) | def cuda(self, device: Union[str, torch.device] = None): method merge (line 92) | def merge(self, other: "Serializable") -> "Serializable": class decode (line 107) | class decode: method register (line 109) | def register(fn_or_type: Type = None): FILE: sequoia/utils/utils.py function field_dict (line 30) | def field_dict(dataclass: Dataclass) -> Dict[str, Field]: function mean (line 34) | def mean(values: Iterable[T]) -> T: function pairwise (line 39) | def pairwise(iterable: Iterable[T]) -> Iterable[Tuple[T, T]]: function n_consecutive (line 46) | def n_consecutive(items: Iterable[T], n: int = 2, yield_last_batch=True)... function fix_channels (line 65) | def fix_channels(x_batch: Tensor) -> Tensor: function to_dict_of_lists (line 76) | def to_dict_of_lists(list_of_dicts: Iterable[Dict[str, Any]]) -> Dict[st... function add_prefix (line 95) | def add_prefix(some_dict: Dict[str, T], prefix: str = "", sep=" ") -> Di... function loss_str (line 145) | def loss_str(loss_tensor: Tensor) -> str: function set_seed (line 155) | def set_seed(seed: int): function compute_identity (line 169) | def compute_identity(size: int = 16, **sample) -> str: function prod (line 194) | def prod(iterable: Iterable[T]) -> T: function common_fields (line 203) | def common_fields(a, b) -> Iterable[Tuple[str, Tuple[Field, Field]]]: function add_dicts (line 218) | def add_dicts(d1: Dict, d2: Dict, add_values=True) -> Dict: function rsetattr (line 232) | def rsetattr(obj: Any, attr: str, val: Any) -> None: function rgetattr (line 241) | def rgetattr(obj: Any, attr: str, *args): function is_nonempty_dir (line 250) | def is_nonempty_dir(path: Path) -> bool: function flatten_dict (line 257) | def flatten_dict(d: D, separator: str = "/") -> D: function unique_consecutive (line 278) | def unique_consecutive(iterable: Iterable[T], key: Callable[[T], Any] = ... function unique_consecutive_with_index (line 294) | def unique_consecutive_with_index( function roundrobin (line 316) | def roundrobin(*iterables: Iterable[T]) -> Iterable[T]: function take (line 335) | def take(iterable: Iterable[T], n: Optional[int]) -> Iterable[T]: function camel_case (line 343) | def camel_case(name): function constant (line 351) | def constant(v: T, **kwargs) -> T: function flag (line 359) | def flag(default: bool, *args, **kwargs): function dict_union (line 363) | def dict_union(*dicts: Dict[K, V], recurse: bool = True, dict_factory=di... function zip_dicts (line 416) | def zip_dicts(*dicts: Dict[K, V], missing: M = None) -> Iterable[Tuple[K... function dict_intersection (line 427) | def dict_intersection(*dicts: Dict[K, V]) -> Iterable[Tuple[K, Tuple[V, ... function try_get (line 437) | def try_get(d: Dict[K, V], *keys: K, default: V = None) -> Optional[V]: function remove_suffix (line 446) | def remove_suffix(s: str, suffix: str) -> str: function remove_prefix (line 462) | def remove_prefix(s: str, prefix: str) -> str: function get_all_subclasses_of (line 476) | def get_all_subclasses_of(cls: Type[T]) -> Iterable[Type[T]]: function get_all_concrete_subclasses_of (line 483) | def get_all_concrete_subclasses_of(cls: Type[T]) -> Iterable[Type[T]]: function get_path_to_source_file (line 487) | def get_path_to_source_file(cls: Type) -> Path: function constant_property (line 504) | def constant_property(fixed_value: T) -> T: function deprecated_property (line 526) | def deprecated_property(old_name: str, new_name: str): FILE: versioneer.py class VersioneerConfig (line 284) | class VersioneerConfig: function get_root (line 288) | def get_root(): function get_config_from_root (line 331) | def get_config_from_root(root): class NotThisMethod (line 361) | class NotThisMethod(Exception): function register_vcs_handler (line 370) | def register_vcs_handler(vcs, method): # decorator function run_command (line 383) | def run_command(commands, args, cwd=None, verbose=False, hide_stderr=Fal... function git_get_keywords (line 951) | def git_get_keywords(versionfile_abs): function git_versions_from_keywords (line 980) | def git_versions_from_keywords(keywords, tag_prefix, verbose): function git_pieces_from_vcs (line 1046) | def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_comma... function do_vcs_install (line 1136) | def do_vcs_install(manifest_in, versionfile_source, ipy): function versions_from_parentdir (line 1174) | def versions_from_parentdir(parentdir_prefix, root, verbose): function versions_from_file (line 1223) | def versions_from_file(filename): function write_to_version_file (line 1238) | def write_to_version_file(filename, versions): function plus_or_dot (line 1248) | def plus_or_dot(pieces): function render_pep440 (line 1255) | def render_pep440(pieces): function render_pep440_pre (line 1279) | def render_pep440_pre(pieces): function render_pep440_post (line 1295) | def render_pep440_post(pieces): function render_pep440_old (line 1322) | def render_pep440_old(pieces): function render_git_describe (line 1344) | def render_git_describe(pieces): function render_git_describe_long (line 1364) | def render_git_describe_long(pieces): function render (line 1384) | def render(pieces, style): class VersioneerBadRootError (line 1422) | class VersioneerBadRootError(Exception): function get_versions (line 1426) | def get_versions(verbose=False): function get_version (line 1505) | def get_version(): function get_cmdclass (line 1510) | def get_cmdclass(cmdclass=None): function do_setup (line 1764) | def do_setup(): function scan_setup_py (line 1846) | def scan_setup_py():