Skip to content

Commit 1a93cc6

Browse files
committed
use uv tool to isolate cicd env
Signed-off-by: guotongIntel <[email protected]>
1 parent b817a0d commit 1a93cc6

File tree

7 files changed

+48
-19
lines changed

7 files changed

+48
-19
lines changed

AI-and-Analytics/End-to-end-Workloads/JobRecommendationSystem/JobRecommendationSystem.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,7 @@
904904
"metadata": {},
905905
"outputs": [],
906906
"source": [
907+
"import numpy as np\n",
907908
"import intel_extension_for_tensorflow as itex\n",
908909
"\n",
909910
"itex.experimental_ops_override()"

AI-and-Analytics/End-to-end-Workloads/JobRecommendationSystem/JobRecommendationSystem.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ def lemmatize_text(text):
428428
# Now, let us import Intel Extension for TensorFlow*. We are using Python API `itex.experimental_ops_override()`. It automatically replace some TensorFlow operators by Custom Operators under `itex.ops` namespace, as well as to be compatible with existing trained parameters.
429429

430430
# %%
431+
import numpy as np
431432
import intel_extension_for_tensorflow as itex
432433

433434
itex.experimental_ops_override()

AI-and-Analytics/End-to-end-Workloads/JobRecommendationSystem/sample.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@
1515
"id": "JobRecommendationSystem_py",
1616
"steps": [
1717
"source /intel/oneapi/intelpython/bin/activate",
18-
"conda env remove -n user_tensorflow-gpu",
19-
"conda create --name user_tensorflow-gpu --clone tensorflow-gpu",
20-
"conda activate user_tensorflow-gpu",
21-
"pip install -r requirements.txt",
22-
"python -m ipykernel install --user --name=user_tensorflow-gpu",
23-
"python JobRecommendationSystem.py"
18+
"conda activate tensorflow-gpu",
19+
"pip install uv",
20+
"uv init",
21+
"uv python pin $(which python)",
22+
"uv venv --system-site-packages",
23+
"uv add -r requirements.txt",
24+
"uv add seaborn",
25+
"uv add numpy==1.26.4",
26+
"uv run python -m spacy download en_core_web_sm",
27+
"uv run python JobRecommendationSystem.py"
2428
]
2529
}
2630
]

AI-and-Analytics/Getting-Started-Samples/INC-Sample-for-Tensorflow/sample.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,17 @@
1313
{
1414
"env": ["source /intel/oneapi/intelpython/bin/activate",
1515
"conda activate tensorflow",
16-
"conda install -n tensorflow -c conda-forge python-flatbuffers -y",
17-
"conda install -n tensorflow -c https://software.repos.intel.com/python/conda/ -c conda-forge neural-compressor -y",
18-
"conda install -n tensorflow -y",
19-
"pip install jupyter ipykernel",
20-
"python -m ipykernel install --user --name=tensorflow"
16+
"pip install uv",
17+
"uv init",
18+
"uv python pin $(which python)",
19+
"uv venv --system-site-packages",
20+
"uv add -r requirements.txt",
21+
"uv add flatbuffers",
22+
"uv add neural-compressor",
23+
"pip install notebook",
24+
"uv add --dev ipykernel",
25+
"uv run ipython kernel install --user --name tensorflow"
26+
2127
],
2228
"id": "neural-compressor tensorflow",
2329
"steps": [

AI-and-Analytics/Getting-Started-Samples/IntelPython_XGBoost_GettingStarted/sample.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@
1515
"env": [
1616
"source /intel/oneapi/intelpython/bin/activate",
1717
"conda activate base",
18-
"pip install -r requirements.txt"
18+
"pip install uv",
19+
"uv init",
20+
"uv python pin $(which python)",
21+
"uv venv --system-site-packages",
22+
"uv add -r requirements.txt"
1923
],
2024
"id": "IDP_XGBoost_GS_py",
2125
"steps": [
22-
"python IntelPython_XGBoost_GettingStarted.py"
26+
"uv run python IntelPython_XGBoost_GettingStarted.py"
2327
]
2428
}]
2529
},

AI-and-Analytics/Getting-Started-Samples/Intel_Extension_For_SKLearn_GettingStarted/sample.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@
1515
"env": [
1616
"source /intel/oneapi/intelpython/bin/activate",
1717
"conda activate base",
18-
"pip install -r requirements.txt"
18+
"pip install uv",
19+
"uv init",
20+
"uv python pin $(which python)",
21+
"uv venv --system-site-packages",
22+
"uv add -r requirements.txt",
23+
"uv add numpy==1.26.4"
1924
],
2025
"id": "idp_sklex_gs_py",
2126
"steps": [
22-
"python Intel_Extension_For_SKLearn_GettingStarted.py"
27+
"uv run python Intel_Extension_For_SKLearn_GettingStarted.py"
2328
]
2429
}]
2530
},

AI-and-Analytics/Getting-Started-Samples/Modin_GettingStarted/sample.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@
1010
"ciTests": {
1111
"linux": [
1212
{
13-
"env": [],
13+
"env": [
14+
"source /intel/oneapi/intelpython/bin/activate",
15+
"conda activate modin",
16+
"pip install uv",
17+
"uv init",
18+
"uv python pin $(which python)",
19+
"uv venv --system-site-packages",
20+
"uv add -r requirements.txt",
21+
"pip install notebook",
22+
"uv add --dev ipykernel",
23+
"uv run ipython kernel install --user --name modin_getting_started"
24+
],
1425
"id": "Intel_Modin_GS_py",
1526
"steps": [
16-
"source /intel/oneapi/intelpython/bin/activate",
17-
"pip install -r requirements.txt",
18-
"pip install jupyter ipykernel",
1927
"jupyter nbconvert --ExecutePreprocessor.enabled=True --to notebook Modin_GettingStarted.ipynb"
2028
]
2129
}

0 commit comments

Comments
 (0)