Change to use relative imports in some files & Add python prompt symbols to example codes (#7202)
* Move 'from transformers' statements to relative imports in some files * Add python prompt symbols in front of the example codes * Reformat the code * Add one missing space Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
This commit is contained in:
@@ -60,7 +60,7 @@ _use_apex = False
|
||||
|
||||
# Check if Pytorch version >= 1.6 to switch between Native AMP and Apex
|
||||
if version.parse(torch.__version__) < version.parse("1.6"):
|
||||
from transformers.file_utils import is_apex_available
|
||||
from .file_utils import is_apex_available
|
||||
|
||||
if is_apex_available():
|
||||
from apex import amp
|
||||
|
||||
Reference in New Issue
Block a user