Dynamic load LLM python framework
huangyz0918 opened this issue · comments
Yizheng Huang commented
Check if the package has been installed or not, if yes then import, if not, give an warning and return.
Reference code:
wandb_spec = importlib.util.find_spec("wandb")
if wandb_spec is not None:
import wandb
else:
warnings.warn(
"It seems you didn't install wandb. In order to enable the Weights & Biases related features, "
"please make sure wandb Python package has been installed. "
"More information, please refer to: https://docs.wandb.ai/quickstart"
)