in genai-on-vertex-ai/gemini/evals_playbook/utils/config.py [0:0]
def is_root_dir():
"""
Checks if the current working directory is the root directory of a project
by looking for either the "/notebooks" or "/agents" folders.
Returns:
bool: True if either directory exists in the current directory, False otherwise.
"""
current_dir = os.getcwd()
# print("current dir: ", current_dir)
notebooks_path = os.path.join(current_dir, "notebooks")
agents_path = os.path.join(current_dir, "agents")
return os.path.exists(notebooks_path) or os.path.exists(agents_path)