brave-camera-54148
10/02/2024, 11:42 PMECS was unable to assume the role 'arn:aws:iam::<ACCT>:role/metaflow-test-dev-BatchExecutionRole-Nw7a9bPcvQUI' that was provided for this task...
from metaflow import FlowSpec, pypi, step, batch
class UnFlow(FlowSpec):
@step
def start(self):
self.next(self.go)
@batch(image="<ACCT>.dkr.ecr.us-east-1.amazonaws.com/ml/metaflow:base")
@step
def go(self):
from unstructured.partition.pdf import partition_pdf
elements = partition_pdf(filename="example.pdf")
print("\n\n".join([str(el) for el in elements]))
self.next(self.end)
@step
def end(self):
pass
if __name__ == '__main__':
UnFlow()
Apologies if this is not the correct spot for this question, and tia for any support!square-wire-39606
10/03/2024, 12:11 AMbrave-camera-54148
10/03/2024, 3:36 PMubuntu@ip-10-20-1-98:~/metaflow/app$ python unflow.py run
Metaflow 2.12.22 executing UnFlow for user:ubuntu
Validating your flow...
The graph looks good!
Running pylint...
Pylint is happy!
2024-10-03 15:36:00.915 Workflow starting (run-id 52):
2024-10-03 15:36:01.856 [52/start/136 (pid 196460)] Task is starting.
2024-10-03 15:36:03.909 [52/start/136 (pid 196460)] Task finished successfully.
2024-10-03 15:36:04.126 [52/go/137 (pid 196499)] Task is starting.
2024-10-03 15:36:05.523 [52/go/137 (pid 196499)] [064e0bf8-df71-4488-8514-5d2984634b3f] Task is starting (status SUBMITTED)...
2024-10-03 15:36:09.614 [52/go/137 (pid 196499)] [064e0bf8-df71-4488-8514-5d2984634b3f] Task is starting (status RUNNABLE)...
2024-10-03 15:36:13.864 [52/go/137 (pid 196499)] [064e0bf8-df71-4488-8514-5d2984634b3f] Task is starting (status FAILED)...
2024-10-03 15:36:14.602 [52/go/137 (pid 196499)] AWS Batch error:
2024-10-03 15:36:15.067 [52/go/137 (pid 196499)] ECS was unable to assume the role 'arn:aws:iam::<ACCT>:role/metaflow-test-dev-BatchExecutionRole-Tabcd1234XPE' that was provided for this task. Please verify that the role being passed has the proper trust relationship and permissions and that your IAM user has permissions to pass this role. This could be a transient error. Use @retry to retry.
2024-10-03 15:36:15.067 [52/go/137 (pid 196499)]
2024-10-03 15:36:15.205 [52/go/137 (pid 196499)] Task failed.
2024-10-03 15:36:15.264 Workflow failed.
2024-10-03 15:36:15.264 Terminating 0 active tasks...
2024-10-03 15:36:15.264 Flushing logs...
Step failure:
Step go (task-id 137) failed.
brave-camera-54148
10/03/2024, 4:05 PM"Effect": "Allow",
"Principal": {
"Service": "<http://ecs-tasks.amazonaws.com|ecs-tasks.amazonaws.com>"
},
"Action": "sts:AssumeRole"
brave-camera-54148
10/03/2024, 4:50 PMTraceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/root/services/ui_backend_service/data/cache/client/cache_server.py", line 365, in <module>
cli(auto_envvar_prefix='MFCACHE')
File "/opt/latest/lib/python3.11/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/opt/latest/lib/python3.11/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/opt/latest/lib/python3.11/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/latest/lib/python3.11/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/root/services/ui_backend_service/data/cache/client/cache_server.py", line 359, in cli
Scheduler(store, max_actions).loop()
File "/root/services/ui_backend_service/data/cache/client/cache_server.py", line 327, in loop
self.cleanup_if_necessary()
File "/root/services/ui_backend_service/data/cache/client/cache_server.py", line 291, in cleanup_if_necessary
self.cleanup_workers()
File "/root/services/ui_backend_service/data/cache/client/cache_server.py", line 299, in cleanup_workers
self.cleanup_pool()
File "/root/services/ui_backend_service/data/cache/client/cache_server.py", line 305, in cleanup_pool
self.pool = multiprocessing.Pool(
File "/usr/local/lib/python3.11/multiprocessing/context.py", line 119, in Pool
return Pool(processes, initializer, initargs, maxtasksperchild,
File "/usr/local/lib/python3.11/multiprocessing/pool.py", line 215, in __init__
self._repopulate_pool()
File "/usr/local/lib/python3.11/multiprocessing/pool.py", line 306, in _repopulate_pool
return self._repopulate_pool_static(self._ctx, self.Process,
File "/usr/local/lib/python3.11/multiprocessing/pool.py", line 329, in _repopulate_pool_static
w.start()
File "/usr/local/lib/python3.11/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/usr/local/lib/python3.11/multiprocessing/context.py", line 281, in _Popen
return Popen(process_obj)
File "/usr/local/lib/python3.11/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/usr/local/lib/python3.11/multiprocessing/popen_fork.py", line 71, in _launch
code = process_obj._bootstrap(parent_sentinel=child_r)
File "/usr/local/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/local/lib/python3.11/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.11/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/root/services/ui_backend_service/data/cache/client/cache_worker.py", line 29, in execute_action
execute(tempdir, action_cls, request)
File "/root/services/ui_backend_service/data/cache/client/cache_worker.py", line 51, in execute
res = action_cls.execute(
File "/root/services/ui_backend_service/data/cache/get_log_file_action.py", line 141, in execute
with streamed_errors(stream_output):
File "/usr/local/lib/python3.11/contextlib.py", line 155, in __exit__
self.gen.throw(typ, value, traceback)
File "/root/services/ui_backend_service/data/cache/utils.py", line 130, in streamed_errors
get_traceback_str()
File "/root/services/ui_backend_service/data/cache/utils.py", line 124, in streamed_errors
yield
File "/root/services/ui_backend_service/data/cache/get_log_file_action.py", line 150, in execute
total_lines = count_total_lines(local_paths)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/services/ui_backend_service/data/cache/get_log_file_action.py", line 293, in count_total_lines
for path in paths:
TypeError: 'NoneType' object is not iterable
square-wire-39606
10/03/2024, 5:14 PMsquare-wire-39606
10/03/2024, 5:14 PMbrave-camera-54148
10/03/2024, 5:16 PMsquare-wire-39606
10/03/2024, 5:21 PMbrave-camera-54148
10/03/2024, 5:21 PMsquare-wire-39606
10/03/2024, 5:28 PMbrave-camera-54148
10/03/2024, 5:29 PMsquare-wire-39606
10/03/2024, 5:29 PMbrave-camera-54148
10/03/2024, 5:29 PMsquare-wire-39606
10/03/2024, 5:29 PMbrave-camera-54148
10/03/2024, 5:31 PMsquare-wire-39606
10/03/2024, 5:32 PMbrave-camera-54148
10/03/2024, 5:33 PMMetaflow 2.12.22 executing UnFlow for user:ubuntu
Validating your flow...
The graph looks good!
Running pylint...
Pylint is happy!
2024-10-03 17:26:10.620 Workflow starting (run-id 66):
2024-10-03 17:26:11.603 [66/start/181 (pid 237352)] Task is starting.
2024-10-03 17:26:13.458 [66/start/181 (pid 237352)] Task finished successfully.
2024-10-03 17:26:13.851 [66/go/182 (pid 237381)] Task is starting.
2024-10-03 17:26:15.653 [66/go/182 (pid 237381)] [0f0a100f-4919-4f84-ac0d-51591f0a3834] Task is starting (status SUBMITTED)...
2024-10-03 17:26:18.721 [66/go/182 (pid 237381)] [0f0a100f-4919-4f84-ac0d-51591f0a3834] Task is starting (status RUNNABLE)...
2024-10-03 17:26:20.889 [66/go/182 (pid 237381)] [0f0a100f-4919-4f84-ac0d-51591f0a3834] Task is starting (status STARTING)...
2024-10-03 17:26:27.262 [66/go/182 (pid 237381)] [0f0a100f-4919-4f84-ac0d-51591f0a3834] Task is starting (status RUNNING)...
2024-10-03 17:27:32.358 [66/go/182 (pid 237381)] AWS Batch error:
2024-10-03 17:27:32.358 [66/go/182 (pid 237381)] Essential container in task exited This could be a transient error. Use @retry to retry.
2024-10-03 17:27:32.358 [66/go/182 (pid 237381)]
2024-10-03 17:27:32.654 [66/go/182 (pid 237381)] Task failed.
2024-10-03 17:27:32.746 Workflow failed.
2024-10-03 17:27:32.747 Terminating 0 active tasks...
2024-10-03 17:27:32.747 Flushing logs...
Step failure:
Step go (task-id 182) failed.
brave-camera-54148
10/03/2024, 5:34 PMfrom metaflow import FlowSpec, pypi, step, batch
class UnFlow(FlowSpec):
@step
def start(self):
self.next(self.go)
@batch()
@step
def go(self):
print('hello world')
self.next(self.end)
@step
def end(self):
pass
if __name__ == '__main__':
UnFlow()
brave-camera-54148
10/03/2024, 5:36 PMsquare-wire-39606
10/03/2024, 5:37 PMbrave-camera-54148
10/03/2024, 5:41 PMsquare-wire-39606
10/03/2024, 5:41 PMsquare-wire-39606
10/03/2024, 5:42 PMbrave-camera-54148
10/03/2024, 5:42 PMbrave-camera-54148
10/03/2024, 5:46 PMsquare-wire-39606
10/03/2024, 6:07 PMbrave-camera-54148
10/04/2024, 6:57 PMsquare-wire-39606
10/04/2024, 10:16 PM