|
10 | 10 | using Test
|
11 | 11 | using ChainRulesCore
|
12 | 12 | using Diffractor
|
| 13 | +using Distributed: pmap |
13 | 14 | using FiniteDifferences
|
14 | 15 | using LinearAlgebra
|
15 | 16 |
|
@@ -283,23 +284,24 @@ end
|
283 | 284 | @test jacobicheck(xs -> map(x -> x^2, xs), rand(2,3))
|
284 | 285 |
|
285 | 286 | # MethodError: no method matching copy(::Nothing)
|
286 |
| - @test_broken jacobicheck((xss...) -> sum(map((xs...) -> sqrt(sum(xs.^2)), xss...)), [rand(5) for _ in 1:6]...) |
| 287 | + @test_broken jacobicheck((xss...) -> map((xs...) -> sqrt(sum(xs.^2)), xss...), [rand(5) for _ in 1:6]...) |
287 | 288 |
|
288 | 289 | # MethodError: no method matching copy(::Nothing)
|
289 | 290 | @test_broken gradcheck(y -> map(x -> x*y, 1:5), 3)
|
290 | 291 | @test_broken gradient(v -> sum([x for x in v]), [1.1,2.2,3.3]) == ([1, 1, 1],)
|
291 | 292 | end
|
292 | 293 |
|
293 |
| - @test_skip @testset "bascis, pmap" begin |
294 |
| - @test jacobicheck(xs -> sum(pmap(x -> x^2, xs)), rand(2,3)) |
295 |
| - @test jacobicheck((xss...) -> sum(pmap((xs...) -> sqrt(sum(xs.^2)), xss...)), [rand(5) for _ in 1:6]...) |
| 294 | + @testset "bascis, pmap" begin |
| 295 | + # BoundsError: attempt to access 0-element Core.Compiler.UnitRange{Int64} at index [0] |
| 296 | + @test_broken jacobicheck(xs -> pmap(x -> x^2, xs), rand(2,3)) |
| 297 | + @test_broken jacobicheck((xss...) -> pmap((xs...) -> sqrt(sum(xs.^2)), xss...), [rand(5) for _ in 1:6]...) |
296 | 298 |
|
297 | 299 | function foo(y)
|
298 | 300 | bar = (x) -> x*y
|
299 | 301 | sum(pmap(bar, 1:5))
|
300 | 302 | end
|
301 |
| - @test gradtest(foo, 3) |
302 |
| - @test gradient(v -> sum([x for x in v]), [1.1,2.2,3.3]) == ([1, 1, 1],) |
| 303 | + # BoundsError: attempt to access 0-element Core.Compiler.UnitRange{Int64} at index [0] |
| 304 | + @test_broken jacobicheck(y -> pmap(x -> x*y, 1:5), 3) |
303 | 305 | end
|
304 | 306 |
|
305 | 307 | @testset "Tuple adjoint" begin
|
|
402 | 404 | # end
|
403 | 405 | # @test gradcheck(bar, [5.0])
|
404 | 406 | # end
|
405 |
| - |
|
0 commit comments