code: def train(
      project, learning_rate, num_epochs, hidden_layer_size=15, **kwargs
  ):
      params = {
          "learning_rate": learning_rate,
          "num_epochs": num_epochs,
          "hidden_layer_size": hidden_layer_size,
      }
      params.update(kwargs)
      experiment = project.experiments.create(path=None, params=params)
  
      print("Downloading data set...")
      iris = load_iris()
      (
          train_features,
          val_features,
          train_labels,
          val_labels,
      ) = train_test_split(
          iris.data,
          iris.target,
          train_size=0.8,
          test_size=0.2,
          random_state=0,
          stratify=iris.target,
      )
      train_features = torch.FloatTensor(train_features)
      val_features = torch.FloatTensor(val_features)
      train_labels = torch.LongTensor(train_labels)
      val_labels = torch.LongTensor(val_labels)
  
      model = nn.Sequential(
          nn.Linear(4, 15),
          nn.ReLU(),
          nn.Linear(15, 3),
      )
      optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate)
      criterion = nn.CrossEntropyLoss()
  
      for epoch in range(num_epochs):
          model.train()
          optimizer.zero_grad()
          outputs = model(train_features)
          loss = criterion(outputs, train_labels)
          loss.backward()
          optimizer.step()
  
          with torch.no_grad():
              model.eval()
              output = model(val_features)
              acc = (
                  output.argmax(1) == val_labels
              ).float().sum() / len(val_labels)
  
          print(
              "Epoch {}, train loss: {:.3f}, validation accuracy: {:.3f}".format(
                  epoch, loss.item(), acc
              )
          )
          experiment.checkpoint(
              path=None,
              step=epoch,
              metrics={"loss": loss.item(), "accuracy": acc},
              primary_metric=("loss", "minimize"),
          )
  
      experiment.stop()
  
file_path: keepsake/tools/make_complex_project.py
imports: import argparse
  import os
  import tempfile
  from sklearn.datasets import load_iris
  from sklearn.model_selection import train_test_split
  from sklearn.utils import shuffle
  import torch
  from torch import nn
  from torch.autograd import Variable
  from keepsake.project import Project
  from keepsake.repository import repository_for_url
label_desc: Use image node_id 1 for calling a global function with example usage: train(project, learning_rate, num_epochs, hidden_layer_size) without return types