Skip to content

Commit

Permalink
Adds caveats section to hamilton documentation
Browse files Browse the repository at this point in the history
Currently there's just a note about postponed evaluation of annotations,
but we can add more here over time. This is meant to be specific API
reference stuff that doesn't really fit elsewhere.
  • Loading branch information
elijahbenizzy committed Mar 4, 2023
1 parent e0de334 commit 9a3991f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/reference/api-reference/caveats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Caveats

## Delayed evaluation of annotation

Hamilton works with [PEP-563](https://peps.python.org/pep-0563/), postponed evaluation of annotations.
That said, it *does* force evaluation of type-hints when building the function graph. So, if you're using
particularly complex/slow to load python types and expecting delay, know that they will have to be evaluted
when the driver is instantiated and modules are passed, so Hamilton can inspect the types and build the
function graph.
3 changes: 3 additions & 0 deletions docs/reference/api-reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ API Reference
graph-adapters
drivers
disabling-telemetry
caveats

Here lies documentation for the public API you can build on top of.

Expand All @@ -23,3 +24,5 @@ See :doc:`graph-adapters` for ways to execute Hamilton.
See :doc:`drivers` for how to call and instantiate a Hamilton dataflow. Right now there are only two!

See :doc:`disabling-telemetry` for how to disable telemetry.

See :doc:`caveats` for implementation details/design decisions that may impact your use of Hamilton.

0 comments on commit 9a3991f

Please sign in to comment.