Enable Initializing Second Experiment From Library#931
Conversation
|
Ready for a review, but definitely not merging because only 2 of the experiments are updated for this change |
scheibelp
left a comment
There was a problem hiding this comment.
I have a question and a request
| variant("mpi", default=True, description="Run with MPI") | ||
| variant("rocm", default=False, description="Build and run with ROCm") | ||
| variant("cuda", default=False, description="Build and run with CUDA") | ||
| variant("openmp", default=False, description="Build and run with OpenMP") |
There was a problem hiding this comment.
It looks like these variants are always defined on every experiment, regardless of whether it inherits the associated model types.
It should be allowed to split these variants into separate modules and imported classes (as they were originally); at the same time, customizing it all from one file is ok too, I wonder if it's possible to address the above concern though (it might not be possible to conditionally define the variants).
There was a problem hiding this comment.
This is true, regardless of which models are defined, if the experiment inherits from Models(...) all programming models will show in the spec +mpi~rocm~cuda~openmp. I would like to note that this is the same behavior for the Scaling, e.g. even if the experiment does not define Throughput scaling it will show ~throughput in the spec. Not that this is correct either, but if we can find a solution for this it should be applied to both the programming models and scaling.
I don't know of a solution to the underlying bug that would enable separate classes. Perhaps something like
# mpi.py
def Mpi():
class BaseMPI:
variant("mpi")
# rocm.py
def Rocm():
class BaseRocm:
variant("rocm")
would provide the correct behavior, but the design seems maybe a bit convoluted.
It seems like the relevant piece for the behavior we desire is making sure the variant is not applied when the class is imported.
lib/main.py
Outdated
| source_dir = paths.benchpark_root | ||
| ramble_exe = paths.benchpark_home / "ramble/bin/ramble" | ||
| subprocess.run([ramble_exe, "repo", "add", "--scope=site", f"{source_dir}/repo"]) | ||
| subprocess.run([ramble_exe, "repo", "add", "--scope=site", f"{source_dir}/repos/ramble_applications"]) |
There was a problem hiding this comment.
This is something we missed when we refactored ramble and spack repos
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #931 +/- ##
===========================================
+ Coverage 62.69% 63.53% +0.83%
===========================================
Files 48 49 +1
Lines 3664 3762 +98
Branches 285 322 +37
===========================================
+ Hits 2297 2390 +93
- Misses 1356 1361 +5
Partials 11 11
🚀 New features to boost your workflow:
|
|
had Where did this move to? I feel like it was dropped when looking through these changes |
It looks like it did get dropped |
Description
This can be worked around by running the pytests individually, but this complicates the code coverage.--systemDuring Experiment Init #982files#diff-a3ddd7238fc6e36daeb0ef76e93fe15cc87824bd3299888075210c5ca6a474d3
models.pytoprogramming_model.py