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:
Sohee Yang
2020-09-18 01:30:45 +09:00
committed by GitHub
parent 0fe6e435b6
commit e643a29722
20 changed files with 267 additions and 270 deletions

View File

@@ -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