Browse Source

small change for tests

dev0.8.0
x54-729 2 years ago
parent
commit
09a558c2c9
2 changed files with 1 additions and 2 deletions
  1. +0
    -1
      tests/core/drivers/paddle_driver/test_single_device.py
  2. +1
    -1
      tests/core/drivers/torch_driver/test_fsdp.py

+ 0
- 1
tests/core/drivers/paddle_driver/test_single_device.py View File

@@ -635,7 +635,6 @@ def test_save_and_load_model(only_state_dict):
driver2.load_model(path, only_state_dict)

for batch in dataloader:
print("?")
batch = driver1.move_data_to_device(batch)
res1 = driver1.model.evaluate_step(**batch)
res2 = driver2.model.evaluate_step(**batch)


+ 1
- 1
tests/core/drivers/torch_driver/test_fsdp.py View File

@@ -6,7 +6,6 @@ import re

import pytest
from fastNLP.core.controllers.trainer import Trainer
from torchmetrics import Accuracy
from fastNLP.core.callbacks import CheckpointCallback
from tests.helpers.models.torch_model import TorchNormalModel_Classification_1
from tests.helpers.datasets.torch_data import TorchNormalDataset_Classification, TorchArgMaxDataset
@@ -18,6 +17,7 @@ if _NEED_IMPORT_TORCH:
import torch.distributed as dist
from torch.optim import SGD
from torch.utils.data import DataLoader
from torchmetrics import Accuracy


@dataclass


Loading…
Cancel
Save