Skip to content

Commit

Permalink
Add s3fs bucket assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
dnnanuti committed Mar 12, 2024
1 parent 38a5343 commit c369130
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions s3torchconnector/tst/e2e/test_e2e_s3_lightning_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import lightning
import pytest
import random

import s3fs
import torch

from pathlib import Path
Expand Down Expand Up @@ -73,6 +75,8 @@ def test_delete_checkpoint(checkpoint_directory):


def test_load_trained_checkpoint(checkpoint_directory):
# Force s3fs to acknowledge the bucket existence
assert s3fs.S3FileSystem().exists(checkpoint_directory.bucket)
nonce = random.randrange(2**64)
dataset = WikiText2(data_dir=Path(f"/tmp/data/{nonce}"))
dataloader = DataLoader(dataset, num_workers=3)
Expand Down

0 comments on commit c369130

Please sign in to comment.