utils.py π§ΒΆ
Source: LION/utils/utils.py
Warning
This file has not yet received a complete narrative and docstring audit. Its public source-level API is listed automatically below.
- class JSONParamEncoder
No docstring is available.
- JSONParamEncoder.default(self, obj)
Default converter for JSON serialization.
Handles common non-JSON types used in LION and converts them to JSON-serialisable Python types.
- get_git_revision_hash() str
Gets git commit hash
- run_cmd(cmd, verbose=True, *args, **kwargs)
No docstring is available.
- check_if_file_changed_git(fname, hash1, hash2) bool
No docstring is available.
- custom_format_warning(msg, *args, **kwargs)
No docstring is available.
- str2bool(v)
No docstring is available.
- unzip_file(zipped_file_path: Path, unzipped_file_path: Path) None
Unzip file. First tries unzip command then 7zip if unzip fails
- download_file(placeholder_url: str, file_path: Path) None
Downloads file from placeholder_url. Tries first with wget, then with curl.