-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup.py
More file actions
46 lines (41 loc) · 1.88 KB
/
Copy pathsetup.py
File metadata and controls
46 lines (41 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"""Packaging for the Second Look training source distribution.
This exists so the code can be shipped to a Vertex AI Custom Job as a Python
source distribution (``python setup.py sdist`` -> a ``.tar.gz`` on GCS), run by
a PREBUILT TensorFlow training container. The container already provides
tensorflow/keras/numpy; ``install_requires`` lists only the extras it lacks.
We deliberately do NOT depend on tensorflow here (the container pins a
CUDA-matched build) and use ``opencv-python-headless`` (no libGL) because the
training VM is headless. gradio / pytest / matplotlib-for-demos are omitted —
they are not needed to train.
Entrypoint module: ``scripts.train_vertex`` (pass as ``python-module`` to the
Vertex worker-pool spec).
"""
from setuptools import setup
setup(
name="second-look-training",
version="0.1.0",
description="Second Look mammogram baseline — Vertex AI training package",
python_requires=">=3.9",
# Explicit package list. These dirs carry __init__.py so setuptools treats
# them as regular packages and imports resolve after install.
packages=["config", "data_pipeline", "modeling", "scripts"],
# Ship the YAML configs the build step reads (config/sources.yaml,
# config/label_maps.yaml). MANIFEST.in also lists them so they land in the
# sdist tarball itself.
package_data={"config": ["*.yaml"]},
include_package_data=True,
install_requires=[
# Pin below NumPy 2: the prebuilt TF training container ships a
# TensorFlow compiled against NumPy 1.x, and letting pip upgrade to
# NumPy 2.x breaks `import tensorflow` with an ABI error
# (_pywrap_checkpoint_reader SystemError).
"numpy>=1.24,<2",
"pandas>=2.0",
"scikit-learn>=1.3",
"opencv-python-headless>=4.8",
"Pillow>=10.0",
"PyYAML>=6.0.2",
"google-cloud-storage>=2.18",
"matplotlib>=3.7",
],
)