mlc-ai / mlc-llm

Universal LLM Deployment Engine with ML Compilation
https://llm.mlc.ai/
Apache License 2.0
19.23k stars 1.58k forks source link

[Python] Skip termination when engine is not initialized #3040

Closed MasterJH5574 closed 21 hours ago

MasterJH5574 commented 21 hours ago

This PR skips the MLCEngine termination when the engine is not initialized at all (e.g., failed during JIT compilation). Previously there will be an extra error message saying 'MLCEngine' object has no attribute '_ffi' which is confusing and misleading. Skipping the termination can eliminate this error message.