From 6eec9da55c5096079355d1f1a5fa58dcf35d6752 Mon Sep 17 00:00:00 2001 From: Lai Wei Date: Tue, 28 Jan 2020 16:29:03 -0800 Subject: [PATCH] Cherry pick license fixes for 1.6 (#17460) * Update NOTICE to fix copyright years (#17330) * Update LICENSE for fonts (#17365) * license np_einsum file under bsd (#17367) * license under bsd * fix rat exclude * remove unused file with license issue (#17371) * [LICENSE] fix cpp predcit license (#17377) * fix cpp predcit license * add white list (#210) * fix white list (#211) Co-authored-by: Lai Wei * add disclaimer (#17428) * add disclaimer * add white list * fix exclude * remove disclaimer * update tools/pip Co-authored-by: Haibin Lin --- DISCLAIMER | 12 -- DISCLAIMER-WIP | 24 +++ LICENSE | 18 ++- NOTICE | 2 +- ci/docker/runtime_functions.sh | 2 +- .../image-classification-predict.cc | 23 ++- src/operator/numpy/np_einsum_op-inl.h | 23 +-- .../apache_rat_license_check/rat-excludes | 3 + tests/nightly/sh2ju.sh | 149 ------------------ tests/nightly/test_all.sh | 128 --------------- tools/license_header.py | 4 + tools/pip/MANIFEST.in | 2 +- tools/staticbuild/build.sh | 2 +- 13 files changed, 63 insertions(+), 329 deletions(-) delete mode 100644 DISCLAIMER create mode 100644 DISCLAIMER-WIP delete mode 100644 tests/nightly/sh2ju.sh delete mode 100755 tests/nightly/test_all.sh diff --git a/DISCLAIMER b/DISCLAIMER deleted file mode 100644 index 8adc57f6e6b0..000000000000 --- a/DISCLAIMER +++ /dev/null @@ -1,12 +0,0 @@ -Apache MXNet (incubating) is an effort undergoing incubation at The -Apache Software Foundation (ASF), sponsored by the Apache Incubator PMC. - -Incubation is required of all newly accepted -projects until a further review indicates that the -infrastructure, communications, and decision making process have -stabilized in a manner consistent with other successful ASF -projects. - -While incubation status is not necessarily a reflection -of the completeness or stability of the code, it does indicate -that the project has yet to be fully endorsed by the ASF. diff --git a/DISCLAIMER-WIP b/DISCLAIMER-WIP new file mode 100644 index 000000000000..124e00574ac7 --- /dev/null +++ b/DISCLAIMER-WIP @@ -0,0 +1,24 @@ +Apache MXNet is an effort undergoing incubation at +The Apache Software Foundation (ASF), sponsored by the name of Apache Incubator PMC. + +Incubation is required of all newly accepted projects until a further review +indicates that the infrastructure, communications, and decision making process +have stabilized in a manner consistent with other successful ASF projects. + +While incubation status is not necessarily a reflection of the completeness +or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF policy. +For example, releases may have incomplete or un-reviewed licensing conditions. +What follows is a list of known issues the project is currently aware of +(note that this list, by definition, is likely to be incomplete): + +1. https://github.com/apache/incubator-mxnet/issues/17329 +2. https://github.com/apache/incubator-mxnet/issues/15547 +3. https://github.com/apache/incubator-mxnet/issues/15569 + +If you are planning to incorporate this work into your product/project, +please be aware that you will need to conduct a thorough licensing review +to determine the overall implications of including this work. +For the current status of this project through the Apache Incubator visit: +https://incubator.apache.org/projects/mxnet.html \ No newline at end of file diff --git a/LICENSE b/LICENSE index 86dc1db15912..e190c1890644 100644 --- a/LICENSE +++ b/LICENSE @@ -279,7 +279,8 @@ Copyright (c) 2009-2018 The MathJax Consortium Copyright (c) 2015-2017 Martin Hensel Copyright (c) 2007, Apostolos Syropoulos () - + 28. material-design-icons - For details, see ./docs/python_docs/themes/mx-theme/mxtheme/static/material-design-icons-3.0.1/iconfont/ + 29. Roboto fonts - For details, see ./docs/python_docs/themes/mx-theme/mxtheme/static/font/Roboto/ ======================================================================================= MIT licenses @@ -334,9 +335,11 @@ cmake/Modules/FindCUDAToolkit.cmake 3rdparty/mkldnn/cmake/FindOpenCL.cmake Copyright 2000-2019 Kitware, Inc. and Contributors - 10 ittnotify - For details, see, 3rdparty/mkldnn/src/cpu/jit_utils/jitprofiling/ + 10. ittnotify - For details, see, 3rdparty/mkldnn/src/cpu/jit_utils/jitprofiling/ Copyright (c) 2011, Intel Corporation - + 11. Numpy einsum operator - For details, see src/operator/numpy/np_einsum_op-inl.h + Copyright (c) 2005-2019, NumPy Developers. + Copyright (c) 2019, The Apache Software Foundation. ======================================================================================= 2-clause BSD licenses @@ -940,6 +943,15 @@ For more information, please refer to + 20. Font-Awesome, SIL Open Font License(OFL) + + For details, see ./docs/python_docs/themes/mx-theme/mxtheme/static/webfonts/ + + In the Font Awesome Free download, the SIL OFL license applies to all icons packaged as web and desktop font files. + + For more information, please refer to + + For full text of the SIL Open Font License, refer to ======================================================================================= Appendix diff --git a/NOTICE b/NOTICE index ecc58f6a2922..6cd2917c2d6f 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Apache MXNET (incubating) - Copyright 2017 and onwards The Apache Software Foundation + Copyright 2017-2020 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index 745214af2eea..fcea6c19e36c 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -152,7 +152,7 @@ gather_licenses() { cp tools/dependencies/LICENSE.binary.dependencies licenses/ cp NOTICE licenses/ cp LICENSE licenses/ - cp DISCLAIMER licenses/ + cp DISCLAIMER-WIP licenses/ } build_ubuntu_cpu_release() { diff --git a/example/image-classification/predict-cpp/image-classification-predict.cc b/example/image-classification/predict-cpp/image-classification-predict.cc index 3c72589399ba..46d091e14242 100644 --- a/example/image-classification/predict-cpp/image-classification-predict.cc +++ b/example/image-classification/predict-cpp/image-classification-predict.cc @@ -1,20 +1,15 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /*! diff --git a/src/operator/numpy/np_einsum_op-inl.h b/src/operator/numpy/np_einsum_op-inl.h index d2f399b2533d..551b7189822a 100644 --- a/src/operator/numpy/np_einsum_op-inl.h +++ b/src/operator/numpy/np_einsum_op-inl.h @@ -1,24 +1,7 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - /* * Copyright (c) 2005-2019, NumPy Developers. + * Copyright (c) 2019, The Apache Software Foundation. + * * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,6 +36,8 @@ /*! * \file np_einsum_op-inl.h * \brief Function definition of numpy-compatible einsum operator + * modified by Haozheng Fan(@hzfan) from: + * https://github.com/numpy/numpy/blob/master/numpy/core/src/multiarray/einsum.c.src */ #ifndef MXNET_OPERATOR_NUMPY_NP_EINSUM_OP_INL_H_ diff --git a/tests/nightly/apache_rat_license_check/rat-excludes b/tests/nightly/apache_rat_license_check/rat-excludes index cc0001fd92d7..ecf25e269c18 100755 --- a/tests/nightly/apache_rat_license_check/rat-excludes +++ b/tests/nightly/apache_rat_license_check/rat-excludes @@ -76,3 +76,6 @@ searchtools_custom.js theme.conf LICENSE.binary.dependencies cmake/Modules/FindCUDAToolkit.cmake +image-classification-predict.cc +np_einsum_op-inl.h +DISCLAIMER-WIP diff --git a/tests/nightly/sh2ju.sh b/tests/nightly/sh2ju.sh deleted file mode 100644 index 4465cd8f843f..000000000000 --- a/tests/nightly/sh2ju.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -### Copyright 2010 Manuel Carrasco Moñino. (manolo at apache.org) -### -### Licensed under the Apache License, Version 2.0. -### You may obtain a copy of it at -### http://www.apache.org/licenses/LICENSE-2.0 - -### -### A library for shell scripts which creates reports in jUnit format. -### These reports can be used in Jenkins, or any other CI. -### -### Usage: -### - Include this file in your shell script -### - Use juLog to call your command any time you want to produce a new report -### Usage: juLog command arguments -### options: -### -name="TestName" : the test name which will be shown in the junit report -### -error="RegExp" : a regexp which sets the test as failure when the output matches it -### -ierror="RegExp" : same as -error but case insensitive -### - Junit reports are left in the folder 'result' under the directory where the script is executed. -### - Configure Jenkins to parse junit files from the generated folder -### - -asserts=00; errors=0; total=0; content="" -date=`which gdate || which date` - -# create output folder -juDIR=`pwd`/results -mkdir -p "$juDIR" || exit - -# The name of the suite is calculated based in your script name -suite=`basename $0 | sed -e 's/.sh$//' | tr "." "_"` - -# A wrapper for the eval method witch allows catching seg-faults and use tee -errfile=/tmp/evErr.$$.log -eVal() { - eval "$1" - echo $? | tr -d "\n" >$errfile -} - -# Method to clean old tests -juLogClean() { - echo "+++ Removing old junit reports from: $juDIR " - rm -f "$juDIR"/TEST-* -} - -# Execute a command and record its results -juLog() { - - # parse arguments - ya=""; icase="" - while [ -z "$ya" ]; do - case "$1" in - -name=*) name=$asserts-`echo "$1" | sed -e 's/-name=//'`; shift;; - -ierror=*) ereg=`echo "$1" | sed -e 's/-ierror=//'`; icase="-i"; shift;; - -error=*) ereg=`echo "$1" | sed -e 's/-error=//'`; shift;; - *) ya=1;; - esac - done - - # use first arg as name if it was not given - if [ -z "$name" ]; then - name="$asserts-$1" - shift - fi - - # calculate command to eval - [ -z "$1" ] && return - cmd="$1"; shift - while [ -n "$1" ] - do - cmd="$cmd \"$1\"" - shift - done - - # eval the command sending output to a file - outf=/var/tmp/ju$$.txt - >$outf - echo "" | tee -a $outf - echo "+++ Running case: $name " | tee -a $outf - echo "+++ working dir: "`pwd` | tee -a $outf - echo "+++ command: $cmd" | tee -a $outf - ini=`$date +%s.%N` - eVal "$cmd" 2>&1 | tee -a $outf - evErr=`cat $errfile` - rm -f $errfile - end=`date +%s.%N` - echo "+++ exit code: $evErr" | tee -a $outf - - # set the appropriate error, based in the exit code and the regex - [ $evErr != 0 ] && err=1 || err=0 - out=`cat $outf | sed -e 's/^\([^+]\)/| \1/g'` - if [ $err = 0 -a -n "$ereg" ]; then - H=`echo "$out" | egrep $icase "$ereg"` - [ -n "$H" ] && err=1 - fi - echo "+++ error: $err" | tee -a $outf - rm -f $outf - - # calculate vars - asserts=`expr $asserts + 1` - asserts=`printf "%.2d" $asserts` - errors=`expr $errors + $err` - time=`echo "$end - $ini" | bc -l` - total=`echo "$total + $time" | bc -l` - - # write the junit xml report - ## failure tag - [ $err = 0 ] && failure="" || failure=" - - " - ## testcase tag - content="$content - - $failure - - - - - " - ## testsuite block - cat < "$juDIR/TEST-$suite.xml" - - $content - -EOF - - return $evErr -} diff --git a/tests/nightly/test_all.sh b/tests/nightly/test_all.sh deleted file mode 100755 index 73f0f588fe90..000000000000 --- a/tests/nightly/test_all.sh +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - - -# setup -export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH -cd `pwd`/`dirname $0` -. sh2ju.sh -## clean last build log -juLogClean -if [ $# -eq 1 ]; then - num_gpus=$1 -else - num_gpus=4 -fi -gpus=`seq 0 $((num_gpus-1)) | paste -sd ","` - -# build -build() { -make -C ../.. clean -make -C ../.. -j8 -return $? -} - -cp ../../make/config.mk ../.. -cat >>../../config.mk < $expected) print \"$pass\"; else print \"$fail\"}" - rm -f log -} - - -example_dir=../../example/image-classification -# python: lenet + mnist -test_lenet() { - optimizers="adam sgd adagrad" - for optimizer in ${optimizers}; do - echo "OPTIMIZER: $optimizer" - if [ "$optimizer" == "adam" ]; then - learning_rate=0.0005 - desired_accuracy=0.98 - else - learning_rate=0.01 - desired_accuracy=0.99 - fi - python $example_dir/train_mnist.py --lr $learning_rate \ - --network lenet --optimizer $optimizer --gpus $gpus \ - --num-epochs 10 2>&1 | tee log - if [ $? -ne 0 ]; then - return $? - fi - check_val $desired_accuracy - done -} -juLog -name=Python.Lenet.Mnist -error=Fail test_lenet - -# python: distributed lenet + mnist -test_dist_lenet() { - ../../tools/launch.py -n ${num_gpus} \ - python ./dist_lenet.py --data-dir `pwd`/data/mnist/ \ - --kv-store dist_sync \ - --num-epochs 10 \ - 2>&1 | tee log - check_val 0.98 -} -juLog -name=Python.Distributed.Lenet.Mnist -error=Fail test_dist_lenet - -# python: inception + cifar10 -test_inception_cifar10() { - python $example_dir/train_cifar10.py \ - --data-dir `pwd`/data/cifar10/ --gpus $gpus --num-epochs 20 --batch-size 256 \ - 2>&1 | tee log - check_val 0.82 -} -juLog -name=Python.Inception.Cifar10 -error=Fail test_inception_cifar10 - -# build without CUDNN -cat >>../../config.mk <