salmon-smartphone-62113
02/20/2024, 10:46 PMnvidia/cuda:12.3.1-devel-ubuntu20.04 as the base image and using GPU's. When I'm running the flow remotely from my laptop I can't see any of the stdout output. Nothing I print in the flow or any other logging shows up. But if I find the pod it's running on and do kubectl log <podname> I can see the output. I have no idea how to troubleshoot this, I was wondering if anyone else have encountered this.ancient-application-36103
02/21/2024, 5:08 PMsalmon-smartphone-62113
02/21/2024, 6:12 PMfrom metaflow import FlowSpec, step, kubernetes, resources, retry
import torch
class HelloCloudFlow(FlowSpec):
@step
def start(self):
"""
The 'start' step is a regular step, so runs locally on the machine from
which the flow is executed.
"""
from metaflow import get_metadata
print("HelloCloud is starting.")
print("")
print("Using metadata provider: %s" % get_metadata())
print("")
print("The start step is running locally. Next, the ")
print("'hello' step will run remotely on Kubernetes. ")
self.next(self.hello)
@kubernetes(
tolerations=[
{
'key': 'gpu_enabled',
'operator': 'Equal',
'value': 'true',
'effect': 'NoSchedule'
},
{
'key': 'nvidia.com/gpu',
'operator': 'Equal',
'value': 'present',
'effect': 'NoSchedule'
}
],
node_selector={'gpu_enabled': 'true'}
)
@retry
@resources(gpu=1)
@step
def hello(self):
self.message = "Hi from the cloud!"
print("Metaflow says: %s" % self.message)
print("Running on Kubernetes with GPU.")
gpu_available = torch.cuda.is_available()
if gpu_available:
print(f"Running on GPU.")
else:
print("No GPU available.")
self.next(self.end)
@step
def end(self):
"""
The 'end' step is a regular step, so runs locally on the machine from
which the flow is executed.
"""
print("HelloCloud is finished.")
print("")
if __name__ == "__main__":
HelloCloudFlow()
All the stuff I print in start and end steps are displayed, but I don't see any of the output from the hello step.salmon-smartphone-62113
02/21/2024, 6:14 PMkubectl logs I can see the output though.ancient-application-36103
02/21/2024, 6:20 PMgreen-dawn-69060
03/07/2024, 11:00 AM404 GET <https://storage.googleapis.com/download/storage/v1/b/testbucket/o/tf-full-stack-sysroot%2FSimpleTestFlow%2F18%2Frun_on_cpu_remote%2F274258%2F0.task_stdout.log?alt=media&generation=1709809091417399>: No such object: testbucket/tf-full-stack-sysroot/SimpleTestFlow/18/run_on_cpu_remote/274258/0.task_stdout.log: ('Request failed with status code', 404, 'Expected one of', <HTTPStatus.OK: 200>, <HTTPStatus.PARTIAL_CONTENT: 206>)green-dawn-69060
03/07/2024, 2:11 PMgreen-dawn-69060
03/08/2024, 10:44 AM