Skip to content

Commit

Permalink
CLI reorg and refresh (#60)
Browse files Browse the repository at this point in the history
* Restructure and restore Arcee CLI

* add pdoc docs generation

* format

* py compat

* set up for publishing module docs to github pages

* remove older retriever cli commands
  • Loading branch information
nason authored Jul 7, 2024
1 parent 9ebcd83 commit 853e11f
Show file tree
Hide file tree
Showing 19 changed files with 547 additions and 438 deletions.
39 changes: 28 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,33 @@ on:
release:
types: [created]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "publish"
cancel-in-progress: false

jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
fail-fast: false

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: apt-get update
run: sudo apt-get update -y
- name: pages
uses: actions/configure-pages@v5


- name: set up python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version-file: ".python-version"
cache: "pip"
cache-dependency-path: "pyproject.toml"

Expand All @@ -33,8 +40,18 @@ jobs:
- name: build
run: inv build

- name: publish
- name: publish pypi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }}
run: inv publish
run: inv publish

- name: generate docs
run: inv docs

- uses: actions/upload-pages-artifact@v3
with:
path: _site/arcee

- id: publish-docs
uses: actions/deploy-pages@v4
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Generated docs
_site

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -133,4 +136,4 @@ EleutherAI
*.csv
*.jsonl

env
env
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# Arcee Client Docs
# Arcee Python Client

The Arcee client for executing domain-adpated language model routines
> The Arcee Python client allows you to manage CPT, SFT, DPO, and Merge models on the Arcee Platform.
This client may be used as a CLI by invoking `arcee` from the terminal, or as an SDK for programmatic use by `import arcee` in Python.

Learn more at https://docs.arcee.ai

## Installation

```
pip install arcee-py
pip install --upgrade arcee-py
```

## Authenticating

Your Arcee API key is obtained at app.arcee.ai
Your Arcee API key is obtained at https://app.arcee.ai

In bash:

Expand Down Expand Up @@ -68,9 +72,9 @@ NOTE: you will need to set `HUGGINGFACE_TOKEN` in your environment to use this f

```
arcee.api.upload_hugging_face_dataset_qa_pairs(
"my_qa_pairs",
hf_dataset_id="org/dataset",
dataset_split="train",
"my_qa_pairs",
hf_dataset_id="org/dataset",
dataset_split="train",
data_format="chatml"
)
```
Expand Down
6 changes: 2 additions & 4 deletions arcee/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.2.2"
__version__ = "1.3.0"

import os

Expand Down Expand Up @@ -28,10 +28,8 @@

if not config.ARCEE_API_KEY:
# We check this because it's impossible the user imported arcee, _then_ set the env, then imported again
# We don't want to block or prompt here because this will interfere with CLI usage
config.ARCEE_API_KEY = os.getenv("ARCEE_API_KEY", "")
while not config.ARCEE_API_KEY:
config.ARCEE_API_KEY = input("ARCEE_API_KEY not found in environment. Please input api key: ")
os.environ["ARCEE_API_KEY"] = config.ARCEE_API_KEY

__all__ = [
"upload_docs",
Expand Down
Loading

0 comments on commit 853e11f

Please sign in to comment.