From 213e6a0c1bb585550c9e05c3488e558181918981 Mon Sep 17 00:00:00 2001 From: Anish Shah Date: Wed, 6 Dec 2023 08:03:53 -0500 Subject: [PATCH] fix broken flags and deprecated functions --- ...Fine_tuning_a_Transformer_with_Pytorch_Lightning.ipynb | 8 ++++---- colabs/pytorch-lightning/Profile_PyTorch_Code.ipynb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/colabs/pytorch-lightning/Fine_tuning_a_Transformer_with_Pytorch_Lightning.ipynb b/colabs/pytorch-lightning/Fine_tuning_a_Transformer_with_Pytorch_Lightning.ipynb index 0f91a0c9..3ddb4919 100644 --- a/colabs/pytorch-lightning/Fine_tuning_a_Transformer_with_Pytorch_Lightning.ipynb +++ b/colabs/pytorch-lightning/Fine_tuning_a_Transformer_with_Pytorch_Lightning.ipynb @@ -245,7 +245,7 @@ " \n", " # Download the raw cola data from the 'zipfile' reference we added to the cola-raw artifact.\n", " raw_data_artifact = run.use_artifact(\"cola-raw:latest\")\n", - " zip_path = raw_data_artifact.get_path(\"zipfile\").download()\n", + " zip_path = raw_data_artifact.get_entry(\"zipfile\").download()\n", " !unzip -o $zip_path # jupyter hack to unzip data :P\n", " \n", " # Read in the raw data, log it to W&B as a wandb.Table\n", @@ -298,7 +298,7 @@ "\n", " # Download the preprocessed data\n", " pp_data_artifact = run.use_artifact(\"preprocessed-data:latest\")\n", - " data_path = pp_data_artifact.get_path(\"dataset\").download()\n", + " data_path = pp_data_artifact.get_entry(\"dataset\").download()\n", " dataset = torch.load(data_path)\n", "\n", " # Calculate the number of samples to include in each set.\n", @@ -410,8 +410,8 @@ "\n", " # Load the datasets from the split-dataset artifact\n", " data = run.use_artifact(\"split-dataset:latest\")\n", - " train_dataset = torch.load(data.get_path(\"train-data\").download())\n", - " val_dataset = torch.load(data.get_path(\"validation-data\").download())\n", + " train_dataset = torch.load(data.get_entry(\"train-data\").download())\n", + " val_dataset = torch.load(data.get_entry(\"validation-data\").download())\n", "\n", " # Extract the config object associated with the run\n", " config = run.config\n", diff --git a/colabs/pytorch-lightning/Profile_PyTorch_Code.ipynb b/colabs/pytorch-lightning/Profile_PyTorch_Code.ipynb index 00b56a76..35040872 100644 --- a/colabs/pytorch-lightning/Profile_PyTorch_Code.ipynb +++ b/colabs/pytorch-lightning/Profile_PyTorch_Code.ipynb @@ -357,7 +357,7 @@ " with profiler:\n", " profiler_callback = TorchTensorboardProfilerCallback(profiler)\n", "\n", - " trainer = pl.Trainer(gpus=1, max_epochs=1, max_steps=total_steps,\n", + " trainer = pl.Trainer(max_epochs=1, max_steps=total_steps,\n", " logger=pl.loggers.WandbLogger(log_model=True, save_code=True),\n", " callbacks=[profiler_callback], precision=wandb.config.precision)\n", "\n",