mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
![]() The current type annotations expect and support using: ```Python @ray.remote def do_things(x: int, y: float): return x * y ``` ...without options. This PR adds type annotations for passing options, as in: ```Python @ray.remote(num_cpus=3) def do_more_things(name: str, value: float): return f"{name}: {value}" ``` Before: <img width="687" alt="Screenshot 2022-06-22 at 04 49 11" src="https://user-images.githubusercontent.com/1326112/174999689-80bdc3ce-b437-464f-b05c-7613b3f8f89b.png"> After (autocompletion): <img width="687" alt="Screenshot 2022-06-22 at 04 50 34" src="https://user-images.githubusercontent.com/1326112/174999899-5062335a-17ee-44a8-ad5c-97335e201e7b.png"> ...and no errors: <img width="687" alt="Screenshot 2022-06-22 at 04 51 15" src="https://user-images.githubusercontent.com/1326112/175000001-0a978871-8835-426f-9e09-5848194639fd.png"> |
||
---|---|---|
.. | ||
ray | ||
requirements | ||
asv.conf.json | ||
build-wheel-macos-arm64.sh | ||
build-wheel-macos.sh | ||
build-wheel-manylinux2014.sh | ||
build-wheel-windows.sh | ||
MANIFEST.in | ||
README-building-wheels.md | ||
requirements.txt | ||
requirements_linters.txt | ||
requirements_ml_docker.txt | ||
setup.py |