File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ def main(args: dict):
27
27
temperature = args .pop ("temperature" )
28
28
top_p = args .pop ("top_p" )
29
29
top_k = args .pop ("top_k" )
30
+ if "enable_prompt_adapter" in args :
31
+ args .pop ("enable_prompt_adapter" )
30
32
31
33
# Create an LLM
32
34
llm = LLM (** args )
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ def main(args: dict):
27
27
temperature = args .pop ("temperature" )
28
28
top_p = args .pop ("top_p" )
29
29
top_k = args .pop ("top_k" )
30
+ if "enable_prompt_adapter" in args :
31
+ args .pop ("enable_prompt_adapter" )
30
32
31
33
# Create an LLM
32
34
llm = LLM (** args )
@@ -59,7 +61,7 @@ def main(args: dict):
59
61
print (f"Prompt: { prompt !r} \n Generated text: { generated_text !r} " )
60
62
print ("-" * 50 )
61
63
62
- os ._exit (0 )
64
+ # os._exit(0)
63
65
64
66
65
67
if __name__ == "__main__" :
@@ -68,5 +70,7 @@ def main(args: dict):
68
70
try :
69
71
main (args )
70
72
except Exception as e :
73
+ import traceback
71
74
print (f"An error occurred: { e } " )
75
+ traceback .print_exc ()
72
76
os ._exit (1 )
You can’t perform that action at this time.
0 commit comments