8000 [workflows] Better message when not init'ed · Issue #18121 · ray-project/ray · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[workflows] Better message when not init'ed  #18121
Open
@wuisawesome

Description

@wuisawesome

What is the problem?

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 cl 6CD1 ean environment and reproduces the issue.
  • I have verified the issue also occurs with the latest wheels.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issue, but not time-criticalalphaAlpha release featuresbugSomething that is supposed to be working; but isn'tfix-error-msgThis issue has a bad error message that should be improved.observabilityIssues related to the Ray Dashboard, Logging, Metrics, Tracing, and/or Profilingpending-cleanupThis issue is pending cleanup. It will be removed in 2 weeks after being assigned.usabilityworkflow

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0