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

[RFC] calling ramp-test as python <file>.py so debugger can be used #183

Closed
kegl opened this issue Mar 8, 2019 · 10 comments
Closed

[RFC] calling ramp-test as python <file>.py so debugger can be used #183

kegl opened this issue Mar 8, 2019 · 10 comments

Comments

@kegl
Copy link
Contributor

kegl commented Mar 8, 2019

No description provided.

@kegl
Copy link
Contributor Author

kegl commented Mar 8, 2019

In a python prompt you can do

from rampwf.utils.testing import assert_submission

then

assert_submission()

if you are in a valid RAMP kit. If you want to test another submission, do

assert_submission(submission='<submission_name>')

For the rest, see the signature of assert submission.

@jorisvandenbossche
Copy link
Member

Sort of related to #159

@kegl
Copy link
Contributor Author

kegl commented Mar 8, 2019

I added this remark to the wiki: https://github.com/paris-saclay-cds/ramp-workflow/wiki/Getting-started-with-a-ramp-kit#test-the-execution

@jorisvandenbossche
Copy link
Member

BTW, for me adding a breakpoint in a submission and calling ramp_test_submission goes into the debugger.

@kegl kegl changed the title calling ramp-test as python <file>.py so debugger can be used [RFC] calling ramp-test as python <file>.py so debugger can be used Mar 12, 2019
@kegl
Copy link
Contributor Author

kegl commented Mar 12, 2019

Also discussed in #131

@albertcthomas
Copy link
Collaborator

BTW, for me adding a breakpoint in a submission and calling ramp_test_submission goes into the debugger.

thanks for the tip @jorisvandenbossche

@glemaitre
Copy link
Contributor

Now you can use directly cross_validate from scikit-learn

@albertcthomas
Copy link
Collaborator

Thanks @glemaitre! Is there an example somewhere?

@glemaitre
Copy link
Contributor

glemaitre commented Feb 28, 2020 via email

@albertcthomas
Copy link
Collaborator

Another solution that I didn't test: calling python -i $(which ramp-test) and then import pdb; pdb.pm(), see https://til.simonwillison.net/til/til/python_debug-click-with-pdb.md. A better one would be to have a --pdb option. I can give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants