Skip to content

Commit 2e6e7d0

Browse files
committed
install twice
1 parent 39394c2 commit 2e6e7d0

2 files changed

Lines changed: 18 additions & 10 deletions

File tree

buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3165,14 +3165,16 @@ class BeamModulePlugin implements Plugin<Project> {
31653165
def distTarBall = "${pythonRootDir}/build/apache-beam.tar.gz"
31663166
def packages = "gcp,test,aws,azure,dataframe"
31673167
def extra = project.findProperty('beamPythonExtra')
3168-
if (extra) {
3169-
packages += ",${extra}"
3170-
}
3171-
31723168
project.exec {
31733169
executable 'sh'
31743170
args '-c', ". ${project.ext.envdir}/bin/activate && pip install --pre --retries 10 ${distTarBall}[${packages}]"
31753171
}
3172+
if (extra) {
3173+
project.exec {
3174+
executable 'sh'
3175+
args '-c', ". ${project.ext.envdir}/bin/activate && pip install --pre --retries 10 ${distTarBall}[${extra}]"
3176+
}
3177+
}
31763178
}
31773179
}
31783180

sdks/python/setup.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,15 @@ def cythonize(*args, **kwargs):
163163
milvus_dependency = ['pymilvus>=2.5.10,<3.0.0']
164164

165165
ml_base = [
166-
'embeddings',
166+
'embeddings>=0.0.4', # 0.0.3 crashes setuptools
167167
'onnxruntime',
168168
'langchain',
169169
'sentence-transformers>=2.2.2',
170170
'skl2onnx',
171171
'pyod>=0.7.6', # 0.7.5 crashes setuptools
172172
'tensorflow',
173-
'absl-py>=0.12.0', # tensorflow transient dependency, lower versions not compatible with Python3.10+
173+
# tensorflow transient dependency, lower versions not compatible with Python3.10+
174+
'absl-py>=0.12.0',
174175
'tensorflow-hub',
175176
'tf2onnx',
176177
'torch',
@@ -548,10 +549,12 @@ def get_portability_package_data():
548549
# tests due to tag check introduced since pip 24.2
549550
# https://github.com/apache/beam/issues/31285
550551
# 'xgboost<2.0', # https://github.com/apache/beam/issues/31252
551-
] + ml_base + milvus_dependency,
552+
] + ml_base,
552553
'p312_ml_test': [
553554
'datatable',
554555
] + ml_base,
556+
# maintainer: milvus tests only run with this extension. Make sure it
557+
# is covered by docker-in-docker test when changing py version
555558
'p313_ml_test': ml_base + milvus_dependency,
556559
'aws': ['boto3>=1.9,<2'],
557560
'azure': [
@@ -587,7 +590,8 @@ def get_portability_package_data():
587590
'torch': ['torch>=1.9.0,<2.8.0'],
588591
'tensorflow': [
589592
'tensorflow>=2.12rc1,<2.21',
590-
'absl-py>=0.12.0' # tensorflow transient dependency, lower versions not compatible with Python3.10+
593+
# tensorflow transitive dependency, lower versions not compatible with Python3.10+
594+
'absl-py>=0.12.0'
591595
],
592596
'transformers': [
593597
'transformers>=4.28.0,<4.56.0',
@@ -598,7 +602,8 @@ def get_portability_package_data():
598602
'tensorflow>=2.12.0',
599603
'torch==2.8.0+cpu',
600604
'transformers>=4.28.0,<4.56.0',
601-
'absl-py>=0.12.0' # tensorflow transient dependency, lower versions not compatible with Python3.10+
605+
# tensorflow transient dependency, lower versions not compatible with Python3.10+
606+
'absl-py>=0.12.0'
602607
],
603608
'redis': ['redis>=5.0.0,<6'],
604609
'tft': [
@@ -616,7 +621,8 @@ def get_portability_package_data():
616621
'tf2onnx==1.13.0',
617622
'skl2onnx==1.13',
618623
'transformers==4.25.1',
619-
'absl-py>=0.12.0' # tensorflow transient dependency, lower versions not compatible with Python3.10+
624+
# tensorflow transient dependency, lower versions not compatible with Python3.10+
625+
'absl-py>=0.12.0'
620626
],
621627
'xgboost': ['xgboost>=1.6.0,<2.1.3', 'datatable==1.0.0'],
622628
'tensorflow-hub': ['tensorflow-hub>=0.14.0,<0.16.0'],

0 commit comments

Comments
 (0)