-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use saved objects instead of snapshots for #71 * use saved objects instead of snapshots * rlang version requirement * use saved objects instead of snapshots, binary mlp edition * use saved objects instead of snapshots, mulitclass mlp edition * use saved objects instead of snapshots, regression mlp edition * try testing on other OS * updated multinom snapshot * regenerate test objects based on changes from #70 * remove model print snapshots since they are not reproducible * try running on all os * add back skip for apple silicon * update skips * more skip updates
- Loading branch information
Showing
33 changed files
with
965 additions
and
939 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
last_param <- function(x) { | ||
last_epoch <- length(x$loss) | ||
coef(x, epoch = last_epoch) | ||
} | ||
|
||
save_coef <- function(x) { | ||
cl <- match.call() | ||
nm <- as.character(cl$x) | ||
fl <- file.path("saved", paste0(nm, ".rds")) | ||
if (file.exists(fl)) { | ||
return(FALSE) | ||
} | ||
res <- last_param(x) | ||
saveRDS(res, file = fl) | ||
invisible(TRUE) | ||
} | ||
|
||
load_coef <- function(x) { | ||
cl <- match.call() | ||
nm <- as.character(cl$x) | ||
fl <- file.path("saved", paste0(nm, ".rds")) | ||
if (!file.exists(fl)) { | ||
rlang::abort(paste("Can't find test results:", fl)) | ||
} | ||
readRDS(fl) | ||
} | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.