We have a great error message when workflow.init isn't called, but unfortunately it isn't called if ray.init also isn't called.
Ray version and other system information (Python version, TensorFlow version, OS):
Reproduction (REQUIRED)
import ray
from ray import workflow
@workflow.step
def foo(input_arg):
print(input_arg)
return "done"
print(foo.step("hello").run())
(base) Alexs-MacBook-Pro:ray alex$ python test.py
Traceback (most recent call last):
File "test.py", line 12, in <module>
print(foo.step("hello").run())
File "/Users/alex/anyscale/ray/python/ray/experimental/workflow/step_function.py", line 34, in _build_workflow
flattened_args)
File "/Users/alex/anyscale/ray/python/ray/experimental/workflow/serialization_context.py", line 207, in make_workflow_inputs
workflow_refs):
File "/Users/alex/miniconda3/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/Users/alex/anyscale/ray/python/ray/experimental/workflow/serialization_context.py", line 70, in workflow_args_serialization_context
deserializer=_resolve_workflow_outputs)
File "/Users/alex/anyscale/ray/python/ray/util/serialization.py", line 18, in register_serializer
context = ray.worker.global_worker.get_serialization_context()
File "/Users/alex/anyscale/ray/python/ray/worker.py", line 213, in get_serialization_context
with self.lock:
AttributeError: 'Worker' object has no attribute 'lock'
Please provide a short code snippet (less than 50 lines if possible) that can be copy-pasted to reproduce the issue. The snippet should have no external library dependencies (i.e., use fake or mock data / environments):
If the code snippet cannot be run by itself, the issue will be closed with "needs-repro-script".
[ ] I have verified my script runs in a clean environment and reproduces the issue.
[ ] I have verified the issue also occurs with the latest wheels.
What is the problem?
We have a great error message when
workflow.init
isn't called, but unfortunately it isn't called ifray.init
also isn't called.Ray version and other system information (Python version, TensorFlow version, OS):
Reproduction (REQUIRED)
Please provide a short code snippet (less than 50 lines if possible) that can be copy-pasted to reproduce the issue. The snippet should have no external library dependencies (i.e., use fake or mock data / environments):
If the code snippet cannot be run by itself, the issue will be closed with "needs-repro-script".