Skip to content

Commit

Permalink
docs: restructure basic-usage directory
Browse files Browse the repository at this point in the history
  • Loading branch information
hollandjg committed Dec 1, 2023
1 parent 6aa50e0 commit 68f7bac
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
import numpy as np
import pandas as pd
import typer
from lib import ground_truth, noise_std
from matplotlib import pyplot as plt
from sklearn.model_selection import GridSearchCV

from autora.state import StandardState
from autora.workflow.__main__ import load_state

from .lib import ground_truth, noise_std


def plot_results(state: StandardState):
x = np.linspace(-10, 10, 100).reshape((-1, 1))
Expand Down
8 changes: 4 additions & 4 deletions docs/cli/basic-usage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ The command line interface allows us to load and save `States` and run arbitrary

To use the command line, we first define a file containing the functions we want to run on the State.

```python title="lib.py"
--8<-- "https://raw.githubusercontent.com/AutoResearch/autora-core/docs/update-workflow-docs/docs/cli/basic-usage/lib.py"
```python title="example/lib.py"
--8<-- "https://raw.githubusercontent.com/AutoResearch/autora-core/docs/update-workflow-docs/docs/cli/basic-usage/example/lib.py"
```

We can run the pipeline of initialization, condition generation, experiment and theory building as follows.
Expand Down Expand Up @@ -109,8 +109,8 @@ print(state)
`state` is the following object which, once loaded, can be treated like any other `State` object.
For instance, we can plot the results:

```python title="plot.py"
--8<-- "https://raw.githubusercontent.com/AutoResearch/autora-core/docs/update-workflow-docs/docs/cli/basic-usage/plot.py"
```python title="example/plot.py"
--8<-- "https://raw.githubusercontent.com/AutoResearch/autora-core/docs/update-workflow-docs/docs/cli/basic-usage/example/plot.py"
```

```shell
Expand Down

0 comments on commit 68f7bac

Please sign in to comment.