Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use uv tool for isolate cicd env #2597

Open
wants to merge 7 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,7 @@
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import intel_extension_for_tensorflow as itex\n",
"\n",
"itex.experimental_ops_override()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ def lemmatize_text(text):
# 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.

# %%
import numpy as np
import intel_extension_for_tensorflow as itex

itex.experimental_ops_override()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[project]
name = "jobrecommendationsystem"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"accelerate>=1.4.0",
"datasets>=3.3.2",
"jinja2>=3.1.5",
"matplotlib>=3.10.1",
"nltk>=3.9.1",
"numpy==1.26.4",
"seaborn>=0.13.2",
"sentence-transformers>=3.4.1",
"spacy>=3.8.4",
"transformers>=4.49.0",
"wordcloud>=1.9.4",
]
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
"id": "JobRecommendationSystem_py",
"steps": [
"source /intel/oneapi/intelpython/bin/activate",
"conda env remove -n user_tensorflow-gpu",
"conda create --name user_tensorflow-gpu --clone tensorflow-gpu",
"conda activate user_tensorflow-gpu",
"pip install -r requirements.txt",
"python -m ipykernel install --user --name=user_tensorflow-gpu",
"python JobRecommendationSystem.py"
"conda activate tensorflow-gpu",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason to activate conda environment? As far as I know, UV will create an isolated environment.

Copy link
Contributor Author

@bopeng1234 bopeng1234 Mar 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reply at below

"pip install uv",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv sync",
"uv run python -m spacy download en_core_web_sm",
"uv run python JobRecommendationSystem.py"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[project]
name = "inc-quantizationawaretraining-textclassification"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"accelerate>=1.4.0",
"datasets>=3.3.2",
"evaluate>=0.4.3",
"neural-compressor>=3.2",
"optimum[neural-compressor]>=1.24.0",
"torch==2.5.0",
"torchvision==0.20.0",
"transformers>=4.45.2",
]
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
"env": [
"source /intel/oneapi/intelpython/bin/activate",
"conda activate pytorch",
"pip install -r requirements.txt"
"pip install uv",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv sync"
],
"id": "inc_text_classification_quantization_py",
"steps": [
"python INC_QuantizationAwareTraining_TextClassification.py"
"uv run INC_QuantizationAwareTraining_TextClassification.py"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[project]
name = "intelpytorch-gpu-inferenceoptimization-with-amp"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"matplotlib>=3.10.1",
"numpy==1.26.4",
"requests>=2.32.3",
"tqdm>=4.67.1",
]
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@
"ciTests": {
"linux": [
{
"env": [
"source /intel/oneapi/intelpython/bin/activate",
"conda activate pytorch-gpu",
"pip install uv",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv sync"
],
"id": "intel pytorch gpu inference optimization with amp",
"steps": [
"source /intel/oneapi/intelpython/bin/activate",
"source activate pytorch-gpu",
"pip install -r requirements.txt",
"pip install jupyter ipykernel",
"python -m ipykernel install --user --name=pytorch-gpu",
"python IntelPyTorch_GPU_InferenceOptimization_with_AMP.py"
"uv run IntelPyTorch_GPU_InferenceOptimization_with_AMP.py"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[project]
name = "intelpytorch-trainingoptimizations-amx-bf16"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"ipykernel>=6.29.5",
"matplotlib>=3.10.1",
"notebook>=7.3.2",
"py-cpuinfo>=9.0.0",
"transformers>=4.49.0",
]
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@
"ciTests": {
"linux": [
{
"env": [
"source /intel/oneapi/intelpython/bin/activate",
"conda activate pytorch",
"pip install uv",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv sync",
"uv run ipython kernel install --user --name pytorch"
],
"id": "intel amx bf16 training",
"steps": [
"source /intel/oneapi/intelpython/bin/activate",
"conda activate pytorch",
"python -m pip install -r requirements.txt",
"python -m ipykernel install --user --name=pytorch",
"python pytorch_training_avx512_bf16.py",
"python pytorch_training_amx_bf16.py",
"jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=pytorch --to notebook IntelPyTorch_TrainingOptimizations_AMX_BF16.ipynb"
"uv run python pytorch_training_avx512_bf16.py",
"uv run python pytorch_training_amx_bf16.py",
"uv run jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=pytorch --to notebook IntelPyTorch_TrainingOptimizations_AMX_BF16.ipynb"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[project]
name = "intelpython-gpu-dpnp-genetic-algorithm"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"matplotlib>=3.10.1",
]
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@
"os":["linux"],
"targetDevice": ["GPU"],
"ciTests": {
"linux": [
"linux": [
{
"env": [
"env": [
"source /intel/oneapi/intelpython/bin/activate",
"conda activate base",
"pip install -r requirements.txt"
"pip install uv",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv sync"
],
"id": "idp_ga_dpnp_py",
"steps": [
"python IntelPython_GPU_dpnp_Genetic_Algorithm.py"
]
}
"id": "idp_ga_dpnp_py",
"steps": [
"uv run python IntelPython_GPU_dpnp_Genetic_Algorithm.py"
]
}
]
},
"expertise": "Code Optimization"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[project]
name = "intelpython-numpy-numba-dpnp-knn"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"numba>=0.61.0",
]
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@
"env": [
"source /intel/oneapi/intelpython/bin/activate",
"conda activate base",
"pip install numba"
"pip install uv",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv sync"
],
"id": "idp_numpy_numba_dpnp_gs_py",
"steps": [
"python IntelPython_Numpy_Numba_dpnp_kNN.py"
]
}
"id": "idp_numpy_numba_dpnp_gs_py",
"steps": [
"uv run python IntelPython_Numpy_Numba_dpnp_kNN.py"
]
}
]
},
"expertise": "Code Optimization"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[project]
name = "intelpython-xgboost-performance"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"matplot>=0.1.9",
"notebook>=7.3.2",
"numpy==1.26.4",
"pandas>=2.2.3",
"scikit-learn>=1.6.1",
"xgboost==0.82",
]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
###### Requirements ######
notebook
matplot
xgboost==0.81
xgboost==0.82
scikit-learn
pandas
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,22 @@
"os":["linux"],
"targetDevice": ["CPU"],
"ciTests": {
"linux": [
"linux": [
{
"id": "idp_xgb_performance",
"steps": [
"source /intel/oneapi/intelpython/bin/activate",
"python IntelPython_XGBoost_Performance.py",
"conda remove xgboost --y",
"pip install -r requirements.txt",
"python IntelPython_XGBoost_Performance.py"
]
}
"env": [
"source /intel/oneapi/intelpython/bin/activate",
"conda activate base"
],
"id": "idp_xgb_performance",
"steps": [
"python IntelPython_XGBoost_Performance.py",
"pip install uv",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv sync",
"uv run python IntelPython_XGBoost_Performance.py"
]
}
]
},
"expertise": "Code Optimization"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[project]
name = "intelpython-daal4py-distributedkmeans"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"joblib>=1.4.2",
"notebook>=7.3.2",
"numpy==1.26.4",
"pandas>=2.2.3",
]
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@
"env": [
"source /intel/oneapi/intelpython/bin/activate",
"conda activate base",
"pip install -r requirements.txt"
"pip install uv",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv sync"
],
"id": "idp_d4p_KM_Dist",
"steps": [
"mpirun -n 4 python ./IntelPython_daal4py_Distributed_Kmeans.py"
"uv run mpirun -n 4 python ./IntelPython_daal4py_Distributed_Kmeans.py"
]
}]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[project]
name = "intelpython-daal4py-distributedlinearregression"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"joblib>=1.4.2",
"numpy==1.26.4",
"pandas>=2.2.3",
]
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
"ciTests": {
"linux": [{
"env": [
"source /intel/oneapi/intelpython/bin/activate",
"pip install -r requirements.txt"
"source /intel/oneapi/intelpython/bin/activate",
"conda activate base",
"pip install uv",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv sync"
],
"id": "idp_d4p_Linear_Regression_Dist",
"steps": [
"python download_data.py",
"mpirun -n 4 python ./IntelPython_daal4py_Distributed_LinearRegression.py"
"uv run python download_data.py",
"uv run mpirun -n 4 python ./IntelPython_daal4py_Distributed_LinearRegression.py"
]
}]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[project]
name = "inteltensorflow-amx-bf16-inference"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"jupyter>=1.1.1",
"notebook>=7.3.2",
"numpy==1.26.4",
"pillow>=11.1.0",
"py-cpuinfo>=9.0.0",
"requests>=2.32.3",
"tensorflow-hub==0.16",
]
Loading