truss icon indicating copy to clipboard operation
truss copied to clipboard

Truss handle should reflect changes made to truss after it was created

Open pankajroark opened this issue 2 years ago • 4 comments

Typical flow is like this:

handle = mk_truss(model, target_directory='some_dir')
# Make changes to truss, like modify `model.py`
# Recreate handle to load changes
handle = from_directory('some_dir')

That last step should is easy to forget and should not be needed. It will be great if the handle automatically reflects changes tot he underlying truss.

pankajroark avatar Nov 15 '22 23:11 pankajroark

In my experience, modifying model.py and re-runing handle.predict works with the now code withouth needing to call truss.load("...").

Is there something else that we want to make sure if reflected (maybe configs? requirements?)

bolasim avatar Feb 14 '23 21:02 bolasim

When we create the truss handle we also create the truss_spec, which reads in the config. This config in truss_handle would go out of sync when the config.yaml is modified on disk. We'd need to orchestrate things, so that there's some kind of revalidation/reload when any truss_handle methods are called.

pankajroark avatar Feb 14 '23 22:02 pankajroark

Ah interesting. Do we have to run a kind of filewatcher, like FastAPI does for fast reload?

bolasim avatar Feb 24 '23 11:02 bolasim

Do we still need this as we move to a more cli focused flow, over a notebook focused flow?

bolasim avatar Jun 27 '23 12:06 bolasim