The following two files introduce basic usage of the @metaflow_ray
decorator with @kubernetes
.
counter.py
contains an actor (class decorated with@ray.remote
) calledCounter
- The usage (/user code) of this counter is present in
__main__
and can be verified by runningpython examples/basic_counter/counter.py
flow.py
shows how the usage (/user code) for this counter (after importing it fromcounter.py
) can now be moved within theexecute
step of theRayCounterFlow
.
- This flow can now be run with
python examples/basic_counter/flow.py --no-pylint --environment=pypi run
- If you are on the Outerbounds platform, you can leverage
fast-bakery
for blazingly fast docker image builds. This can be used bypython examples/basic_counter/flow.py --no-pylint --environment=fast-bakery run