-
Notifications
You must be signed in to change notification settings - Fork 7
R2D2 v3 Adaptation #618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
R2D2 v3 Adaptation #618
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
2980f48
Script to setup new r2d2 credentials
ftgoktas d502482
Create a new swell task to test new r2d2
ftgoktas 29a42d8
Adapt get_observations to new R2D2
ftgoktas 85d7124
Remove exit()
ftgoktas 88fd221
Add r2d2 configs (#318)
ftgoktas da1c318
Update swell tasks to new R2D2 (#318)
ftgoktas 56c1c47
Update r2d2 version of save obs diagnostics #318
ftgoktas 0149e4a
Remove unused files #318
ftgoktas e83db93
Merge remote-tracking branch 'origin/develop' into feature/r2d2_v3
ftgoktas 958ec06
Create r2d2 file register script #318
ftgoktas 1240447
Add scripts for manual setup for R2D2 #318
ftgoktas 7c0be9d
Clean up files (#318)
ftgoktas f8fc151
Clean up the files (#318)
ftgoktas a75bf9c
Update Python coding norms (#318)
ftgoktas c2b91d2
Fix pycode styles
ftgoktas f2c4d08
Remove redundant lines
ftgoktas 6a614eb
Load R2D2 credentials under TaskBase (#318)
ftgoktas 591f570
Load credentials under create R2D2 config (#318)
ftgoktas 53ded1b
make R2D2 host/compiler detection support dynamic (#318)
ftgoktas 44c7b17
Add docs for credential setup (#318)
ftgoktas d035da4
Update r2d2_config for cascade (#318)
ftgoktas bbb953d
Move credentials under create_task (#318)
ftgoktas fa927ae
Move scripts under utilities (#318)
ftgoktas 98cf89d
Fix pylint errors
ftgoktas 18d9e0d
Merge branch 'develop' of https://github.com/GEOS-ESM/swell into feat…
ftgoktas a1828f5
Merge branch 'feature/r2d2_v3' of https://github.com/GEOS-ESM/swell i…
ftgoktas eafae45
Fix AttributeError when fetching bias correction files (#318)
ftgoktas 9384fc9
Fix bias correction arguments (#318)
ftgoktas d380589
Fix bias correction argument (#318)
ftgoktas 0cf308c
Add file type argument (#318)
ftgoktas a76237c
Fix bias correction ingest
ftgoktas 2e76dac
Improve file extension support
ftgoktas af53fb6
Add logging
ftgoktas 0b77a04
Resolve merge conflict
ftgoktas 1349f67
Fix bias coefficient ingestion
ftgoktas ef8483c
Go back to existing bias naming convention
ftgoktas e0a08f6
Use JCSDA enums for bias files
ftgoktas 65867a0
Improve logging
ftgoktas 3e8acba
Fix code style
ftgoktas a8e2111
extend exclude list to ignore venv and build directories
ftgoktas c57ee13
Change the script name register_files with ingest_files
ftgoktas 7d441c2
Fix logger
ftgoktas 3cfd995
Fix string literal
ftgoktas 2271658
Merge remote-tracking branch 'origin/feature/r2d2_v3' into feature/r2…
ftgoktas 2448d38
Moved readme to docs
ftgoktas 0a28441
Fix pycode style
ftgoktas c28ebb5
Remove redundant lines
ftgoktas 63b5e6a
Make the comment more generic
ftgoktas a641b9b
Merge branch 'develop' into feature/r2d2_v3
ftgoktas a90d3c2
Add readme for ingest_files.py (#318)
ftgoktas b869cfc
Merge remote-tracking branch 'origin' into feature/r2d2_v3
ftgoktas b971636
Merge remote-tracking branch 'origin/feature/r2d2_v3' into feature/r2…
ftgoktas 29213af
Update src/swell/deployment/platforms/nccs_discover_sles15/r2d2_confi…
ftgoktas 987efb6
Remove redundant loging
ftgoktas b4ab97f
Remove redundant logging
ftgoktas 3918843
Remove unnecessary statements
ftgoktas 9e8b9da
Bump version to 1.11.0
ftgoktas a49f1f6
Bump version to 1.20.0
ftgoktas dfc250f
Add how to register experiments to readme
ftgoktas a5d836b
Upgrade r2d2-client (#618)
ftgoktas dc2e9da
Add register experiment to readme
ftgoktas de0461d
r2d2 v3 turnoffrestart (#653)
Dooruk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 contains hidden or 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,100 @@ | ||
| # R2D2 v3 Credentials Configuration | ||
|
|
||
| This document explains how to configure R2D2 v3 credentials for SWELL workflows. | ||
|
|
||
| ## Overview | ||
|
|
||
| SWELL now uses R2D2 v3 for metadata-driven data storage and retrieval. R2D2 v3 requires authentication credentials to access the centralized API. SWELL automatically loads these credentials from a YAML configuration file. | ||
|
|
||
| ## Quick Setup | ||
|
|
||
| 1. **Create the credentials directory:** | ||
| ```bash | ||
| mkdir -p ~/.swell | ||
| ``` | ||
|
|
||
| 2. **Create the credentials file:** | ||
| ```bash | ||
| cp /path/to/swell/r2d2_credentials.yaml ~/.swell/r2d2_credentials.yaml | ||
| ``` | ||
|
|
||
| 3. **Edit with your credentials:** | ||
| ```bash | ||
| vim ~/.swell/r2d2_credentials.yaml | ||
| ``` | ||
|
|
||
| 4. **Set secure permissions:** | ||
| ```bash | ||
| chmod 600 ~/.swell/r2d2_credentials.yaml | ||
| ``` | ||
|
|
||
| ## Credentials File Format | ||
|
|
||
| Create `~/.swell/r2d2_credentials.yaml` with the following structure: | ||
|
|
||
| ```yaml | ||
| # R2D2 v3 credentials file | ||
| # Save this as ~/.swell/r2d2_credentials.yaml | ||
| # Set permissions: chmod 600 ~/.swell/r2d2_credentials.yaml | ||
|
|
||
| # Required credentials | ||
| user: your_username # Your R2D2 username | ||
| api_key: your_api_key # Your R2D2 API key | ||
|
|
||
| # Platform-specific values (automatically determined by SWELL with an option to use YAML-first) | ||
| # host: discover-gmao # Automatically set based on platform | ||
| # compiler: intel # Automatically set based on platform | ||
|
|
||
| ``` | ||
|
|
||
| ## Required Fields | ||
|
|
||
| | Field | Description | Example | | ||
| |-------|-------------|---------| | ||
| | `user` | Your R2D2 username | `jdoe` | | ||
| | `api_key` | Your R2D2 API authentication key | `abcd1234-ef56-7890-abcd-1234567890ab` | | ||
|
|
||
| ## Platform-Specific Fields (Automatically Set) | ||
|
|
||
| | Field | Description | NCCS Discover Value | | ||
| |-------|-------------|---------------------| | ||
| | `host` | Compute host identifier | `discover-gmao` | | ||
| | `compiler` | Compiler type used | `intel` | | ||
|
|
||
| **Important**: `host` and `compiler` are automatically determined by SWELL based on your platform configuration. You can also set these manually in your credentials file. | ||
|
|
||
| ### Loading Precedence | ||
|
|
||
| The credential loading follows this priority order: | ||
|
|
||
| 1. **Environment Variables** (highest priority) | ||
| 2. **YAML Configuration File** | ||
| 3. **Platform Detection** (for host/compiler only) | ||
|
|
||
| **For host and compiler specifically:** | ||
| - YAML `host`/`compiler` values override platform detection | ||
| - Platform detection is used as fallback when not specified in YAML | ||
|
|
||
| ### Platform-Specific Configuration | ||
|
|
||
| SWELL automatically determines `host` and `compiler` based on your platform: | ||
|
|
||
| | Platform | R2D2 Host | R2D2 Compiler | Notes | | ||
| |----------|-----------|---------------|-------| | ||
| | `nccs_discover_sles15` | `discover-gmao` | `intel` | NCCS Discover SLES15 | | ||
| | `nccs_discover_cascade` | `discover-gmao` | `intel` | NCCS Discover Cascade | | ||
| <!-- | `aws` | `aws-gmao` | `intel` | AWS cloud platform | | ||
| | `generic` | `None` | `None` | Fallback to YAML/env vars | --> | ||
|
|
||
|
|
||
| ## Environment Variables Set | ||
|
|
||
| When loaded, the following environment variables are set: | ||
|
|
||
| - `R2D2_USER`: Your R2D2 username | ||
| - `R2D2_API_KEY`: Your R2D2 API key | ||
| - `R2D2_HOST`: Compute host name | ||
| - `R2D2_COMPILER`: Compiler type | ||
| <!-- - `R2D2_SERVER_HOST`: (Optional) API server override | ||
| - `R2D2_SERVER_PORT`: (Optional) API server port override --> | ||
|
|
This file contains hidden or 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 contains hidden or 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,13 @@ | ||
| # R2D2 v3 credentials file | ||
| # Save this as ~/.swell/r2d2_credentials.yaml | ||
| # Set permissions: chmod 600 ~/.swell/r2d2_credentials.yaml | ||
|
|
||
| # R2D2 v3 API credentials | ||
| user: your_username | ||
| api_key: your_api_key_here | ||
|
|
||
| # Platform configuration | ||
| host: discover-gmao | ||
| compiler: intel | ||
|
|
||
|
|
||
This file contains hidden or 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 contains hidden or 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
19 changes: 9 additions & 10 deletions
19
src/swell/deployment/platforms/nccs_discover_cascade/r2d2_config.yaml
This file contains hidden or 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 |
|---|---|---|
| @@ -1,22 +1,21 @@ | ||
| databases: | ||
|
|
||
| ${USER}: | ||
| class: LocalDB | ||
| root: {{r2d2_local_path}} | ||
| cache_fetch: false | ||
|
|
||
| gmao-shared: | ||
| class: LocalDB | ||
| root: /discover/nobackup/projects/gmao/advda/R2D2DataStore/Shared | ||
| cache_fetch: false | ||
| # v3 API configuration (for centralized nccs-gmao data) | ||
| data_hub: nccs-gmao | ||
| data_store: r2d2-experiments-nccs-gmao | ||
| compute_host: discover-gmao-intel | ||
|
|
||
| # when fetching data, in which order should the databases accessed? | ||
| # Fetch order: try local first, then API | ||
| fetch_order: | ||
| - ${USER} | ||
| - gmao-shared | ||
|
|
||
| # when storing data, in which order should the databases accessed? | ||
| store_order: | ||
| - ${USER} | ||
| # Optional: credentials file for v3 API authentication | ||
| # credentials_file: ~/.swell/swell-r2d2-credentials.yaml | ||
|
|
||
| # Cache settings | ||
| cache_name: ${USER} | ||
| cache_fetch: false | ||
Dooruk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ftgoktas marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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
19 changes: 9 additions & 10 deletions
19
src/swell/deployment/platforms/nccs_discover_sles15/r2d2_config.yaml
This file contains hidden or 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 |
|---|---|---|
| @@ -1,22 +1,21 @@ | ||
| databases: | ||
|
|
||
| ${USER}: | ||
| class: LocalDB | ||
| root: {{r2d2_local_path}} | ||
| cache_fetch: false | ||
|
|
||
| gmao-shared: | ||
| class: LocalDB | ||
| root: /discover/nobackup/projects/gmao/advda/R2D2DataStore/Shared | ||
| cache_fetch: false | ||
| # v3 API configuration (for centralized nccs-gmao data) | ||
| data_hub: nccs-gmao | ||
| data_store: r2d2-experiments-nccs-gmao | ||
| compute_host: discover-gmao-intel | ||
|
|
||
| # when fetching data, in which order should the databases accessed? | ||
| # Fetch order: try local first, then API | ||
| fetch_order: | ||
| - ${USER} | ||
| - gmao-shared | ||
|
|
||
| # when storing data, in which order should the databases accessed? | ||
| store_order: | ||
| - ${USER} | ||
| # Optional: credentials file for v3 API authentication | ||
| # credentials_file: ~/.swell/swell-r2d2-credentials.yaml | ||
|
|
||
| # Cache settings | ||
| cache_name: ${USER} | ||
| cache_fetch: false |
This file contains hidden or 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 contains hidden or 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 contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.