-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
169 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
from airtrain.client import set_api_key # noqa: F401 | ||
from airtrain.core import DatasetMetadata, upload_from_dicts # noqa: F401 | ||
from airtrain.core import ( # noqa: F401 | ||
DatasetMetadata, | ||
upload_from_arrow_tables, | ||
upload_from_dicts, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
from airtrain.core import DatasetMetadata, upload_from_dicts | ||
import pytest | ||
|
||
from airtrain.client import AuthenticationError | ||
from airtrain.core import upload_from_dicts | ||
|
||
|
||
def test_upload_from_dicts(): | ||
result = upload_from_dicts([{"foo": 42}, {"foo": 43}], name="Foo dataset") | ||
assert isinstance(result, DatasetMetadata) | ||
with pytest.raises(AuthenticationError): | ||
upload_from_dicts([{"foo": 42}, {"foo": 43}], name="Foo dataset") |