Skip to content

Commit

Permalink
cl/depr (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed May 20, 2023
1 parent ae77ce2 commit d6d0067
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Tsunami"
uuid = "36e41bbe-399b-4a86-8623-faa02b4c2ac8"
authors = "Carlo Lucibello"
version = "0.2.0"
version = "0.1.4"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
9 changes: 9 additions & 0 deletions src/deprecated.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function fit(ckpt_path::AbstractString, trainer::Trainer, args...; kws...)
Base.depwarn("`fit(ckpt_path, trainer, ...)` is deprecated, use `fit(ckpt_path, model, trainer, ...; kws...)` instead.", :fit)
ckpt = load_checkpoint(ckpth_path)
model = ckpt.model
trainer.fit_state = ckpt.fit_state
trainer.lr_schedulers = ckpt.lr_schedulers
trainer.optimisers = ckpt.optimisers
return fit(model, trainer, args...; kws..., _resuming_from_ckpt = true)
end

2 comments on commit d6d0067

@CarloLucibello
Copy link
Owner Author

Choose a reason for hiding this comment

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

@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/83927

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 v0.1.4 -m "<description of version>" d6d0067db4569307c15099fc537a2c8efb8bd22f
git push origin v0.1.4

Please sign in to comment.