Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,34 @@ ln -s $SCRATCH/evalenv/output output
This way data will be written to your scratch, but you will still be able to browse it with your IDE.

If you are using VSCode, we advise that you install the YAML extension, which will enable config validation, autocompletion, hovering support, and more.

## Debugging

Starting an IPython session in the middle of a python script can be useful for debugging
purposes. You can do so by adding a line to launch IPython at the specific point where
you want to initiate the debugging session.

You only need to insert the `embed()` function call at the location where you want
the IPython session to start. This will pause the script execution and launch an IPython
shell. Here's a simple example to illustrate this:

def calculate_something(a, b):
result = a + b
# Launch IPython at this point
from IPython import embed; embed()
return result

if __name__ == "__main__":
x = 10
y = 20
print("Before calculation")
sum_result = calculate_something(x, y)
print(f"After calculation: {sum_result}")

In this example, once the script reaches the `embed()` line, an interactive IPython
session will open. In this session, you can inspect variables, test expressions, or
even modify variables before proceeding. To continue script execution, simply exit the
IPython session by typing exit.

Warning: This is a debugging technique: remember to remove it or comment it out once
you've resolved the issue you're investigating.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ build-backend = "hatchling.build"

[dependency-groups]
dev = [
"ipython>=9.6.0",
"pre-commit>=4.2.0",
"snakefmt>=0.11.0",
]
Expand All @@ -50,4 +51,4 @@ markers = [
packages = [
"src/evalml",
"src/verification"
]
]
Loading