Skip to content
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

added basic feature to turn experiment config into shell script #150

Merged
merged 7 commits into from
Jan 6, 2023

Conversation

bobkopp
Copy link
Collaborator

@bobkopp bobkopp commented Jan 4, 2023

I've retired the old module test scripts, the preferred replacement approach should be:

  1. Create a single-module experiment config invoking the desired modules (e.g., experiments/onemodule)
  2. run python runFACTS.py --shellscript experiments/onemodule > test.sh
  3. source test.sh

@bobkopp bobkopp requested a review from andre-merzky January 4, 2023 20:08
@bobkopp bobkopp added this to the v1.0.0 milestone Jan 4, 2023
runFACTS.py Outdated
@@ -38,6 +37,11 @@ def run_experiment(exp_dir, debug_mode, resourcedir = None):
# Exit
sys.exit(0)

# Print out shell script if in shell script mode
if makeshellscript:
print_experimentsteps_script(experimentsteps)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running the print_experimentsteps_script function at this point will require the onemodule directory to include the location.lst file. Maybe there is a way to run this after line 86-90 or we need to be clear to the user that makeshellscript = True requires location.lst to be present in exp_dir

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, even if I create a location.lst file in experiments/onemodule/ the test run still fails with

FileNotFoundError: [Errno 2] No such file or directory: '/scratch/jt1187/test.1673016583/location.lst'

I think it is not being copied to the working directory.

print('#!/bin/bash\n')

print('if [ -z "$WORKDIR" ]; then ')
print(' WORKDIR=/scratch/`whoami`/test.`date +%s`')
Copy link
Contributor

@jetesdal jetesdal Jan 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be useful to include the name of the module. I think that could be done by extracting pipeline_id and add it to the working directory name.

@bobkopp
Copy link
Collaborator Author

bobkopp commented Jan 6, 2023

Ok, I've addressed the location.lst issue and also set up separate directories for each pipeline. This is guaranteed to break cross-module interactions, since we do not handle in the script the copy_input_data and copy_output_data commands used for passing data between modules. But I am merging the shellscript functionality in as an experimental feature for now.

@bobkopp bobkopp merged commit 675faa4 into main Jan 6, 2023
@bobkopp bobkopp deleted the runFACTS2shell branch January 6, 2023 19:33
pkjr002 pushed a commit to pkjr002/facts that referenced this pull request Jan 27, 2023
…on/runFACTS2shell

added basic feature to turn experiment config into shell script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

run_moduletest.sh is not working due to missing softlinks in module data subdirectories
2 participants