mirror of
https://github.com/wassname/ray.git
synced 2026-07-27 11:26:41 +08:00
Making our landing pages look better (#1022)
* Teaser in the front page of docs * TEASER * try changing README * spacing * readme * power words * readme obj_id change * obj_ids change for docs * Updates to readme. * Update landing page in documentation. * Fix linting.
This commit is contained in:
committed by
Robert Nishihara
parent
0d90a17426
commit
d482aa5aed
@@ -3,6 +3,28 @@ Ray
|
||||
|
||||
*Ray is a flexible, high-performance distributed execution framework.*
|
||||
|
||||
Example Program
|
||||
---------------
|
||||
|
||||
+------------------------------------------------+----------------------------------------------------+
|
||||
| **Basic Python** | **Distributed with Ray** |
|
||||
+------------------------------------------------+----------------------------------------------------+
|
||||
|.. code:: python |.. code-block:: python |
|
||||
| | |
|
||||
| import time | import time |
|
||||
| | import ray |
|
||||
| | |
|
||||
| | ray.init() |
|
||||
| | |
|
||||
| | @ray.remote |
|
||||
| def f(): | def f(): |
|
||||
| time.sleep(1) | time.sleep(1) |
|
||||
| return 1 | return 1 |
|
||||
| | |
|
||||
| # Execute f serially. | # Execute f in parallel. |
|
||||
| results = [f() for i in range(4)] | results = ray.get([f.remote() for i in range(4)]) |
|
||||
+------------------------------------------------+----------------------------------------------------+
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: Installation
|
||||
|
||||
Reference in New Issue
Block a user