Skip to content

Commit b65bf6a

Browse files
eleemhuiaemorabrkjmorajiEdgar097
authored
Uv conversion remaining samples (#4)
* uv for IntelTensorFlow_for_LLMs. * uv for leveraging-intel-extension-for-tensorFlow-with-LSTM-for-text-generation * uv for IntelTensorFlow_Horovod_Distributed_Deep_Learning * uv for IntelTensorFlow_ModelZoo_Inference_with_FP32_Int8 * uv for IntelTensorFlow_PerformanceAnalysis * add uv to IntelPython_XGBoost_daal4pyPrediction * finished sample IntelTensorFlow_Enabling_Auto_Mixed_Precision_for_TransferLearning * finished converting IntelPython_daal4py_DistributedLinearRegression * finished converting IntelPython_daal4py_GettingStarted * uv added to IntelPython_daal4py_DistributedKMeans * uv for intelpython-xgboost-gettingstarted * uv for intelTensorFlow_gettingstarted * uv for moding_gettingstarted * adding uv for moding_vs_pandas * finished converting JobRecommendationSystem sample --------- Signed-off-by: Solano Saurez, Hector <[email protected]> Co-authored-by: Allan Mora B <[email protected]> Co-authored-by: Mora Jimenez, Kevin <[email protected]> Co-authored-by: Edgar Parra <[email protected]>
1 parent 9f19833 commit b65bf6a

File tree

53 files changed

+38671
-97
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+38671
-97
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,8 @@
10121012
},
10131013
"outputs": [],
10141014
"source": [
1015+
"import numpy as np\n",
1016+
"\n",
10151017
"X_final = np.array(embedded_docs)\n",
10161018
"y_final = np.array(y)"
10171019
]
@@ -1258,7 +1260,6 @@
12581260
"metadata": {},
12591261
"outputs": [],
12601262
"source": [
1261-
"import numpy as np\n",
12621263
"import seaborn as sns\n",
12631264
"\n",
12641265
"def plot_similarity(labels, features, rotation):\n",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ def lemmatize_text(text):
476476
print(model_itex.summary())
477477

478478
# %%
479+
import numpy as np
479480
X_final = np.array(embedded_docs)
480481
y_final = np.array(y)
481482

@@ -578,7 +579,6 @@ def lemmatize_text(text):
578579
# Now, we are preparing functions to show similarities between given sentences in the for of heat map.
579580

580581
# %%
581-
import numpy as np
582582
import seaborn as sns
583583

584584
def plot_similarity(labels, features, rotation):
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[project]
2+
name = "jobrecommendationsystem"
3+
version = "0.1.0"
4+
description = "This sample illustrates the use of Intel® Extension for TensorFlow* to build and run an end-to-end AI workload on the example of the job recommendation system"
5+
authors = [
6+
{name = "Copyright © 2020 Intel Corporation"}
7+
]
8+
license = {text = "MIT"}
9+
readme = "README.md"
10+
requires-python = ">=3.11"
11+
dependencies = [
12+
"accelerate>=1.4.0",
13+
"datasets>=3.3.2",
14+
"intel-extension-for-tensorflow>=2.15.0.2",
15+
"intel-extension-for-tensorflow-lib>=2.15.0.2.2",
16+
"ipykernel>=6.29.5",
17+
"jinja2>=3.1.6",
18+
"matplotlib>=3.10.1",
19+
"nltk>=3.9.1",
20+
"pip>=25.0.1",
21+
"seaborn>=0.13.2",
22+
"sentence-transformers>=3.4.1",
23+
"spacy>=3.8.4",
24+
"transformers>=4.49.0",
25+
"wordcloud>=1.9.4",
26+
]
27+
[dependency-groups]
28+
dev = [
29+
"ipykernel>=6.29.5",
30+
"jupyter>=1.1.1",
31+
]
32+
[[tool.uv.index]]
33+
url = "https://software.repos.intel.com/python/pypi"
34+
35+

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
"ciTests": {
1212
"linux": [
1313
{
14-
"env": [],
14+
"env": [
15+
"pip install uv==0.6.3",
16+
"uv sync",
17+
"uv run python -m ipykernel install --user --name=JobRecommendationSystem_py"
18+
],
1519
"id": "JobRecommendationSystem_py",
1620
"steps": [
17-
"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"
21+
"uv run spacy download en_core_web_sm",
22+
"uv run JobRecommendationSystem.py",
23+
"uv run jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=JobRecommendationSystem_py --to notebook JobRecommendationSystem.ipynb"
2424
]
2525
}
2626
]

AI-and-Analytics/End-to-end-Workloads/JobRecommendationSystem/uv.lock

Lines changed: 4005 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[project]
2+
name = "fine_tuning_text_classification_model_with_intel_neural_compressor"
3+
version = "0.1.0"
4+
description = "This sample demonstrates how to fine-tune text model for emotion classification task using Intel® Neural Compressor Quantization Aware Training (QAT)."
5+
authors = [
6+
{name = "Copyright © 2023 Intel Corporation"}
7+
]
8+
license = {text = "MIT"}
9+
readme = "README.md"
10+
requires-python = ">=3.10"
11+
dependencies = [
12+
"transformers (>=4.36,<4.46)", # Adjusted to match the compatible range
13+
"evaluate (>=0.4.3,<0.5.0)",
14+
"accelerate (>=1.4.0,<2.0.0)",
15+
"datasets (>=3.3.2,<4.0.0)",
16+
"neural-compressor (>=2.2.0,<3.0)", # Adjusted to match the compatible range
17+
"optimum-intel[neural-compressor] (>=1.18.0,<1.22.0)" # Added to ensure compatibility
18+
]
19+
20+
21+
[project.scripts]
22+
python-validate = "INC_QuantizationAwareTraining_TextClassification:main"
23+
24+
[build-system]
25+
requires = ["setuptools", "wheel"]
26+
build-backend = "setuptools.build_meta"
27+
28+
[dependency-groups]
29+
dev = [
30+
"ipykernel>=6.29.5",
31+
]

AI-and-Analytics/Features-and-Functionality/INC_QuantizationAwareTraining_TextClassification/sample.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
"linux": [
1313
{
1414
"env": [
15-
"source /intel/oneapi/intelpython/bin/activate",
16-
"conda activate pytorch",
17-
"pip install -r requirements.txt"
15+
"pip install uv",
16+
"uv sync"
1817
],
1918
"id": "inc_text_classification_quantization_py",
2019
"steps": [
21-
"python INC_QuantizationAwareTraining_TextClassification.py"
20+
"uv run INC_QuantizationAwareTraining_TextClassification.py"
2221
]
2322
}
2423
]

AI-and-Analytics/Features-and-Functionality/INC_QuantizationAwareTraining_TextClassification/uv.lock

Lines changed: 2819 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[project]
2+
name = "intelpython-xgboost-daal4pyprediction"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.11"
7+
dependencies = [
8+
"daal4py>=2024.7.0",
9+
"ipykernel>=6.29.5",
10+
"jupyter>=1.1.1",
11+
"matplotlib>=3.10.1",
12+
"pandas>=2.2.3",
13+
"scikit-learn>=1.6.1",
14+
"xgboost>=2.1.4",
15+
]

AI-and-Analytics/Features-and-Functionality/IntelPython_XGBoost_daal4pyPrediction/sample.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
{
1414
"id": "idp_xgb_d4p_prediction",
1515
"steps": [
16-
"source /intel/oneapi/intelpython/bin/activate",
17-
"pip install ipykernel jupyter",
18-
"python -m ipykernel install --user --name=xgboost",
19-
"jupyter nbconvert --to notebook --execute IntelPython_XGBoost_daal4pyPrediction.ipynb"
16+
"pip install uv",
17+
"uv venv",
18+
"uv sync",
19+
"uv run python -m ipykernel install --user --name=xgboost",
20+
"uv run jupyter nbconvert --to notebook --execute IntelPython_XGBoost_daal4pyPrediction.ipynb"
2021
]
2122
}
2223
]

0 commit comments

Comments
 (0)