code: def __init__(self, context: pytorch.PyTorchTrialContext, lr) -> None:
      self.context = context
      self.per_slot_batch_size = 4
      self.model = context.wrap_model(nn.Linear(1, 1, False))
  
      # initialize weights to 0
      self.model.weight.data.fill_(0)
      self.opt = context.wrap_optimizer(
          torch.optim.SGD(self.model.parameters(), lr=lr)
      )
  
file_path: determined/harness/tests/experiment/fixtures/ancient-checkpoints/0.21.0-pytorch-main/code/train.py
imports: import logging
  from typing import Any, Callable, Dict, List, Sequence, Tuple, Union, cast
  import torch
  from torch import nn
  import determined
  from determined import pytorch
label_desc: Use image node_id 1 to create a new OneVarPytorchTrial object from inherited base classes: pytorch with example: obj = OneVarPytorchTrial(context, lr)