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

feat: "solve" updates #5

Merged
merged 3 commits into from
Jun 3, 2024
Merged

feat: "solve" updates #5

merged 3 commits into from
Jun 3, 2024

Conversation

kgilpin
Copy link
Contributor

@kgilpin kgilpin commented Jun 3, 2024

No description provided.

kgilpin and others added 3 commits June 3, 2024 13:24
- Use appmap-python script to enable appmapping
- Use subprocess.run directly to run the indexer
Propagate variables that are needed by the solver.
Remove global variable.
run(
[
"python",
abspath(args.solver_path),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

args.solver_path was not propagated without the changes in this commit. Neither was args.appmap_command.

issue_dir.mkdir(parents=True, exist_ok=True)
issue_file = issue_dir / "issue.txt"
with open(issue_file, "w") as f:
f.write(instance["problem_statement"])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The primary reason for putting this information in a directory is that the logs will remain available - and there can be a lot of logs per issue that are very useful to pick through if something doesn't go right.

@@ -68,6 +75,7 @@ def solve_instances(instances, args):
{
"task_instances": g,
"func": solve_instance,
"output_file": args.output,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alias output to output_file.

solve_instances(dataset, args)

if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"--instances_path",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

instances_path is the name of this option in all the other scripts.

@dustinbyrne
Copy link
Contributor

I've cherry-picked 8069645 into #2

@kgilpin kgilpin merged commit 6daa600 into feat/call-appmap-python Jun 3, 2024
1 check failed
@kgilpin kgilpin deleted the feat/solve-2 branch June 3, 2024 18:56
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.

3 participants