Skip to content

Commit

Permalink
cleanup getting started
Browse files Browse the repository at this point in the history
  • Loading branch information
ewgenius committed Feb 23, 2024
1 parent 7a8f4fa commit 50608b4
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 123 deletions.
18 changes: 9 additions & 9 deletions spiceaidocs/content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ type: docs
no_list: true
---

# Spice.ai
# Spice

**Spice.ai** makes it easy for developers to build apps that learn and adapt by streamlining the use of machine learning (ML) in software. Combined with time-series data, developers can create applications that continuously improve using ML recommendations.
**Spice** makes it easy for developers to build apps that learn and adapt by streamlining the use of machine learning (ML) in software. Combined with time-series data, developers can create applications that continuously improve using ML recommendations.

Spice.ai takes a developer-first approach, and is focused on a fast, iterative, inner development loop, enabling developers to get started with ML in minutes instead of months.
Spice takes a developer-first approach, and is focused on a fast, iterative, inner development loop, enabling developers to get started with ML in minutes instead of months.

📢 Read the Spice.ai announcement blog post at [blog.spiceai.org](https://blog.spiceai.org/posts/2021/09/07/introducing-spice.ai-open-source-time-series-ai-for-developers/).
📢 Read the Spice announcement blog post at [blog.spiceai.org](https://blog.spiceai.org/posts/2021/09/07/introducing-spice.ai-open-source-time-series-ai-for-developers/).

📺 View a getting started walkthrough of Spice.ai in action [here](https://www.youtube.com/watch?v=DKBLjuAz_lI).
📺 View a getting started walkthrough of Spice in action [here](https://www.youtube.com/watch?v=DKBLjuAz_lI).

## Features

The Spice.ai runtime is written in Golang and Python and runs as a container or microservice. It's deployable to any public cloud, on-premises, and edge. It is configured with a simple manifest and accessed by HTTP APIs.
The Spice runtime is written in Golang and Python and runs as a container or microservice. It's deployable to any public cloud, on-premises, and edge. It is configured with a simple manifest and accessed by HTTP APIs.

Spice.ai includes:
Spice includes:

- A lightweight, portable ML runtime accessible by simple HTTP APIs, allowing developers to use their preferred languages and frameworks
- A dashboard to visualize data and learning
Expand All @@ -26,11 +26,11 @@ Spice.ai includes:

### Community-Driven Data Components

Spice.ai also includes a library of community-driven [data components](https://github.com/spiceai/data-components-contrib) for streaming and processing time series data, enabling developers to quickly and easily combine data with learning to create intelligent models.
Spice also includes a library of community-driven [data components](https://github.com/spiceai/data-components-contrib) for streaming and processing time series data, enabling developers to quickly and easily combine data with learning to create intelligent models.

### Spicepod registry

Modern developers build with the community by leveraging registries such as npm, NuGet, and pip. The Spice.ai platform includes [spicerack.org](https://spicerack.org), the registry for ML building blocks.
Modern developers build with the community by leveraging registries such as npm, NuGet, and pip. The Spice platform includes [spicerack.org](https://spicerack.org), the registry for ML building blocks.

As the community shares their ML building blocks (aka Spicepods, or pods for short), developers can quickly add them to their Spice.ai applications enabling them to stream data and build learning into their applications quickly and easily. Initially, Spicepods contain simple definitions of how the app should learn, and eventually will enable the sharing and use of fully-trained models.

Expand Down
125 changes: 119 additions & 6 deletions spiceaidocs/content/en/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,123 @@ Before following this guide it is first recommended to review the Spice.ai [core

### Follow these steps to get started with Spice.ai.

1. Install Spice.ai
<!-- 1. Create your first Spice.ai pod and train it -->
<!-- 1. Observe your pod training -->
<!-- 1. Get a recommendation from your pod -->
<!-- 1. Explore Spice.ai quickstarts -->
**Step 1.** Install the Spice CLI:

{{< button text="First step: Install Spice.ai >>" page="install-spiceai" >}}
```bash
curl https://install.spiceai.org | /bin/bash
```

**Step 2.** Initialize a new Spice app with the `spice init` command:

```bash
spice init spice_app
```

A `Spicepod.yaml` file is created in the working directory.

**Step 3.** Connect to the sample Dremio instance to access the sample data:

```bash
spice login dremio -u demo -p demo1234
```

**Step 4.** Start the Spice runtime:

```bash
spice run
```

Example output will be shown as follows:

```bash
Spice.ai runtime starting...
Using latest 'local' runtime version.
2024-02-21T06:11:56.381793Z INFO runtime::http: Spice Runtime HTTP listening on 127.0.0.1:3000
2024-02-21T06:11:56.381853Z INFO runtime::flight: Spice Runtime Flight listening on 127.0.0.1:50051
2024-02-21T06:11:56.382038Z INFO runtime::opentelemetry: Spice Runtime OpenTelemetry listening on 127.0.0.1:50052
```

The runtime is now started and ready for queries.

**Step 5.** In a new terminal window, add the `spiceai/quickstart` Spicepod. A Spicepod is a package of configuration defining datasets and ML models.

```bash
spice add spiceai/quickstart
```

The `Spicepod.yaml` file will be updated with the `spiceai/quickstart` dependency.

```yaml
version: v1beta1
kind: Spicepod
name: PROJECT_NAME
dependencies:
- spiceai/quickstart
```
The `spiceai/quickstart` Spicepod will add a `taxi_trips` data table to the runtime which is now available to query by SQL.

```bash
2024-02-22T05:53:48.222952Z INFO runtime: Loaded dataset: taxi_trips
2024-02-22T05:53:48.223101Z INFO runtime::dataconnector: Refreshing data for taxi_trips
```

**Step 6.** Start the Spice SQL REPL:

```bash
spice sql
```

The SQL REPL inferface will be shown:

```
Welcome to the interactive Spice.ai SQL Query Utility! Type 'help' for help.
show tables; -- list available tables
sql>
```

Enter `show tables;` to display the available tables for query:

```
sql> show tables;
+---------------+--------------------+-------------+------------+
| table_catalog | table_schema | table_name | table_type |
+---------------+--------------------+-------------+------------+
| datafusion | public | taxi_trips | BASE TABLE |
| datafusion | information_schema | tables | VIEW |
| datafusion | information_schema | views | VIEW |
| datafusion | information_schema | columns | VIEW |
| datafusion | information_schema | df_settings | VIEW |
+---------------+--------------------+-------------+------------+
Query took: 0.004728897 seconds
```

Enter a query to display the most expensive tax trips:

```
sql> SELECT trip_distance_mi, fare_amount FROM taxi_trips ORDER BY fare_amount LIMIT 10;
```

Output:

```
+------------------+-------------+
| trip_distance_mi | fare_amount |
+------------------+-------------+
| 1.1 | 7.5 |
| 6.1 | 23.0 |
| 0.6 | 4.5 |
| 16.7 | 52.0 |
| 11.3 | 37.5 |
| 1.1 | 6.0 |
| 5.3 | 18.5 |
| 1.3 | 7.0 |
| 1.0 | 7.0 |
| 3.5 | 17.5 |
+------------------+-------------+
Query took: 0.002458976 seconds
```
16 changes: 0 additions & 16 deletions spiceaidocs/content/en/getting-started/install-spiceai.md

This file was deleted.

20 changes: 0 additions & 20 deletions spiceaidocs/content/en/getting-started/next-steps.md

This file was deleted.

72 changes: 0 additions & 72 deletions spiceaidocs/content/en/getting-started/train-pod.md

This file was deleted.

0 comments on commit 50608b4

Please sign in to comment.