Skip to content

Commit

Permalink
fix command engine
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi-arya1 committed Jul 6, 2024
1 parent e3add20 commit 5975162
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,38 @@ tuna --edit
# .tuna directory
``` -->

**4. No Flags**
**4. Train**

```bash
tuna train
# Begins to train the dataset with a rented powerful GPU

# To train locally on current hardware, run
tuna train --local
# (must be on a device with an NVIDIA GPU, since Tuna relies on CUDA)
```

**5. Helpers**

````bash
tuna help
# or
tuna github
# or
tuna docs

# All of these will open the GitHub repository for Tuna, where all the documentation
# is served in the README.md file.
```

**6. No Flags**

```bash
tuna
# Displays a welcome message and goes over all
# commands again
```
````
## Localized Runs
Expand Down
10 changes: 9 additions & 1 deletion tuna/cli/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@
Commands:
⋅ tuna init : Initialize Tuna in your current directory
⋅ tuna serve : Run Tuna in JupyterLab, no automatic browser opening
⋅ tuna serve --open : Same as above with automatic browser opening
⋅ tuna serve --no-open : Same as "tuna serve"
⋅ tuna refresh : Refresh GitHub cache in your current directory
⋅ tuna refresh : Refresh GitHub cache in your current directory
⋅ tuna train : Begin training your model on the code with a powerful rented GPU
⋅ tuna train --local : Begin training your model on local hardware (Requires an NVIDIA GPU)
⋅ tuna github (or) tuna help (or) tuna docs : Open the Tuna GitHub Repository in the browser
⋅ tuna : Redisplay this message
Help : Contact support@opennote.me
Expand Down
Empty file removed tuna/cli/dataset.py
Empty file.
5 changes: 5 additions & 0 deletions tuna/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json
import os
import inquirer
from webbrowser import open as webopen
from sys import argv


Expand Down Expand Up @@ -98,6 +99,10 @@ def main():
elif argv[1] == "refresh":
validate()

elif argv[1] in ["github", "docs", "help"]:
print(f"[{INFO_ICON}] Opening 'https://github.com/abhi-arya1/tuna' in your default browser.")
webopen("https://github.com/abhi-arya1/tuna")

elif argv[1] == "edit":
print("Editing the Tuna notebook in your current directory")
else:
Expand Down

0 comments on commit 5975162

Please sign in to comment.