Skip to content

Commit

Permalink
Mod: Update aac-metrics info.
Browse files Browse the repository at this point in the history
  • Loading branch information
Labbeti committed Jul 10, 2023
1 parent fd96562 commit 525f3cd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/aac_metrics/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
import aac_metrics


def get_package_repository_path() -> str:
return str(Path(__file__).parent.parent.parent)


def get_install_info() -> Dict[str, str]:
"""Return a dictionary containing the version python, the os name, the architecture name and the versions of the following packages: aac_datasets, torch, torchaudio."""
return {
Expand All @@ -21,19 +25,14 @@ def get_install_info() -> Dict[str, str]:
"os": platform.system(),
"architecture": platform.architecture()[0],
"torch": str(torch.__version__),
"package_path": get_package_repository_path(),
}


def get_package_repository_path() -> str:
return str(Path(__file__).parent.parent.parent)


def print_install_info() -> None:
"""Show main packages versions."""
install_info = get_install_info()
pkg_repo_path = get_package_repository_path()
print(yaml.dump(install_info, sort_keys=False))
print("Package source path:", pkg_repo_path)


if __name__ == "__main__":
Expand Down

0 comments on commit 525f3cd

Please sign in to comment.