Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Removes stuff that now lives in the tango repo (#5482)
Browse files Browse the repository at this point in the history
* Removes Tango from AllenNLP

* Changelog

* Remove det_hash

* Remove some dependencies we no longer need

* Overzealous removing of deps

* Temporarily run CI against another branch in -models

* Tango needs this version of overrides

* We moved this to Tango.

* Updates for the new overrides package

* Make the automatic checks happy

* Revert "Make the automatic checks happy"

This reverts commit dbd7310.

* Revert "Updates for the new overrides package"

This reverts commit bac285a.

* Revert "Tango needs this version of overrides"

This reverts commit 60be018.

* Unused import

* Removes tango warning filter

* Mypy fixes

* Update .github/workflows/ci.yml

Co-authored-by: Pete <petew@allenai.org>

Co-authored-by: Pete <petew@allenai.org>
  • Loading branch information
dirkgr and epwalsh authored Jan 13, 2022
1 parent 1278f16 commit 73a5cfc
Show file tree
Hide file tree
Showing 28 changed files with 8 additions and 2,972 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

- Removed dependency on the overrides package

- Removed Tango components, since they now live at https://github.com/allenai/tango.
- Removed dependency on the `overrides` package

## [v2.8.0](https://github.com/allenai/allennlp/releases/tag/v2.8.0) - 2021-11-01

Expand Down
7 changes: 0 additions & 7 deletions allennlp/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import logging
import os
import sys
import warnings


if os.environ.get("ALLENNLP_DEBUG"):
Expand Down Expand Up @@ -31,12 +30,6 @@ def _transformers_log_filter(record):


def run():
# We issue a seperate warning from the tango command and ignore this one so that
# users won't see a Tango warning when they're not using the Tango command.
warnings.filterwarnings(
"ignore", category=UserWarning, message="AllenNLP Tango", module=r"allennlp\.tango"
)

from allennlp.commands import main # noqa
from allennlp.common.util import install_sigterm_handler

Expand Down
1 change: 0 additions & 1 deletion allennlp/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from allennlp.commands.train import Train
from allennlp.commands.push_to_hf import PushToHf
from allennlp.commands.count_instances import CountInstances
from allennlp.commands.tango import Tango
from allennlp.common.plugins import import_plugins
from allennlp.common.util import import_module_and_submodules
from allennlp.commands.checklist import CheckList
Expand Down
158 changes: 0 additions & 158 deletions allennlp/commands/tango.py

This file was deleted.

105 changes: 0 additions & 105 deletions allennlp/common/det_hash.py

This file was deleted.

8 changes: 0 additions & 8 deletions allennlp/common/file_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""
Utilities for working with the local dataset cache.
"""
import string
import weakref
from contextlib import contextmanager
import glob
Expand Down Expand Up @@ -602,13 +601,6 @@ def inspect_cache(patterns: List[str] = None, cache_dir: Union[str, Path] = None
print(f"\nTotal size: {format_size(total_size)}")


SAFE_FILENAME_CHARS = frozenset("-_.%s%s" % (string.ascii_letters, string.digits))


def filename_is_safe(filename: str) -> bool:
return all(c in SAFE_FILENAME_CHARS for c in filename)


def hardlink_or_copy(source: PathOrStr, dest: PathOrStr):
try:
os.link(source, dest)
Expand Down
Loading

0 comments on commit 73a5cfc

Please sign in to comment.