torch_to_nnef.collect_env
Used to collect environment status/versions for debuging purpose.
Functions:
| Name | Description |
|---|---|
check_release_file |
Read /etc/*-release file to get a pretty name for linux distros. |
dump_environment_versions |
Dumps software versions to a file 'versions' in the given folder. |
get_gcc_version |
Returns the GCC version string, or None if gcc is not found. |
get_hostname |
Returns the system hostname. |
get_lsb_version |
Returns lsb_release Description output like 'Ubuntu 20.04.6 LTS'. |
get_mac_version |
Returns macOS version like '10.14.6'. |
get_os |
Returns a pretty string describing the OS. |
get_pip_packages |
Returns |
get_platform |
Returns a simplified platform name. |
get_uname |
Returns the output of |
get_user |
OS current user name, or empty string if it cannot be determined. |
get_windows_version |
Returns Windows version like 'Microsoft Windows 10 Pro'. |
python_version |
Returns a one-liner with python version and bitness. |
run_and_parse_first_match |
Runs command, returns the first regex match if it exists. |
run_and_read_all |
Runs command; reads and returns entire output if rc is 0. |
run_lambda |
Returns (return-code, stdout, stderr). |
check_release_file
Read /etc/*-release file to get a pretty name for linux distros.
dump_environment_versions
Dumps software versions to a file 'versions' in the given folder.
get_pip_packages
Returns pip list output.
Note: will also find conda-installed pytorch and numpy packages.
run_and_parse_first_match
Runs command, returns the first regex match if it exists.
run_and_read_all
Runs command; reads and returns entire output if rc is 0.