-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Refactor]: Stop default diagnostics always running if e3sm_diags is executed via Python script #735
Labels
Comments
tomvothecoder
changed the title
[Refactor] Consider refactoring CoreParameter.sets default value from all sets to None or empty list
[Refactor] Consider refactoring Sep 29, 2023
e3sm_diags
default behavior from running all sets to being explicitly specified
9 tasks
tomvothecoder
changed the title
[Refactor] Consider refactoring
[Refactor] Consider refactoring CoreParameter and Run classes to focus on a single set instead of list of sets
Sep 29, 2023
e3sm_diags
default behavior from running all sets to being explicitly specified
tomvothecoder
changed the title
[Refactor] Consider refactoring CoreParameter and Run classes to focus on a single set instead of list of sets
[Refactor] Consider refactoring CoreParameter and Run classes to focus on 1 parameter object per set
Sep 29, 2023
tomvothecoder
changed the title
[Refactor] Consider refactoring CoreParameter and Run classes to focus on 1 parameter object per set
[Refactor]: Remove default diagnostic sets behavior when running e3sm_diags via Python scripts
Oct 23, 2023
tomvothecoder
changed the title
[Refactor]: Remove default diagnostic sets behavior when running e3sm_diags via Python scripts
[Refactor]: Remove running default diagnostic sets when running e3sm_diags via Python script
Oct 23, 2023
tomvothecoder
changed the title
[Refactor]: Remove running default diagnostic sets when running e3sm_diags via Python script
[Refactor]: Stop default diagnostic sets when running e3sm_diags via Python script
Oct 23, 2023
tomvothecoder
changed the title
[Refactor]: Stop default diagnostic sets when running e3sm_diags via Python script
[Refactor]: Stop default diagnostics always running if e3sm_diags is executed via Python script
Oct 23, 2023
9 tasks
tomvothecoder
added a commit
that referenced
this issue
Dec 13, 2023
…_diags()` (#747) * Refactor integration tests (_tests/integration_) * Delete `test_dataset.py` because it is a really old and incomplete test file for the legacy `Dataset` class based on CDAT * Delete `test_all_sets.py` and `all_sets_modified.cfg` because it tests for expected image counts which is redundant (`test_all_sets_image_diffs.py` does this already) * Replace `subprocess` calls with direct call to Python API for real-time test results and easier debugging * Move `complete_run.py` to `/test/integration` * Move `test_run.py` to `tests/e3sm_diags` since it is more of a unit test file * Refactor `Run` class (_run.py_) * Closes #735 * Add `use_cfg` boolean argument to `run_diags()` and `get_run_parameters()` * Add `self.cfg_path` attribute, which is set if `.cfg` file(s) are used for diagnostic runs * Add `is_cfg_file_arg_set()` property to check parser for `-d/--diags` * Rename `get_final_parameters()` to `get_run_parameters()` and refactored to smaller methods * Update CI/CD build workflow (_build_workflow.yml_) * Split up testing step into: 1) run unit tests 2) download integration test data 3) run integration tests * Easier to keep track of runtime and results
chengzhuzhang
pushed a commit
that referenced
this issue
Feb 24, 2024
…_diags()` (#747) * Refactor integration tests (_tests/integration_) * Delete `test_dataset.py` because it is a really old and incomplete test file for the legacy `Dataset` class based on CDAT * Delete `test_all_sets.py` and `all_sets_modified.cfg` because it tests for expected image counts which is redundant (`test_all_sets_image_diffs.py` does this already) * Replace `subprocess` calls with direct call to Python API for real-time test results and easier debugging * Move `complete_run.py` to `/test/integration` * Move `test_run.py` to `tests/e3sm_diags` since it is more of a unit test file * Refactor `Run` class (_run.py_) * Closes #735 * Add `use_cfg` boolean argument to `run_diags()` and `get_run_parameters()` * Add `self.cfg_path` attribute, which is set if `.cfg` file(s) are used for diagnostic runs * Add `is_cfg_file_arg_set()` property to check parser for `-d/--diags` * Rename `get_final_parameters()` to `get_run_parameters()` and refactored to smaller methods * Update CI/CD build workflow (_build_workflow.yml_) * Split up testing step into: 1) run unit tests 2) download integration test data 3) run integration tests * Easier to keep track of runtime and results
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview
If e3sm_diags is executed via a Python script, the default diagnostics will always execute and the
CoreParameter.sets
attribute defined in the Python script is ignored.This means debugging can't be done on a single set/variable. Instead, this behavior should be fixed because debugging is much easier by executing a Python script that defines a single
CoreParameter
object with a single set and a few variables.If the user wants to run the default sets, they should manually do that via the CLI (e.g.,
e3sm_diags -d lat_lon_model_vs_model.cfg
).Related Code
CoreParameter.sets
is a list of all of the sets:e3sm_diags/e3sm_diags/parameter/core_parameter.py
Lines 55 to 76 in a2d00eb
Run.sets_to_run = CoreParameter().sets
default value.e3sm_diags/e3sm_diags/run.py
Lines 20 to 22 in a2d00eb
Run.get_final_parameters()
sets_to_run
to get the sets from the defined Parameter objects viaparameters
argOriginal Discussion: #677 (comment)
The text was updated successfully, but these errors were encountered: