Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DG1d.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DG
DG1d.jl
Commits
fbc3068a
Commit
fbc3068a
authored
2 years ago
by
Florian Atteneder
Browse files
Options
Downloads
Patches
Plain Diff
fix wrong callback invokation when finishing
parent
398dfb8d
Branches
opt-allocs
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main.jl
+9
-8
9 additions, 8 deletions
src/main.jl
with
9 additions
and
8 deletions
src/main.jl
+
9
−
8
View file @
fbc3068a
...
@@ -56,18 +56,19 @@ function main(parfile)
...
@@ -56,18 +56,19 @@ function main(parfile)
finally
finally
# finish timer and progress bar
# finish timer and progress bar
idx
=
find
fir
st
(
cb
->
cb
isa
TimerOutputCallback
,
reverse
(
env
.
callbacks
.
callbacks
)
)
idx
=
find
la
st
(
cb
->
cb
isa
TimerOutputCallback
,
env
.
callbacks
.
callbacks
)
if
!
isnothing
(
idx
)
if
!
isnothing
(
idx
)
timercb
=
env
.
callbacks
.
callbacks
[
idx
]
timercb
=
env
.
callbacks
.
callbacks
[
idx
]
timercb
([],
0.0
,
0
,
force
=
true
)
timercb
([],
0.0
,
0
,
force
=
true
)
end
end
idx
=
findfirst
(
cb
->
cb
isa
ProgressCallback
,
reverse
(
env
.
callbacks
.
callbacks
))
# Can't force atm, because ProgressCallback uses an internal CallbackTiming...
if
!
isnothing
(
idx
)
# forwarded through the callback, henc
progresscb
=
env
.
callbacks
.
callbacks
[
idx
]
# idx = findlast(cb -> cb isa ProgressCallback, env.callbacks.callbacks)
progresscb
([],
0.0
,
0
,
force
=
true
)
# if !isnothing(idx)
else
# progresscb = env.callbacks.callbacks[idx]
display
(
dg1d
.
TO
)
# progresscb([], 0.0, 0, force=true)
end
# end
display
(
dg1d
.
TO
)
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment