-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Hi,
I want to use Trace to build an application to let non-engineers optimized code for certain tasks. Ideally I would like to have an f-string in place of the docstring for a number of bundled functions that are methods on classes decorated by @model but of course python requires docstrings be a string literal. I'm REALLY trying to avoid resorting to a templating library for this. Currently I am trying to update the docstring of a number of bundled functions through some combination of bundled_function.description
bundled_function.info['doc']
bundled_function._fun.__doc__
but so far no matter what I do I can't see the new docstring in the parameters of either the function node or in the associated optimizers.
Do you all have a suggestion of how I could implement a templated docstring? For reference here's a SUPER minimal example of what I mean:
@bundle some_func(input_data):
f"""input_data is {data_description}.
You need to {task_description}.
Make sure you don't {caveats_description}.
"""
pass