Hi Folks! Hope you are doing well. I hoped in beca...
# flyte-support
w
Hi Folks! Hope you are doing well. I hoped in because I have a quick Q in regards to a demo I'm putting together for my team. Whenever I use any map task, I've been getting an error: currentAttempt done. Last Error: UNKNOWN::Outputs not generated by task execution here's the code I've been working with. I've blocked out the actual functionality since the error seems to persist no matter what is done. the code was working entirely until the process task was changed to a map task. Due to enterprise constraints we're running flyte "the hard way" with onprem kube, but wondering if anyone has had a similar bug and knows what they did to resolve!
Copy code
pt = 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)
f
can you just run
Copy code
pyflyte run --remote x.py process --plate ...
does that return an output?
What version of flytekit and flyte are you using?
cc @eager-processor-63090 may know off the top of his head?
e
Hey @wide-application-96237, this is interesting.. Would you mind sharing what version of flytekit you're using and a screenshot of the console where the error is being shown?
w
Sure-- can do. We're using Flyte server 1.13 and pyflyte 1.12.1. The issue was originally on 1.12 server so I updated to 1.13 to see if it'd fix it but no dice.
As for @freezing-airport-6809’s question: yes, running the task as a one off works perfectly.
And re: @eager-processor-63090, I'm getting this error in the flyte admin console. I'll also show you the flyte-binary and task container logs in a moment
Copy code
2024-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 writers
e
Thanks for sending all that through! Will be taking a look today.
We made ArrayNode map tasks the default map task starting with
flytekit==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!
w
@eager-processor-63090 -- thanks for looking into this. Will give it a shot with the legacy map tasks in 11 and let you know if I see any change!
šŸ‘ 1