Skip to content

Instantly share code, notes, and snippets.

@wookim3
Created January 31, 2020 15:42
Show Gist options
  • Save wookim3/59335ba41533f46a3b20a46fb46a683d to your computer and use it in GitHub Desktop.
Save wookim3/59335ba41533f46a3b20a46fb46a683d to your computer and use it in GitHub Desktop.
import os
from omegaconf import DictConfig
import hydra
@hydra.main()
def my_app(_cfg: DictConfig) -> None:
print(f"Current working directory : {os.getcwd()}")
print(f"Orig working directory : {hydra.utils.get_original_cwd()}")
print(f"to_absolute_path('foo') : {hydra.utils.to_absolute_path('foo')}")
print(f"to_absolute_path('/foo') : {hydra.utils.to_absolute_path('/foo')}")
if __name__ == "__main__":
my_app()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment