-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👽 Remove allenai-common
- Loading branch information
Showing
21 changed files
with
2,428 additions
and
1,099 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,4 @@ | ||
from turbo_alignment.common.registry.from_params import FromParams | ||
from turbo_alignment.common.registry.lazy import Lazy | ||
from turbo_alignment.common.registry.params import Params | ||
from turbo_alignment.common.registry.registrable import Registrable |
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,17 @@ | ||
# mypy: ignore-errors | ||
import logging | ||
from typing import Any | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class ConfigurationError(Exception): | ||
def __reduce__(self) -> str | tuple[Any, ...]: | ||
return type(self), (self.message,) | ||
|
||
def __init__(self, message: str): | ||
super().__init__() | ||
self.message = message | ||
|
||
def __str__(self): | ||
return self.message |
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,24 @@ | ||
# mypy: ignore-errors | ||
import logging | ||
import os | ||
from pathlib import Path | ||
|
||
import cached_path as _cached_path | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def cached_path( | ||
url_or_filename: str | os.PathLike, | ||
cache_dir: str | Path = None, | ||
extract_archive: bool = False, | ||
force_extract: bool = False, | ||
) -> str: | ||
return str( | ||
_cached_path.cached_path( | ||
url_or_filename, | ||
cache_dir=cache_dir, | ||
extract_archive=extract_archive, | ||
force_extract=force_extract, | ||
) | ||
) |
Oops, something went wrong.