Update howto_torch2zml docs to explain why the output variable can be None.
This commit is contained in:
parent
fab1c93d5b
commit
04ad137417
@ -90,6 +90,10 @@ prompt = "Q: What is the largest animal?\nA:"
|
||||
# so let's stop collecting after 1000 layers.
|
||||
pipeline = zml_utils.ActivationCollector(pipeline, max_layers=1000, stop_after_first_step=True)
|
||||
output, activations = pipeline(prompt)
|
||||
|
||||
# `output` can be `None` if activations collection
|
||||
# has stopped before the end of the inference
|
||||
if output:
|
||||
print(output)
|
||||
|
||||
# Save activations to a file.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user