multiml.agent.pytorch package

Submodules

Module contents

class multiml.agent.pytorch.PytorchConnectionRandomSearchAgent(freeze_model_weights=False, do_pretraining=True, connectiontask_name=None, connectiontask_args={}, **kwargs)

Bases: ConnectionRandomSearchAgent

Pytorch implementation for ConnectionRandomSearchAgent.

class ModelConnectionTask(subtasks, loss_weights=None, variable_mapping=None, **kwargs)

Bases: ModelConnectionTask, PytorchBaseTask

Pytorch implementation of ModelConnectionTask.

build_model()

Build model.

class multiml.agent.pytorch.PytorchConnectionGridSearchAgent(reuse_pretraining=False, **kwargs)

Bases: PytorchConnectionRandomSearchAgent, ConnectionGridSearchAgent

Pytorch implementation for ConnectionGridSearchAgent.

class multiml.agent.pytorch.PytorchSPOSNASAgent(training_choiceblock_model=True, **kwargs)

Bases: PytorchConnectionRandomSearchAgent

Agent packing subtasks using Pytorch SPOS-NAS Model.

__init__(training_choiceblock_model=True, **kwargs)
Parameters:
  • training_choiceblock_model (bool) – Training choiceblock model after connecting submodels

  • **kwargs – Arbitrary keyword arguments

execute()

Execute.

class multiml.agent.pytorch.PytorchASNGNASAgent(verbose=1, num_epochs=1000, max_patience=5, batch_size={'length': 500, 'test': 100, 'type': 'equal_length'}, asng_args={'alpha': 1.5, 'clipping_value': None, 'delta': 0.0, 'lam': 2, 'range_restriction': True}, optimizer=None, optimizer_args=None, scheduler=None, scheduler_args=None, **kwargs)

Bases: PytorchConnectionRandomSearchAgent

Agent packing subtasks using Pytorch ASNG-NAS Model.

__init__(verbose=1, num_epochs=1000, max_patience=5, batch_size={'length': 500, 'test': 100, 'type': 'equal_length'}, asng_args={'alpha': 1.5, 'clipping_value': None, 'delta': 0.0, 'lam': 2, 'range_restriction': True}, optimizer=None, optimizer_args=None, scheduler=None, scheduler_args=None, **kwargs)
Parameters:
  • training_choiceblock_model (bool) – Training choiceblock model after connecting submodels

  • **kwargs – Arbitrary keyword arguments

execute()

Execute Currently, only categorical ASNG NAS is implemented.