Unverified Commit 28da51a4 authored by Yuge Zhang's avatar Yuge Zhang Committed by GitHub
Browse files

Fix import error in Lightning (#5155)

parent ec5f3e63
# Copyright (c) Microsoft Corporation. # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license. # Licensed under the MIT license.
from .lightning import * import warnings
try:
from .lightning import *
except ImportError:
warnings.warn("PyTorch-Lightning must be installed to use PyTorch in NAS. "
"If you are not using PyTorch, please `nni.set_default_framework('none')`")
raise
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment