Skip to content

Commit

Permalink
fix: avoid tracing through Lux models (#1021)
Browse files Browse the repository at this point in the history
* fix: avoid tracing through Lux models

* ci: run lux tests
  • Loading branch information
avik-pal authored Nov 4, 2024
1 parent 22c42fa commit 89a7083
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ steps:
- "test/"
- "Project.toml"
- ".buildkite/"
- "lib/"
config:
command: "buildkite-agent pipeline upload .buildkite/testing.yml"
agents:
Expand Down
5 changes: 4 additions & 1 deletion lib/LuxCore/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LuxCore"
uuid = "bb33d45b-7691-41d6-9220-0943567d0623"
authors = ["Avik Pal <[email protected]> and contributors"]
version = "1.0.1"
version = "1.1.0"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Expand All @@ -14,6 +14,7 @@ ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869"
Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196"
MLDataDevices = "7e8f7934-dd98-4c1a-8fe8-92b47a384d40"
Reactant = "3c362404-f566-11ee-1572-e11a4b42c853"
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
Expand All @@ -25,6 +26,7 @@ LuxCoreChainRulesCoreExt = "ChainRulesCore"
LuxCoreEnzymeCoreExt = "EnzymeCore"
LuxCoreFunctorsExt = "Functors"
LuxCoreMLDataDevicesExt = "MLDataDevices"
LuxCoreReactantExt = "Reactant"
LuxCoreSetfieldExt = "Setfield"

[compat]
Expand All @@ -36,6 +38,7 @@ EnzymeCore = "0.7.7, 0.8"
Functors = "0.4.12"
MLDataDevices = "1"
Random = "1.10"
Reactant = "0.2.3"
ReverseDiff = "1.15"
Setfield = "1"
Tracker = "0.2.34"
Expand Down
13 changes: 13 additions & 0 deletions lib/LuxCore/ext/LuxCoreReactantExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module LuxCoreReactantExt

using LuxCore: AbstractLuxLayer
using Reactant: Reactant

# Avoid tracing though models since it won't contain anything useful
function Reactant.make_tracer(
seen, @nospecialize(model::AbstractLuxLayer), @nospecialize(path), mode; kwargs...
)
return model
end

end

2 comments on commit 89a7083

@avik-pal
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register subdir=lib/LuxCore

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/118622

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a LuxCore-v1.1.0 -m "<description of version>" 89a7083a95d7d069a6d088a962156c6a7c95f4e2
git push origin LuxCore-v1.1.0

Please sign in to comment.