Skip to content

Conversation

@grzuy
Copy link
Contributor

@grzuy grzuy commented Jul 26, 2023

  • Updates elixir/otp pairs
  • DRY yml, collapse 3 jobs into one with matrix leverage
  • more granular cache key

Pending:

  • Fix OTP 26 stack_columns issue

@grzuy grzuy marked this pull request as ready for review July 26, 2023 17:28
@grzuy
Copy link
Contributor Author

grzuy commented Jul 26, 2023

Test failure in OTP26 job seems to be legit failure in test/axon/compiler_test.exs:5388, I can reproduce also running it locally.

@grzuy
Copy link
Contributor Author

grzuy commented Jul 26, 2023

Test failure in OTP26 job seems to be legit failure in test/axon/compiler_test.exs:5388, I can reproduce also running it locally.

And the EXLA job failure is consistent to the one already present in main.

@grzuy grzuy marked this pull request as draft July 26, 2023 17:59
@grzuy grzuy changed the title ci: tests against 1.15/OTP26 pair ci: updates tests jobs Jul 26, 2023
@grzuy grzuy changed the title ci: updates tests jobs ci: updates CI jobs Jul 26, 2023
@grzuy grzuy marked this pull request as ready for review July 26, 2023 18:44
@grzuy grzuy marked this pull request as draft July 26, 2023 19:02
@grzuy grzuy changed the title ci: updates CI jobs ci: updates CI versions Jul 26, 2023
@grzuy
Copy link
Contributor Author

grzuy commented Jul 27, 2023

Test failure in OTP26 job seems to be legit failure in test/axon/compiler_test.exs:5388, I can reproduce also running it locally.

Seems that undeterministic map key order in OTP26 is affecting this test case

model = Axon.input("lazy_container") |> Axon.stack_columns(ignore: [:b])
input = %LazyOnly{a: [[1]], b: [[2]], c: [[3]]}
assert_equal(
Axon.predict(model, %{}, %{"lazy_container" => input}),
Nx.tensor([[1.0, 3.0]])
)

which relies on Map.from_struct keeping order of struct fields...

axon/lib/axon/layers.ex

Lines 2526 to 2529 in 713e440

deftransformp stack_columns_transform(container, ignore) do
container
|> Map.from_struct()
|> Enum.reject(fn {k, _} -> k in ignore end)

Still not sure what should be the expected behavior of Axon.stack_columns for OPT26+... 🤔

@grzuy grzuy marked this pull request as ready for review October 2, 2023 13:19
@grzuy
Copy link
Contributor Author

grzuy commented Oct 2, 2023

Still not sure what should be the expected behavior of Axon.stack_columns for OPT26+... 🤔

Hacky solution to keep Axon.stack_columns relying on the order of the container struct defstruct key list order? 3e8c5d8

grzuy and others added 2 commits October 2, 2023 22:13
@seanmor5
Copy link
Contributor

seanmor5 commented Oct 9, 2023

Thanks!

@seanmor5 seanmor5 merged commit 084dc82 into elixir-nx:main Oct 9, 2023
@grzuy grzuy deleted the otp-26 branch October 9, 2023 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants