@@ -28,6 +28,10 @@ expect_pipeop_torch = function(graph, id, task, module_class = id, exclude_args
2828 result = graph $ train(task )
2929 md = result [[1 ]]
3030
31+ # PipeOp overwrites hash and phash if necessary
32+ testthat :: expect_warning(po_test $ hash , regexp = NA )
33+ testthat :: expect_warning(po_test $ phash , regexp = NA )
34+
3135 modulegraph = md $ graph
3236 po_module = modulegraph $ pipeops [[id ]]
3337 if (is.null(po_module $ module )) {
@@ -325,6 +329,10 @@ expect_pipeop_torch_preprocess = function(obj, shapes_in, exclude = character(0)
325329 if (is.null(seed )) {
326330 seed = sample.int(100000 , 1 )
327331 }
332+ # overwrites .additional_phash_input where necessary
333+ testthat :: expect_warning(obj $ hash , regexp = NA )
334+ testthat :: expect_warning(obj $ phash , regexp = NA )
335+
328336 expect_pipeop(obj )
329337 expect_class(obj , " PipeOpTaskPreprocTorch" )
330338 # a) Check that all parameters but stages have tags train and predict (this should hold in basically all cases)
@@ -423,6 +431,11 @@ expect_pipeop_torch_preprocess = function(obj, shapes_in, exclude = character(0)
423431
424432expect_learner_torch = function (learner , task , check_man = TRUE , check_id = TRUE ) {
425433 checkmate :: expect_class(learner , " LearnerTorch" )
434+
435+ # overwrites .additional_phash_input where necessary
436+ testthat :: expect_warning(learner $ hash , regexp = NA )
437+ testthat :: expect_warning(learner $ phash , regexp = NA )
438+
426439 get(" expect_learner" , envir = .GlobalEnv )(learner )
427440 # state cloning is tested separately
428441 learner1 = learner
0 commit comments