Skip to content

Commit

Permalink
Merge branch 'main' into evals-api
Browse files Browse the repository at this point in the history
  • Loading branch information
rivinduw authored Oct 8, 2024
2 parents e9a88ef + 3eba717 commit 5e05136
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion arcee/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.3.7"
__version__ = "2.0.1"

import os

Expand Down
16 changes: 6 additions & 10 deletions arcee/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def upload_corpus_folder(corpus: str, s3_folder_url: str, tokenizer_name: str, b
"block_size": block_size,
}

return make_request("post", Route.pretraining + "/corpusUpload", data)
return make_request("post", Route.corpus, data)


def upload_qa_pairs(
Expand Down Expand Up @@ -321,30 +321,26 @@ def merging_status(merging: str) -> Dict[str, str]:
return make_request("get", Route.merging + "/status", data)


def delete_corpus(corpus: str) -> Dict[str, str]:
def delete_corpus(corpus_name: str) -> Dict[str, str]:
"""
Delete a corpus
Args:
corpus (str): The name of the corpus to delete
"""
data = {"corpus_name": corpus_name}
return make_request("delete", Route.corpus, data)

data = {"corpus_name": corpus}

return make_request("post", Route.pretraining + "/deleteCorpus", data)


def corpus_status(corpus: str) -> Dict[str, str]:
def corpus_status(corpus_id: str) -> Dict[str, str]:
"""
Check the status of a corpus
Args:
corpus (str): The name of the corpus to check the status
"""

data = {"corpus_name": corpus}

return make_request("post", Route.pretraining + "/corpus/status", data)
return make_request("get", Route.corpus + f"/status/{corpus_id}")


def start_alignment(
Expand Down
1 change: 1 addition & 0 deletions arcee/schemas/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ class Route(StrEnum):
merging = "merging"
retriever = "models"
evaluation = "evaluation"
corpus = "pretraining/corpus"

0 comments on commit 5e05136

Please sign in to comment.