diff --git a/imperative/python/megengine/experimental/__init__.py b/imperative/python/megengine/experimental/__init__.py index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0253e7dcabee24c3271d1d8b14c8f75a2e15596d 100644 --- a/imperative/python/megengine/experimental/__init__.py +++ b/imperative/python/megengine/experimental/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +# MegEngine is Licensed under the Apache License, Version 2.0 (the "License") +# +# Copyright (c) 2014-2021 Megvii Inc. All rights reserved. +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/imperative/python/megengine/functional/nn.py b/imperative/python/megengine/functional/nn.py index 663d7fa5535f9027bf905d30dac94f89c153f1ff..ffe7b7c7f2e95da1ccc144d1d9cf90c94d5ba344 100644 --- a/imperative/python/megengine/functional/nn.py +++ b/imperative/python/megengine/functional/nn.py @@ -1462,6 +1462,5 @@ warp_affine = deprecated_func("1.3", "megengine.functional.vision", "warp_affine warp_perspective = deprecated_func( "1.3", "megengine.functional.vision", "warp_perspective", True ) - -from .loss import * # isort:skip from .quantized import conv_bias_activation # isort:skip +from .loss import * # isort:skip diff --git a/imperative/python/scripts/format.sh b/imperative/python/scripts/format.sh new file mode 100755 index 0000000000000000000000000000000000000000..022206559608f30552ced18c7ac284b2b1dfc326 --- /dev/null +++ b/imperative/python/scripts/format.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -e +cd $(dirname $0)/.. + +ISORT_ARG="" +BLACK_ARG="" + +while getopts 'd' OPT; do + case $OPT in + d) + ISORT_ARG="--diff --check-only" + BLACK_ARG="--diff --check" + ;; + ?) + echo "Usage: `basename $0` [-d]" + esac +done + +# do not isort megengine/__init__.py file, caused we must +# init library load path before load dependent lib in core +isort $ISORT_ARG -j $(nproc) -rc megengine test examples -s megengine/__init__.py +black $BLACK_ARG --target-version=py35 -- megengine test examples