wide-application-96237
07/24/2024, 8:12 PMpt = PodTemplate(
pod_spec=V1PodSpec(
containers=[
V1Container(
name="primary",
volume_mounts=[
V1VolumeMount(
name="wip",
mount_path="/mnt/WIP/",
read_only = True,
),
V1VolumeMount(
name="models",
mount_path="/models/",
read_only = True,
),
V1VolumeMount(
name="files",
mount_path="/mnt/files/",
read_only = False,
)
],
security_context=V1PodSecurityContext(run_as_user= 0,),
),
],
volumes=[
V1Volume(
name="wip",
host_path= V1HostPathVolumeSource("/mnt/wip/"),
),
V1Volume(
name="models",
host_path= V1HostPathVolumeSource("/models/"),
),
V1Volume(
name="files",
host_path= V1HostPathVolumeSource("/mnt/files/"),
)
],
))
@task(container_image=img)
def collectData(batch : str) -> list[str]:
#extracts a list of paths to seek
@task(pod_template=pt,
requests=Resources(
mem="2G",
),container_image=img)
def process(plate : str) -> np.ndarray:
#applies ML ops to images and generates an array of data, writes to a disk
@task(container_image=img)
def coalesce(arrays : list[np.ndarray]) -> np.ndarray:
return numpy.concatenate( arrays, axis=0 )
@workflow
def mlPipeline(batch: str = "98723") -> np.ndarray:
plates = collectData(batch = batch)
arrays = map_task(process)(plate=plates)
return coalesce(arrays = arrays)
freezing-airport-6809
pyflyte run --remote x.py process --plate ...
freezing-airport-6809
freezing-airport-6809
freezing-airport-6809
eager-processor-63090
07/25/2024, 4:08 PMwide-application-96237
07/26/2024, 8:50 PMwide-application-96237
07/26/2024, 8:54 PMwide-application-96237
07/26/2024, 8:56 PMwide-application-96237
07/26/2024, 9:00 PM2024-07-24 19:40:53.772139: I external/local_xla/xla/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.
2024-07-24 19:40:53.774976: I external/local_xla/xla/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.
2024-07-24 19:40:53.785070: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-07-24 19:40:53.801777: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-07-24 19:40:53.806844: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-07-24 19:40:53.819850: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-07-24 19:40:54.991369: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Getting <s3://flyte/metadata/propeller/vrd-angstrom-validated-apps-development-fc634955599854a07b54/n1/data/inputs.pb> to /tmp/flyte-xabeduam/sandbox/local_flytekit/inputs.pb
Getting <s3://flyte/vrd-angstrom-validated-apps/development/BYZPISTNFMQMM57O32LDHICCWE======/script_mode.tar.gz> to ./
(yeah I know that running tensorflow in the container isn't the most ideal form, but we're just doing it to isolate any bugs, the plan is to swap it out for a triton container before going to prod)
only error in the binary container is this warning which triggers at completion time for the previous task, the collectData
W0724 193513.641541 8 warnings.go:70] metadata.finalizers: "flyte-finalizer": prefer a domain-qualified finalizer name to avoid accidental conflicts with other finalizer writerseager-processor-63090
07/29/2024, 4:17 PMeager-processor-63090
07/29/2024, 11:01 PMflytekit==1.12.0
. I believe there is some backend work needed for that functionality. Is this on your radar? A quick test would be to downgrade to flytekit==1.11.0
(assuming you're importing via from flytekit import map_task
). On that version you can further experiment going back and forth by importing array node map tasks from flytekit.experimental
. Let me know what you discover!wide-application-96237
07/30/2024, 8:18 PM