Giter Club home page Giter Club logo

case-studies's People

Contributors

bai-li-noaa avatar christinestawitz-noaa avatar cmlegault avatar cole-monnahan-noaa avatar iantaylor-noaa avatar jimianelli avatar moshima-pifsc avatar msupernaw avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

case-studies's Issues

Specifying obs error for fleet

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

Error in as.environment(-2.9) : invalid 'pos' argument

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

Add a codespace file?

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:

  • Quarto
  • option to open R studio
  • FIMS (built from main or from r universe)
  • Other R packages listed

Maybe there are some other dependencies we are missing?

re-run github action manually or automatically when tinytex error occurs

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

  1. increase awareness (e.g. via this issue) of the problem as something outside of FIMS (or Quarto), so that we know to manually re-run the action get it working again, and/or
  2. revise our github action as suggested by @Bai-Li-NOAA during the today's seaside chat to detect this failure and re-run the action automatically.

AFSC pollock case study does not render on remote repo

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:

  • Force installing FIMS isNA branch in the case study
  • Re-install 'TMB' from source using install.packages('TMB', type = 'source') in the case study

how to debug failed render when code works locally?

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.

Publish multiple branches of a repository on GitHub pages

It looks like the render-and-publish workflow only runs when main gets changed:

on:
push:
branches: main
.

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)

Automate the installation of required packages

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.

FIMSFrameAGE is being deprecated in m2-r-cleanup

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.

Create case studies demonstrate use of the FIMS to run a few different cases of stock assessment models

  • ASAP: able to produce full-chain recomputation of past tactical assessments
  • BAM
  • AMAK
  • SS3: does not need to include all features available in SS3, but should but should include features used for tactical assessments including models that use parametric growth and fit length comps. High effort is required due to the additional complexity of modeling growth and the large number of options

More details can be found in the FIMS Requirements sheet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.