Update quick start guide with latest info (#14880)
Co-authored-by: thomas chaton <thomas@grid.ai>
This commit is contained in:
parent
72ac4b592f
commit
c8059d4464
|
@ -8,7 +8,7 @@ Quick Start
|
|||
|
||||
In this guide, we'll run an application that trains
|
||||
an image classification model with the `MNIST Dataset <https://en.wikipedia.org/wiki/MNIST_database>`_,
|
||||
and uses `FastAPI <https://fastapi.tiangolo.com/>`_ to serve it.
|
||||
and uses `Gradio <https://gradio.app>`_ to serve it.
|
||||
|
||||
----
|
||||
|
||||
|
@ -16,19 +16,16 @@ and uses `FastAPI <https://fastapi.tiangolo.com/>`_ to serve it.
|
|||
Step 1 - Installation
|
||||
**********************
|
||||
|
||||
First, you'll need to install Lightning from source. You can find the complete guide here: :ref:`install`.
|
||||
First, you'll need to install Lightning. You can find the complete guide here: :ref:`install`.
|
||||
|
||||
Then, you'll need to install the `Lightning Quick Start package <https://github.com/Lightning-AI/lightning-quick-start>`_.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
lightning install quick-start
|
||||
lightning install app lightning/quick-start
|
||||
|
||||
And download the training script used by the App:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
curl https://gist.githubusercontent.com/tchaton/b81c8d8ba0f4dd39a47bfa607d81d6d5/raw/8d9d70573a006d95bdcda8492e798d0771d7e61b/train_script.py > train_script.py
|
||||
|
||||
----
|
||||
|
||||
|
@ -49,38 +46,39 @@ And that's it!
|
|||
|
||||
.. code-block:: console
|
||||
|
||||
INFO: Your app has started. View it in your browser: http://http://127.0.0.1:7501
|
||||
Your Lightning App is starting. This won't take long.
|
||||
INFO: Your app has started. View it in your browser: http://127.0.0.1:7501/view
|
||||
|
||||
INFO: Running train_script: .../lightning/demo/quick_start/train/train.py
|
||||
Global seed set to 42
|
||||
GPU available: False, used: False
|
||||
|
||||
GPU available: True (mps), used: False
|
||||
TPU available: False, using: 0 TPU cores
|
||||
IPU available: False, using: 0 IPUs
|
||||
HPU available: False, using: 0 HPUs
|
||||
|
||||
| Name | Type | Params
|
||||
-------------------------------------
|
||||
0 | model | Net | 1.2 M
|
||||
1 | val_acc | Accuracy | 0
|
||||
-------------------------------------
|
||||
| Name | Type | Params | In sizes | Out sizes
|
||||
------------------------------------------------------------------
|
||||
0 | model | Net | 1.2 M | [1, 1, 28, 28] | [1, 10]
|
||||
1 | val_acc | Accuracy | 0 | ? | ?
|
||||
------------------------------------------------------------------
|
||||
1.2 M Trainable params
|
||||
0 Non-trainable params
|
||||
1.2 M Total params
|
||||
4.800 Total estimated model params size (MB)
|
||||
Epoch 3: 100%|█████████████████████████| 8/8 [00:03<00:00, 2.35it/s, loss=1.58, v_num=39]
|
||||
Epoch 4: 100%|█████████████████████████| 16/16 [00:00<00:00, 32.31it/s, loss=0.0826, v_num=0]
|
||||
`Trainer.fit` stopped: `max_epochs=5` reached.
|
||||
|
||||
INFO: Running serve_script: .../lightning/demo/quick_start/serve/serve.py
|
||||
INFO: INFO: Started server process [4808]
|
||||
INFO: INFO: Waiting for application startup.
|
||||
INFO: INFO: Application startup complete.
|
||||
INFO: INFO: Uvicorn running on http://0.0.0.0:8888 (Press CTRL+C to quit)
|
||||
Running on local URL: http://127.0.0.1:62782/
|
||||
...
|
||||
|
||||
|
||||
The build command will launch the app admin panel UI. In your app admin, you can track your app's progress, or click on the **Open App** button to view see your app's UI:
|
||||
The app will open your browser and show an interactive demo:
|
||||
|
||||
.. figure:: https://pl-flash-data.s3.amazonaws.com/assets_lightning/quick_start_ui.png
|
||||
:alt: Quick Start UI
|
||||
.. figure:: https://pl-flash-data.s3.amazonaws.com/assets_lightning/quick-start/qiuck-start-tensorboard-tab.png
|
||||
:alt: Quick Start UI - Model Training Tab
|
||||
:width: 100 %
|
||||
|
||||
.. figure:: https://pl-flash-data.s3.amazonaws.com/assets_lightning/quick-start/quick-start-gradio-tab.png
|
||||
:alt: Quick Start UI - Interactive Demo Tab
|
||||
:width: 100 %
|
||||
|
||||
----
|
||||
|
@ -116,13 +114,6 @@ Simply add ``--cloud`` to run this application in the cloud 🤯
|
|||
|
||||
lightning run app app.py --cloud
|
||||
|
||||
And with just one line of code, run on cloud GPUs!
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
USE_GPU=1
|
||||
lightning run app app.py --cloud
|
||||
|
||||
Congratulations! You've now run your first application with Lightning.
|
||||
|
||||
----
|
||||
|
|
Loading…
Reference in New Issue