Skip to content

Commit

Permalink
adds a code block demonstrating decorator pattern (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesfrye authored Oct 3, 2024
1 parent 52ab279 commit 356c0bb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion 06_gpu_and_ml/long-training.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,15 @@ def train(experiment):

# Note that the more common way to wrap functions
# is by putting `@app.function` as a decorator on the function's definition,
# but we've split the two steps out in this example to make the separation of concerns clearer.
# like this:

# ```python
# @app.function(...)
# def train(...):
# ...
# ```

# but we've split the two steps out in this example to make the separation of concerns clearer.

# ## Kicking off interruptible training

Expand Down

0 comments on commit 356c0bb

Please sign in to comment.