Skip to content

Commit

Permalink
add garbage collection
Browse files Browse the repository at this point in the history
  • Loading branch information
addelany committed Dec 8, 2023
1 parent 6ed447f commit 9ae7360
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions catalog/scores/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@
],
"assets": {
"data": {
"href": "\"s3://anonymous@bio230014-bucket01/challenges/scores/parquet/?endpoint_override=sdsc.osn.xsede.org\"",
"href": "s3://anonymous@bio230014-bucket01/challenges/scores/parquet/?endpoint_override=sdsc.osn.xsede.org",
"type": "application/x-parquet",
"title": "Database Access",
"roles": [
"data"
],
"description": "Use `arrow` for remote access to the database. This R code will return results for the VERA Forecasting Challenge.\n\n### R\n\n```{r}\n# Use code below\n\nall_results <- arrow::open_dataset(\"s3://anonymous@bio230014-bucket01/challenges/scores/parquet/?endpoint_override=sdsc.osn.xsede.org\")\ndf <- all_results |> dplyr::collect()\n\n```\n \n\nYou can use dplyr operations before calling `dplyr::collect()` to `summarise`, `select` columns, and/or `filter` rows prior to pulling the data into a local `data.frame`. Reducing the data that is pulled locally will speed up the data download speed and reduce your memory usage.\n\n\n"
"description": "Use `arrow` for remote access to the database. This R code will return results for the VERA Forecasting Challenge.\n\n### R\n\n```{r}\n# Use code below\n\nall_results <- arrow::open_dataset(s3://anonymous@bio230014-bucket01/challenges/scores/parquet/?endpoint_override=sdsc.osn.xsede.org)\ndf <- all_results |> dplyr::collect()\n\n```\n \n\nYou can use dplyr operations before calling `dplyr::collect()` to `summarise`, `select` columns, and/or `filter` rows prior to pulling the data into a local `data.frame`. Reducing the data that is pulled locally will speed up the data download speed and reduce your memory usage.\n\n\n"
},
"thumbnail": {
"href": "https://raw.githubusercontent.com/eco4cast/neon4cast-ci/main/catalog/thumbnail_plots/52760199990_d1a0f154fe_c.jpg",
Expand Down
6 changes: 6 additions & 0 deletions catalog/update_stac.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,42 @@ print('BUILDING FORECASTS')
source('catalog/forecasts/forecast_models.R')

rm(list = ls()) # remove all environmental vars between forecast and scores
gc()

# scores
print('BUILDING SCORES')
source('catalog/scores/scores_models.R')

rm(list = ls())
gc()

# inventory
print('BUILDING INVENTORY')
source('catalog/inventory/create_inventory_page.R')

rm(list = ls())
gc()

# summaries
print('BUILDING FORECAST SUMMARIES')
source('catalog/summaries/summaries_models.R')

rm(list = ls())
gc()

# targets
print('BUILDING TARGETS')
source('catalog/targets/create_targets_page.R')

rm(list = ls())
gc()

# noaa
print('BUILDING NOAA')
source('catalog/noaa_forecasts/noaa_forecasts.R')

rm(list = ls())
gc()

# sites
print('BUILDING SITES')
Expand Down

0 comments on commit 9ae7360

Please sign in to comment.