From e2fdedc73c00ed0ccc75cad8e1311ca89b97ea84 Mon Sep 17 00:00:00 2001 From: "yue.jiao" Date: Mon, 6 Jan 2025 15:06:01 -0800 Subject: [PATCH 01/14] fix: trigger doc build all condition --- .ci/pipeline/docs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.ci/pipeline/docs.yml b/.ci/pipeline/docs.yml index e0eb865d0a..f16a27724b 100644 --- a/.ci/pipeline/docs.yml +++ b/.ci/pipeline/docs.yml @@ -17,8 +17,7 @@ trigger: branches: include: - - main - - rls/* + - "*" paths: include: - requirements-doc.txt From aba7949da6ea559d2480a28cde7224951a19960b Mon Sep 17 00:00:00 2001 From: "yue.jiao" Date: Mon, 6 Jan 2025 21:36:47 -0800 Subject: [PATCH 02/14] test-ci-fix: try not reset daalroot in doc.yml --- .ci/pipeline/docs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.ci/pipeline/docs.yml b/.ci/pipeline/docs.yml index f16a27724b..09097766be 100644 --- a/.ci/pipeline/docs.yml +++ b/.ci/pipeline/docs.yml @@ -64,7 +64,6 @@ jobs: displayName: 'Install requirements' - script: | export PREFIX=$(dirname $(dirname $(which python))) - export DALROOT=$PREFIX ./conda-recipe/build.sh displayName: 'Build daal4py/sklearnex' - script: | From 4be9a0adabcd01c2ca54888cdd1238a8ad990452 Mon Sep 17 00:00:00 2001 From: "yue.jiao" Date: Mon, 6 Jan 2025 21:56:40 -0800 Subject: [PATCH 03/14] test-ci-fix: revert dalroot set in doc.yml --- .ci/pipeline/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/pipeline/docs.yml b/.ci/pipeline/docs.yml index 09097766be..f16a27724b 100644 --- a/.ci/pipeline/docs.yml +++ b/.ci/pipeline/docs.yml @@ -64,6 +64,7 @@ jobs: displayName: 'Install requirements' - script: | export PREFIX=$(dirname $(dirname $(which python))) + export DALROOT=$PREFIX ./conda-recipe/build.sh displayName: 'Build daal4py/sklearnex' - script: | From f979c5e5b25cdf5b458025f1843be8105f7b0711 Mon Sep 17 00:00:00 2001 From: "yue.jiao" Date: Mon, 6 Jan 2025 22:23:46 -0800 Subject: [PATCH 04/14] temp: print statements to pipline to see the sys path behavior --- .ci/pipeline/docs.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.ci/pipeline/docs.yml b/.ci/pipeline/docs.yml index f16a27724b..1ad0fc5b79 100644 --- a/.ci/pipeline/docs.yml +++ b/.ci/pipeline/docs.yml @@ -63,18 +63,37 @@ jobs: pip list displayName: 'Install requirements' - script: | + echo "Starting Build daal4py/sklearnex" + echo "Current directory1: $(pwd)" export PREFIX=$(dirname $(dirname $(which python))) - export DALROOT=$PREFIX + export e=$PREFIX ./conda-recipe/build.sh + echo "Python executable being used1: $(which python)" + echo "Current directory2: $(pwd)" + echo "PREFIX is set to1: $PREFIX" + echo "Build daal4py/sklearnex completed successfully" displayName: 'Build daal4py/sklearnex' - script: | + echo "Starting Build daal4py documentation" + echo "Current directory3: $(pwd)" export LD_LIBRARY_PATH=$(dirname $(dirname $(which python)))/lib:$LD_LIBRARY_PATH + echo "LD_LIBRARY_PATH is set to: $LD_LIBRARY_PATH" cd doc/daal4py + echo "Current directory: $(pwd)" + echo "PREFIX is set to2: $PREFIX" + python -c "import sys; print('Current sys.path1:', sys.path)" + echo "Python executable being used2: $(which python)" make html + echo "Build daal4py documentation completed successfully" displayName: 'Build daal4py documentation' - script: | + echo "Starting Build scikit-learn-intelex documentation" + echo "Current directory: $(pwd)" cd doc + python -c "import sys; print('Current sys.path2:', sys.path)" + echo "Python executable being used3: $(which python)" make html + echo "Build scikit-learn-intelex documentation completed successfully" displayName: 'Build scikit-learn-intelex documentation' - script: | mkdir $(Build.ArtifactStagingDirectory)/html/daal4py From bc0b5c2ca48e15f35a12e191f4230b4658c50a55 Mon Sep 17 00:00:00 2001 From: "yue.jiao" Date: Tue, 7 Jan 2025 20:49:48 -0800 Subject: [PATCH 05/14] fix: add sklearn and daal4py folder to sys path --- doc/sources/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sources/conf.py b/doc/sources/conf.py index cac98879ca..213e1e1dc8 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -33,7 +33,7 @@ import sys sys.path.insert(0, os.path.abspath("../")) - +sys.path.insert(0, os.path.abspath("../../")) # -- Project information ----------------------------------------------------- From 091f9d0d1765102c7ccab3d52428c19b1019bc85 Mon Sep 17 00:00:00 2001 From: "yue.jiao" Date: Tue, 7 Jan 2025 21:17:36 -0800 Subject: [PATCH 06/14] fix: revert change to conf.py --- doc/sources/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sources/conf.py b/doc/sources/conf.py index 213e1e1dc8..cac98879ca 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -33,7 +33,7 @@ import sys sys.path.insert(0, os.path.abspath("../")) -sys.path.insert(0, os.path.abspath("../../")) + # -- Project information ----------------------------------------------------- From 598b2c23f731963a7d04f90c8e6d98096c07297f Mon Sep 17 00:00:00 2001 From: "yue.jiao" Date: Tue, 7 Jan 2025 21:43:13 -0800 Subject: [PATCH 07/14] fix: confirm change needed in conf.py --- doc/sources/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/sources/conf.py b/doc/sources/conf.py index cac98879ca..0245706b4c 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -33,6 +33,7 @@ import sys sys.path.insert(0, os.path.abspath("../")) +sys.path.insert(0, os.path.abspath("../../")) # -- Project information ----------------------------------------------------- From 8a6bbdfc9626375e1b7502fceb2980fe547c7fce Mon Sep 17 00:00:00 2001 From: "yue.jiao" Date: Wed, 8 Jan 2025 17:08:06 -0800 Subject: [PATCH 08/14] fix: import daal4py and sklearn to path in conf.py for both daal4py and sklearn doc build --- doc/daal4py/conf.py | 3 ++- doc/sources/conf.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/daal4py/conf.py b/doc/daal4py/conf.py index e93b54074d..b55c8211b3 100644 --- a/doc/daal4py/conf.py +++ b/doc/daal4py/conf.py @@ -33,7 +33,8 @@ import sys sys.path.insert(0, os.path.abspath("../..")) - +sys.path.insert(0, os.path.abspath("../../daal4py")) +sys.path.insert(0, os.path.abspath("../../sklearnex")) # -- Project information ----------------------------------------------------- diff --git a/doc/sources/conf.py b/doc/sources/conf.py index 0245706b4c..b5926bac43 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -33,7 +33,8 @@ import sys sys.path.insert(0, os.path.abspath("../")) -sys.path.insert(0, os.path.abspath("../../")) +sys.path.insert(0, os.path.abspath("../../daal4py")) +sys.path.insert(0, os.path.abspath("../../sklearnex")) # -- Project information ----------------------------------------------------- From 2344410113cb0369cefe22188d1bf9675e27d3a3 Mon Sep 17 00:00:00 2001 From: "yue.jiao" Date: Wed, 8 Jan 2025 17:24:36 -0800 Subject: [PATCH 09/14] ci-print: remove useless print in doc.yml and sys.path import to avoid circular import --- .ci/pipeline/docs.yml | 17 ++--------------- doc/daal4py/conf.py | 2 -- doc/sources/conf.py | 3 --- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/.ci/pipeline/docs.yml b/.ci/pipeline/docs.yml index 1ad0fc5b79..d01d9daf4f 100644 --- a/.ci/pipeline/docs.yml +++ b/.ci/pipeline/docs.yml @@ -63,37 +63,24 @@ jobs: pip list displayName: 'Install requirements' - script: | - echo "Starting Build daal4py/sklearnex" - echo "Current directory1: $(pwd)" export PREFIX=$(dirname $(dirname $(which python))) export e=$PREFIX ./conda-recipe/build.sh echo "Python executable being used1: $(which python)" - echo "Current directory2: $(pwd)" - echo "PREFIX is set to1: $PREFIX" - echo "Build daal4py/sklearnex completed successfully" displayName: 'Build daal4py/sklearnex' - script: | - echo "Starting Build daal4py documentation" echo "Current directory3: $(pwd)" + ls -l daal4py/ + ls -l build/ export LD_LIBRARY_PATH=$(dirname $(dirname $(which python)))/lib:$LD_LIBRARY_PATH - echo "LD_LIBRARY_PATH is set to: $LD_LIBRARY_PATH" cd doc/daal4py - echo "Current directory: $(pwd)" - echo "PREFIX is set to2: $PREFIX" python -c "import sys; print('Current sys.path1:', sys.path)" - echo "Python executable being used2: $(which python)" make html - echo "Build daal4py documentation completed successfully" displayName: 'Build daal4py documentation' - script: | - echo "Starting Build scikit-learn-intelex documentation" - echo "Current directory: $(pwd)" cd doc python -c "import sys; print('Current sys.path2:', sys.path)" - echo "Python executable being used3: $(which python)" make html - echo "Build scikit-learn-intelex documentation completed successfully" displayName: 'Build scikit-learn-intelex documentation' - script: | mkdir $(Build.ArtifactStagingDirectory)/html/daal4py diff --git a/doc/daal4py/conf.py b/doc/daal4py/conf.py index b55c8211b3..c72eaa9519 100644 --- a/doc/daal4py/conf.py +++ b/doc/daal4py/conf.py @@ -33,8 +33,6 @@ import sys sys.path.insert(0, os.path.abspath("../..")) -sys.path.insert(0, os.path.abspath("../../daal4py")) -sys.path.insert(0, os.path.abspath("../../sklearnex")) # -- Project information ----------------------------------------------------- diff --git a/doc/sources/conf.py b/doc/sources/conf.py index b5926bac43..9a3993b6f7 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -33,9 +33,6 @@ import sys sys.path.insert(0, os.path.abspath("../")) -sys.path.insert(0, os.path.abspath("../../daal4py")) -sys.path.insert(0, os.path.abspath("../../sklearnex")) - # -- Project information ----------------------------------------------------- From edbcd5bd89885fbe35dd3ca4b47d72344ec30d5c Mon Sep 17 00:00:00 2001 From: "yue.jiao" Date: Thu, 9 Jan 2025 18:05:47 -0800 Subject: [PATCH 10/14] test-ci: additional print --- .ci/pipeline/docs.yml | 4 ++++ doc/sources/conf.py | 1 + 2 files changed, 5 insertions(+) diff --git a/.ci/pipeline/docs.yml b/.ci/pipeline/docs.yml index d01d9daf4f..ef9d8f679d 100644 --- a/.ci/pipeline/docs.yml +++ b/.ci/pipeline/docs.yml @@ -72,7 +72,11 @@ jobs: echo "Current directory3: $(pwd)" ls -l daal4py/ ls -l build/ + ls -l build/lib.linux-x86_64-cpython-311 + echo "Checking for shared libraries in build directory:" + find build/ -name "*.so" export LD_LIBRARY_PATH=$(dirname $(dirname $(which python)))/lib:$LD_LIBRARY_PATH + echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH" cd doc/daal4py python -c "import sys; print('Current sys.path1:', sys.path)" make html diff --git a/doc/sources/conf.py b/doc/sources/conf.py index 9a3993b6f7..32c5953fb9 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -33,6 +33,7 @@ import sys sys.path.insert(0, os.path.abspath("../")) +sys.path.insert(0, os.path.abspath("../..")) # -- Project information ----------------------------------------------------- From 02386393ae378bb93e579c6f0701a92899744bcf Mon Sep 17 00:00:00 2001 From: "yue.jiao" Date: Thu, 9 Jan 2025 20:24:12 -0800 Subject: [PATCH 11/14] fix: import build .so file --- .ci/pipeline/docs.yml | 11 +++++++++++ doc/daal4py/conf.py | 1 + 2 files changed, 12 insertions(+) diff --git a/.ci/pipeline/docs.yml b/.ci/pipeline/docs.yml index ef9d8f679d..4639ce020d 100644 --- a/.ci/pipeline/docs.yml +++ b/.ci/pipeline/docs.yml @@ -77,6 +77,17 @@ jobs: find build/ -name "*.so" export LD_LIBRARY_PATH=$(dirname $(dirname $(which python)))/lib:$LD_LIBRARY_PATH echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH" + python -c " + import sys + sys.path.insert(0, '/home/vsts/work/1/s/build/lib.linux-x86_64-cpython-311') + print('Updated sys.path:', sys.path) + try: + import daal4py + print('daal4py imported successfully') + except ImportError as e: + print('ImportError:', e) + raise + " cd doc/daal4py python -c "import sys; print('Current sys.path1:', sys.path)" make html diff --git a/doc/daal4py/conf.py b/doc/daal4py/conf.py index c72eaa9519..d6d7de52c6 100644 --- a/doc/daal4py/conf.py +++ b/doc/daal4py/conf.py @@ -33,6 +33,7 @@ import sys sys.path.insert(0, os.path.abspath("../..")) +sys.path.insert(0, os.path.abspath("../../build/lib.linux-x86_64-cpython-311")) # -- Project information ----------------------------------------------------- From 2bff139377a4dd45d92c1d6d11bdaf382ca2170c Mon Sep 17 00:00:00 2001 From: "yue.jiao" Date: Thu, 9 Jan 2025 21:10:11 -0800 Subject: [PATCH 12/14] fix: update intelex to include build dir as well --- doc/sources/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/sources/conf.py b/doc/sources/conf.py index 32c5953fb9..d1ab1f74b6 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -34,6 +34,7 @@ sys.path.insert(0, os.path.abspath("../")) sys.path.insert(0, os.path.abspath("../..")) +sys.path.insert(0, os.path.abspath("../../build/lib.linux-x86_64-cpython-311")) # -- Project information ----------------------------------------------------- From fdf20aa972d71bf54bdbcd40563c5e5ea8ad451f Mon Sep 17 00:00:00 2001 From: "yue.jiao" Date: Thu, 9 Jan 2025 21:27:46 -0800 Subject: [PATCH 13/14] fix: import build only test --- doc/daal4py/conf.py | 2 +- doc/sources/conf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/daal4py/conf.py b/doc/daal4py/conf.py index d6d7de52c6..4d61ba4327 100644 --- a/doc/daal4py/conf.py +++ b/doc/daal4py/conf.py @@ -33,7 +33,7 @@ import sys sys.path.insert(0, os.path.abspath("../..")) -sys.path.insert(0, os.path.abspath("../../build/lib.linux-x86_64-cpython-311")) +sys.path.insert(0, os.path.abspath("../../build")) # -- Project information ----------------------------------------------------- diff --git a/doc/sources/conf.py b/doc/sources/conf.py index d1ab1f74b6..4465cbc397 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -34,7 +34,7 @@ sys.path.insert(0, os.path.abspath("../")) sys.path.insert(0, os.path.abspath("../..")) -sys.path.insert(0, os.path.abspath("../../build/lib.linux-x86_64-cpython-311")) +sys.path.insert(0, os.path.abspath("../../build")) # -- Project information ----------------------------------------------------- From b910ada8832a30cb8695ae78db40d866d200c5f1 Mon Sep 17 00:00:00 2001 From: "yue.jiao" Date: Thu, 9 Jan 2025 21:53:48 -0800 Subject: [PATCH 14/14] fix: test need the lib folder --- doc/daal4py/conf.py | 2 +- doc/sources/conf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/daal4py/conf.py b/doc/daal4py/conf.py index 4d61ba4327..d6d7de52c6 100644 --- a/doc/daal4py/conf.py +++ b/doc/daal4py/conf.py @@ -33,7 +33,7 @@ import sys sys.path.insert(0, os.path.abspath("../..")) -sys.path.insert(0, os.path.abspath("../../build")) +sys.path.insert(0, os.path.abspath("../../build/lib.linux-x86_64-cpython-311")) # -- Project information ----------------------------------------------------- diff --git a/doc/sources/conf.py b/doc/sources/conf.py index 4465cbc397..d1ab1f74b6 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -34,7 +34,7 @@ sys.path.insert(0, os.path.abspath("../")) sys.path.insert(0, os.path.abspath("../..")) -sys.path.insert(0, os.path.abspath("../../build")) +sys.path.insert(0, os.path.abspath("../../build/lib.linux-x86_64-cpython-311")) # -- Project information -----------------------------------------------------