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

Solution DB #10

Open
3 of 5 tasks
Vlad-Shcherbina opened this issue Jul 20, 2018 · 5 comments
Open
3 of 5 tasks

Solution DB #10

Vlad-Shcherbina opened this issue Jul 20, 2018 · 5 comments
Assignees

Comments

@Vlad-Shcherbina
Copy link
Owner

Vlad-Shcherbina commented Jul 20, 2018

  • Two tables: problems and solutions.
  • Upload problems
  • Pseudo-solver that uploads default traces
  • Utilities to run solvers and check solutions
  • Thingie to gather best solutions for each problem and produce submission.zip

I will do this because I have experience setting up the Car&Fuels prototype.

@Vlad-Shcherbina Vlad-Shcherbina self-assigned this Jul 20, 2018
@yorickvP yorickvP assigned yorickvP and unassigned yorickvP Jul 20, 2018
@kirelagin
Copy link
Collaborator

Please, make sure that it is possible to trace for any given solution which solver it came from, because, I think, it will not be uncommon to have a multitude of slightly tweaked versions of the same solver and it is good to know which ones of them are better.

@Vlad-Shcherbina
Copy link
Owner Author

Yes, I have ideas for that.

@Vlad-Shcherbina
Copy link
Owner Author

models table done.
Problems were uploaded by production/upload_lightning_problems.py script.

To view them, start the dashboard locally.

There is even "integration" with their model viewer, so you don't have to click "Choose file"!


Now working on traces table.

@Vlad-Shcherbina
Copy link
Owner Author

Solution DB done.
Start the dashboard and explore!


Now working on solver runner.

@Vlad-Shcherbina
Copy link
Owner Author

Vlad-Shcherbina commented Jul 21, 2018

Integrating new solvers

  1. Inherit from Solver class in solver_interface.py.
  2. Understand the concept of 'scent', it's explained there.
  3. Add your class to all_solvers.py.

Local development

python -m production.solver_runner <solver> [<solver args>...]

This command will run your solver on all problems. Results are printed to the screen but not uploaded to the DB. This is convenient to weed out initial bugs without polluting the DB with too much failed attempts.

Once the solver is more or less ready, move on to solver_worker.

Running solver worker

python -m production.solver_worker <solver> [<solver args>...]

It will take all your cores to run specified solver on all available tasks. Solutions and failed attempts will be saved in the DB.
Multiple people can run the same solver at the same time, tasks will be distributed more or less okay.

Troubleshooting solver_worker

Start the dashboard, find your last invocation in the /invs view, open /inv/<id> that will list all attempts by your worker, click on individual /trace/<id> links. Error messages are preserved there.

Gathering the solutions

python -m production.make_submission.py

It will grab the best solution for every problem from the DB, create zip archive and print it's SHA256.

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

No branches or pull requests

3 participants