-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Project import generated by Copybara. (#95)
GitOrigin-RevId: 42f68c299b1a73edc54baccd7cc25743116f565f Co-authored-by: Snowflake Authors <[email protected]>
- Loading branch information
1 parent
fbebee7
commit b1cfe76
Showing
59 changed files
with
2,158 additions
and
635 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
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
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
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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
DATASET_ALREADY_EXISTS = "Dataset {}/{} already exists." |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Error code from Snowflake Python Connector. | ||
ERRNO_FILE_EXIST_IN_STAGE = "001030" | ||
ERRNO_DOMAIN_NOT_EXIST = "002003" | ||
ERRNO_STAGE_NOT_EXIST = "391707" | ||
|
||
|
||
class DatasetError(Exception): | ||
"""Base class for other exceptions.""" | ||
|
||
|
||
class DatasetNotExistError(DatasetError): | ||
"""Raised when the requested Dataset does not exist.""" | ||
|
||
|
||
class DatasetExistError(DatasetError): | ||
"""Raised when there is already an existing Dataset with the same name and version in selected schema.""" | ||
|
||
|
||
class DatasetLocationError(DatasetError): | ||
"""Raised when the given location to the Dataset is invalid.""" | ||
|
||
|
||
class DatasetCannotDeleteError(DatasetError): | ||
"""Raised when a Dataset is unable to get deleted.""" | ||
|
||
|
||
class DatasetIntegrityError(DatasetError): | ||
"""Raised when the Dataset contains invalid or unrecognized files.""" | ||
|
||
|
||
class DatasetInvalidSourceError(DatasetError, ValueError): | ||
"""Raised when trying to create a Dataset from an invalid data source""" |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
load("//bazel:py_rules.bzl", "py_library", "py_test") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
filegroup( | ||
name = "hrid_words", | ||
srcs = [ | ||
"adjectives.txt", | ||
"animals.txt", | ||
], | ||
) | ||
|
||
py_library( | ||
name = "hrid_generator_base", | ||
srcs = ["hrid_generator_base.py"], | ||
) | ||
|
||
py_library( | ||
name = "hrid_generator", | ||
srcs = ["hrid_generator.py"], | ||
data = [ | ||
":hrid_words", | ||
], | ||
deps = [ | ||
":hrid_generator_base", | ||
], | ||
) | ||
|
||
py_test( | ||
name = "hrid_generator_test", | ||
srcs = ["hrid_generator_test.py"], | ||
deps = [ | ||
":hrid_generator", | ||
"//snowflake/ml/_internal/utils:sql_identifier", | ||
], | ||
) |
128 changes: 128 additions & 0 deletions
128
snowflake/ml/_internal/human_readable_id/adjectives.txt
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 |
---|---|---|
@@ -0,0 +1,128 @@ | ||
afraid | ||
ancient | ||
angry | ||
average | ||
bad | ||
big | ||
bitter | ||
black | ||
blue | ||
brave | ||
breezy | ||
bright | ||
brown | ||
calm | ||
chatty | ||
chilly | ||
clever | ||
cold | ||
cowardly | ||
cuddly | ||
curly | ||
curvy | ||
dangerous | ||
dry | ||
dull | ||
empty | ||
evil | ||
fast | ||
fat | ||
fluffy | ||
foolish | ||
fresh | ||
friendly | ||
funny | ||
gentle | ||
giant | ||
good | ||
great | ||
green | ||
grumpy | ||
happy | ||
hard | ||
heavy | ||
helpless | ||
honest | ||
horrible | ||
hot | ||
hungry | ||
itchy | ||
jolly | ||
kind | ||
lazy | ||
light | ||
little | ||
loud | ||
lovely | ||
lucky | ||
massive | ||
mean | ||
mighty | ||
modern | ||
moody | ||
nasty | ||
neat | ||
nervous | ||
new | ||
nice | ||
odd | ||
old | ||
orange | ||
ordinary | ||
perfect | ||
pink | ||
plastic | ||
polite | ||
popular | ||
pretty | ||
proud | ||
purple | ||
quick | ||
quiet | ||
rare | ||
red | ||
rotten | ||
rude | ||
selfish | ||
serious | ||
shaggy | ||
sharp | ||
short | ||
shy | ||
silent | ||
silly | ||
slimy | ||
slippery | ||
smart | ||
smooth | ||
soft | ||
sour | ||
spicy | ||
splendid | ||
spotty | ||
stale | ||
strange | ||
strong | ||
stupid | ||
sweet | ||
swift | ||
tall | ||
tame | ||
tasty | ||
tender | ||
terrible | ||
thin | ||
tidy | ||
tiny | ||
tough | ||
tricky | ||
ugly | ||
warm | ||
weak | ||
wet | ||
wicked | ||
wise | ||
witty | ||
wonderful | ||
yellow | ||
young |
Oops, something went wrong.