-
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
27 changed files
with
370 additions
and
37 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
Empty file.
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,13 @@ | ||
from typing import Any, Callable, Sequence | ||
|
||
|
||
def parse_flags_with_usage(argv: Sequence[str]) -> Sequence[str]: | ||
return argv | ||
|
||
|
||
def run( | ||
main: Callable[..., Any], | ||
argv: list[str] | None = None, | ||
flags_parser: Callable[[list[str]], Any] = parse_flags_with_usage, | ||
) -> None: | ||
pass |
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,12 @@ | ||
class FLAGS(object): | ||
gin_search_paths: list[str] | ||
gin_file: list[str] | ||
gin_bindings: list[str] | ||
|
||
|
||
def DEFINE_multi_string(name: str, default: list[str] | None, help: str) -> None: | ||
pass | ||
|
||
|
||
def DEFINE_list(name: str, default: list[str] | None, help: str) -> None: | ||
pass |
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,62 @@ | ||
import enum | ||
from dataclasses import dataclass | ||
from typing import ( | ||
Any, | ||
Dict, | ||
Mapping, | ||
Optional, | ||
Sequence, | ||
TypeVar, | ||
Union, | ||
) | ||
|
||
|
||
class Split(enum.Enum): ... | ||
|
||
|
||
class DownloadMode(enum.Enum): ... | ||
|
||
|
||
class VerificationMode(enum.Enum): ... | ||
|
||
|
||
@dataclass | ||
class Version: ... | ||
|
||
|
||
class DatasetDict(dict[Any, Any]): ... | ||
|
||
|
||
Features = TypeVar("Features", bound=dict[str, Any]) | ||
DownloadConfig = TypeVar("DownloadConfig", bound=Any) # improve when used | ||
Dataset = TypeVar("Dataset", bound=Any) | ||
IterableDatasetDict = TypeVar("IterableDatasetDict", bound=dict[Any, Any]) | ||
IterableDataset = TypeVar("IterableDataset", bound=Any) | ||
|
||
|
||
def load_dataset( | ||
path: str, | ||
name: Optional[str] = None, | ||
data_dir: Optional[str] = None, | ||
data_files: Optional[ | ||
Union[str, Sequence[str], Mapping[str, Union[str, Sequence[str]]]] | ||
] = None, | ||
split: Optional[Union[str, Split]] = None, | ||
cache_dir: Optional[str] = None, | ||
features: Optional[Features] = None, | ||
download_config: Optional[DownloadConfig] = None, | ||
download_mode: Optional[Union[DownloadMode, str]] = None, | ||
verification_mode: Optional[Union[VerificationMode, str]] = None, | ||
ignore_verifications: str = "deprecated", | ||
keep_in_memory: Optional[bool] = None, | ||
save_infos: bool = False, | ||
revision: Optional[Union[str, Version]] = None, | ||
token: Optional[Union[bool, str]] = None, | ||
use_auth_token: str = "deprecated", | ||
task: str = "deprecated", | ||
streaming: bool = False, | ||
num_proc: Optional[int] = None, | ||
storage_options: Optional[Dict[Any, Any]] = None, | ||
**config_kwargs: Any, | ||
) -> Union[DatasetDict, Dataset, IterableDatasetDict, IterableDataset]: | ||
raise NotImplementedError |
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,22 @@ | ||
from typing import Any, Callable, TypeVar | ||
|
||
T = TypeVar("T", bound=Callable[..., Any]) | ||
|
||
|
||
def configurable(fn: T) -> T: | ||
return fn | ||
|
||
|
||
REQUIRED: object | ||
|
||
|
||
def config_str() -> str: | ||
return "" | ||
|
||
|
||
def parse_config_files_and_bindings(*_: Any, **__: Any) -> None: | ||
pass | ||
|
||
|
||
def add_config_file_search_path(_: Any) -> None: | ||
pass |
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,5 @@ | ||
class Logger(object): | ||
def info(self, msg: str) -> None: ... | ||
|
||
|
||
logger = Logger() |
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,4 @@ | ||
class Logger(object): | ||
def info(self, msg: str) -> None: ... | ||
|
||
logger = Logger() |
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,2 @@ | ||
def get_first_name() -> str: | ||
raise NotImplementedError |
Empty file.
Oops, something went wrong.