Skip to content

Commit cd3411c

Browse files
authored
Merge branch 'main' into predictor
2 parents dadd2b0 + 2b3e681 commit cd3411c

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/edgeml/edgeml.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@ def sendDataset(url: str, key: str, dataset: dict):
3333
#
3434

3535
def getProject(url: str, key: str):
36+
print('fetching project...')
3637
res = req.post(url + getProjectEndpoint, json = {"key": key})
37-
return res.json()
38+
if res.ok:
39+
return res.json()
40+
if res.status_code == 403:
41+
raise RuntimeError("Invalid key")
42+
raise RuntimeError(res.reason)
3843

3944
def __extractLabels(dataset):
4045
labels = dataset['labels']
@@ -166,5 +171,3 @@ def onComplete(self):
166171
if self.error:
167172
raise self.error
168173
self.__upload()
169-
170-
getDataFrames("https://app.edge-ml.org", "KVH0X0i9GIM/aP6IUPcr88iSaCRhh8uTWsnyrz5651X7fbvPFXrU/qoFCEgCVEv/xMZA4QDaNWpaeVypImfMsw==")

0 commit comments

Comments
 (0)