You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2020/01/29 00:30:05 UTC

[incubator-mxnet] branch v1.6.x updated: Cherry pick license fixes for 1.6 (#17460)

This is an automated email from the ASF dual-hosted git repository.

zhasheng pushed a commit to branch v1.6.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/v1.6.x by this push:
     new 6eec9da  Cherry pick license fixes for 1.6 (#17460)
6eec9da is described below

commit 6eec9da55c5096079355d1f1a5fa58dcf35d6752
Author: Lai Wei <ro...@gmail.com>
AuthorDate: Tue Jan 28 16:29:03 2020 -0800

    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 <ro...@gmail.com>
    
    * add disclaimer (#17428)
    
    * add disclaimer
    
    * add white list
    
    * fix exclude
    
    * remove disclaimer
    
    * update tools/pip
    
    Co-authored-by: Haibin Lin <li...@gmail.com>
---
 DISCLAIMER                                         |  12 --
 DISCLAIMER-WIP                                     |  24 ++++
 LICENSE                                            |  18 ++-
 NOTICE                                             |   2 +-
 ci/docker/runtime_functions.sh                     |   2 +-
 .../predict-cpp/image-classification-predict.cc    |  23 ++--
 src/operator/numpy/np_einsum_op-inl.h              |  23 +---
 .../nightly/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(-)

diff --git a/DISCLAIMER b/DISCLAIMER
deleted file mode 100644
index 8adc57f..0000000
--- 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 0000000..124e005
--- /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 86dc1db..e190c18 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 (<as...@yahoo.com>)
-
+    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 <http://unlicense.org>
 
+    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 <https://github.com/FortAwesome/Font-Awesome/blob/master/LICENSE.txt>
+
+    For full text of the SIL Open Font License, refer to <https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL>
 
     =======================================================================================
     Appendix
diff --git a/NOTICE b/NOTICE
index ecc58f6..6cd2917 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 745214a..fcea6c1 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 3c72589..46d091e 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 d2f399b..551b718 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 cc0001f..ecf25e2 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 4465cd8..0000000
--- 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 <options> 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="
-      <failure type=\"ScriptError\" message=\"Script Error\"></failure>
-  "
-  ## testcase tag
-  content="$content
-    <testcase assertions=\"1\" name=\"$name\" time=\"$time\">
-    $failure
-    <system-out>
-<![CDATA[
-$out
-]]>
-    </system-out>
-    </testcase>
-  "
-  ## testsuite block
-  cat <<EOF > "$juDIR/TEST-$suite.xml"
-  <testsuite failures="0" assertions="$assertions" name="$suite" tests="1" errors="$errors" time="$total">
-    $content
-  </testsuite>
-EOF
-
-  return $evErr
-}
diff --git a/tests/nightly/test_all.sh b/tests/nightly/test_all.sh
deleted file mode 100755
index 73f0f58..0000000
--- 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 <<EOF
-USE_CUDA=1
-USE_CUDA_PATH=/usr/local/cuda
-USE_CUDNN=1
-USE_DIST_KVSTORE=1
-EOF
-
-juLog -name=Build -error=Error build
-
-# python: local kvstore
-juLog -name=Python.Local.KVStore -error=Error python test_kvstore.py
-
-# python: distributed kvstore
-juLog -name=Python.Distributed.KVStore -error=Error ../../tools/launch.py -n 4 python dist_sync_kvstore.py
-
-# download data
-juLog -name=DownloadData bash ./download.sh
-
-
-# check if the final evaluation accuracy exceed the threshold
-check_val() {
-    expected=$1
-    pass="Final validation >= $expected, Pass"
-    fail="Final validation < $expected, Fail"
-    python ../../tools/parse_log.py log --format none | tail -n1 | \
-        awk "{ if (\$3~/^[.0-9]+$/ && \$3 > $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 <<EOF
-USE_CUDNN=0
-EOF
-juLog -name=BuildWithoutCUDNN -error=Error build
-
-# python: multi gpus lenet + mnist
-juLog -name=Python.Multi.Lenet.Mnist -error=Error python multi_lenet.py
-
-# python: large tensor
-juLog -name=Python.LargeTensor -error=Fail python test_large_array.py
-
-exit $errors
diff --git a/tools/license_header.py b/tools/license_header.py
index 668a74b..654316b 100755
--- a/tools/license_header.py
+++ b/tools/license_header.py
@@ -99,12 +99,16 @@ _WHITE_LIST = [
                'docs/_static/js/clipboard.min.js',
                'docs/static_site/src/assets/js/clipboard.js',
                'cmake/Modules/FindCUDAToolkit.cmake',
+               'src/operator/numpy/np_einsum_op-inl.h',
 
                # Licensed under 2-Clause BSD in header
                'example/ssd/dataset/pycocotools/coco.py',
 
                # Julia package metadata, generated by Pkg3.jl
                'julia/Project.toml',
+               
+               # Licensed under Apache 2.0 license
+               'example/image-classification/predict-cpp/image-classification-predict.cc'
                ]
 
 # language extensions and the according commment mark
diff --git a/tools/pip/MANIFEST.in b/tools/pip/MANIFEST.in
index dd48098..0b042e3 100644
--- a/tools/pip/MANIFEST.in
+++ b/tools/pip/MANIFEST.in
@@ -17,7 +17,7 @@
 
 include README
 include LICENSE
-include DISCLAIMER
+include DISCLAIMER-WIP
 include NOTICE
 include mxnet/COMMIT_HASH
 recursive-include mxnet/tools *
diff --git a/tools/staticbuild/build.sh b/tools/staticbuild/build.sh
index 7207cf0..c6aa22b 100755
--- a/tools/staticbuild/build.sh
+++ b/tools/staticbuild/build.sh
@@ -69,7 +69,7 @@ mkdir -p licenses
 cp tools/dependencies/LICENSE.binary.dependencies licenses/
 cp NOTICE licenses/
 cp LICENSE licenses/
-cp DISCLAIMER licenses/
+cp DISCLAIMER-WIP licenses/
 
 
 # Build mxnet