Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sebffischer committed Jan 25, 2024
1 parent 41bc9c1 commit 4f32e59
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion man/mlr_pipeops_preproc_torch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/test_lazy_tensor.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ test_that("pofu identifies identical columns", {
})

test_that("as_lazy_tensor for dataset", {
ds = random_dataset(10, 3)
ds = random_dataset(3)
x = as_lazy_tensor(ds, dataset_shapes = list(x = c(NA, 3)), ids = 1:5)
expect_class(x, "lazy_tensor")
expect_torch_equal(ds$.getbatch(1:5)$x, materialize(x, rbind = TRUE))
})

test_that("as_lazy_tensor for DataDescriptor", {
ds = random_dataset(10, 3)
ds = random_dataset(3)
dd = DataDescriptor$new(
dataset = ds,
dataset_shapes = list(x = c(NA, 3))
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ test_that("uniqueify works", {
})

test_that("auto_cache_lazy_tensors", {
ds = random_dataset(10, 3)
ds2 = random_dataset(10, 3)
ds = random_dataset(3)
ds2 = random_dataset(3)

# 1) Duplicated dataset_hash
x1 = list(
Expand Down

0 comments on commit 4f32e59

Please sign in to comment.