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

Use shlex.quote to convert the arguments into unix format #209

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

dachengx
Copy link
Collaborator

@dachengx dachengx commented Sep 9, 2024

Otherwise, we might see a problem when interpreting the inputs for alea/submitters/run_toymc_wrapper.sh.

@dachengx dachengx marked this pull request as ready for review September 9, 2024 20:11

if run_on_submit_node:
job.add_selector_profile(execution_site="local")
# no other attributes on a local job
return job

job.add_profiles(Namespace.CONDOR, "request_cpus", f"{cores}")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

request_cpus can not be assigned to a local job.

disk=self.combine_disk,
run_on_submit_node=True,
)
separate_job = self._initialize_job(name=separate_name, run_on_submit_node=True)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For separation jobs, these arguments are not really used.

return tuple(
f"{json.dumps(str(d[key])).replace(' ', '')}".replace("'", '\\"')
for key in d.keys()
shlex.quote(Submitter.arg_to_str(kwargs[arg], annotation))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Similar to

def script_from_runner_kwargs(annotations, kwargs) -> str:

@@ -2,6 +2,12 @@

set -e

# Check if number of arguments passed is correct
if [ $# -ne 21 ]; then
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Check the number of arguments.

@dachengx dachengx merged commit 461fa19 into main Sep 9, 2024
7 checks passed
@dachengx dachengx deleted the debug_conversion branch September 9, 2024 20:14
@coveralls
Copy link

coveralls commented Sep 9, 2024

Pull Request Test Coverage Report for Build 10780496412

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.429%

Totals Coverage Status
Change from base Build 10754798887: 0.0%
Covered Lines: 1664
Relevant Lines: 1820

💛 - Coveralls

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.

2 participants