noaa-fims / case-studies Goto Github PK
View Code? Open in Web Editor NEWFIMS case studies after MQ
Home Page: https://noaa-fims.github.io/case-studies/
License: Creative Commons Zero v1.0 Universal
FIMS case studies after MQ
Home Page: https://noaa-fims.github.io/case-studies/
License: Creative Commons Zero v1.0 Universal
I am getting this error: "Error in as.environment(-2.9) : invalid 'pos' argument" when specifying the observation error for a fleet. I get this error when I try to run existing case studies locally. It does not seem to be an issue when running on codespaces.
Below is some example code:
fish_fleet <- methods::new(Fleet)
fish_fleet$nages <- 9
fish_fleet$nyears <- 19
fish_fleet$log_Fmort <- log(rep(0.00001, 19))
fish_fleet$estimate_F <- TRUE
fish_fleet$random_F <- FALSE
fish_fleet$log_q <- 0 #Not sure if this will be right
fish_fleet$estimate_q <- FALSE
fish_fleet$random_q <- FALSE
Here are some values that resulted in an error
fish_fleet$log_obs_error <- log(sqrt(log(0.05 ^ 2 + 1))) #invalid 'pos' argument
fish_fleet$log_obs_error <- -2.9 #Error in as.environment(-2.9) : invalid 'pos' argument
fish_fleet$log_obs_error <- .5 #Doesn't work
These values seem to work
fish_fleet$log_obs_error <- 1
fish_fleet$log_obs_error <- -1
fish_fleet$log_obs_error <- -1.1
As the number increases, a list would be helpful. The github.io page includes links to each case study in the navigation bar, but this isn't as clear as a README list.
List could include a column stating the status as in-progress vs complete.
Or maybe incomplete case studies should all be in branches (e.g. https://github.com/NOAA-FIMS/case-studies/tree/NWFSC-petrale).
Relates to #6.
If anyone would like to use it, should we add a devcontainer.json file for running a codespace into the case studies repo? I think dependencies needed would be:
Maybe there are some other dependencies we are missing?
Occasionally our Render on pull request fails with an error
ERROR: Unable to determine latest release for rstudio/tinytex-releases
403 - Forbidden
I posted this quarto-dev issue quarto-dev/quarto-actions#105 and was told "it's most likely a transient failure of the GitHub API (or the github action runners themselves)".
Therefore, I think the best two options are either to
The AFSC pollock case study renders successfully locally but it does not render on remote repo.
The warning from the FIMS installation process:
Warning in checkMatrixPackageVersion(getOption("TMB.check.Matrix", TRUE)) :
Package version inconsistency detected.
TMB was built with Matrix version 1.6.4
Current Matrix version is 1.6.1.1
Please re-install 'TMB' from source using install.packages('TMB', type = 'source') or ask CRAN for a binary version of 'TMB' matching CRAN's 'Matrix' package
The error after running [run-FIMS] section of code:
*** caught segfault ***
address 0x0, cause 'memory not mapped'
The pollock case study needs to use the FIMS isNA branch, but I am not sure if GHA is installing the correct version of FIMS for this case study. When I tried to use the latest version of FIMS locally for this case study, I encountered the following error:
Quitting from lines 94-190 [run-FIMS] (AFSC-GOA-pollock.qmd)
Error in `nlminb()`:
! NA/NaN gradient evaluation
Backtrace:
1. TMBhelper::fit_tmb(obj, getsd = FALSE, newtonsteps = 0, control = list(trace = 100))
2. stats::nlminb(...)
Execution halted
Potential solutions to try:
I created draft PR #17 because the NWFSC-petrale case-study is now working well enough for me locally to be worth posting (although further refinements would be helpful). However, the github action is erroring with a segfault when running CreateTMBModel()
(I think): https://github.com/NOAA-FIMS/case-studies/actions/runs/8442175493/job/23123020915#step:6:519.
I don't know how to try to render the quarto documents locally or some other way to debug this. When running the individual code chunks on my Windows computer, the CreateTMBModel()
command works fine.
It looks like the render-and-publish workflow only runs when main
gets changed:
case-studies/.github/workflows/render-and-publish.yml
Lines 1 to 3 in 131cab7
Is there a way to create a workflow that renders branches or pull requests to confirm that it's working? I understand that there's just a single github.io site, so I don't really know how this would work. But it seems like a problem that someone has a solution to somewhere, right?
Originally posted by @iantaylor-NOAA in #12 (comment)
Tagging Chris since we probably need to work together on it - although I can use help figuring out why the Yellowtail example that runs locally doesn't work in this quarto book
the SWFSC Sardine example loads locally by throws a 404 page not found error online.
It would be nice to automate the installation of required packages when developers render the book locally. I have added a few lines of code within the NEFSC yellowtail example to automatically install missing packages.
However, duplicating this code for each case study may be redundant. Maybe we can explore an alternative solution to include a DESCRIPTION file and utilize the {attachment} package to install missing dependencies. See examples here.
List of simplifications to each case study can be found here
FIMSFrameAge will have the same functionality as FIMSFrame and can be renamed as such. This affects
See NOAA-FIMS/FIMS#590 for the main issue.
More details can be found in the FIMS Requirements sheet.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.