drprojects / superpoint_transformer

Official PyTorch implementation of Superpoint Transformer introduced in [ICCV'23] "Efficient 3D Semantic Segmentation with Superpoint Transformer" and SuperCluster introduced in [3DV'24 Oral] "Scalable 3D Panoptic Segmentation As Superpoint Graph Clustering"
MIT License
601 stars 75 forks source link

Project root directory not found. Indicators: ('.project-root', 'setup.cfg', 'setup.py', '.git', 'pyproject.toml') #23

Closed WS517 closed 1 year ago

WS517 commented 1 year ago

Hello, I am running pyrootutils.setup_ root(".", pythonpath=True).The error reported during root code is as follows:Project root directory not found. Indicators: ('.project-root', 'setup.cfg', 'setup.py', '.git', 'pyproject.toml') How to solve it?

drprojects commented 1 year ago

Hello, thanks for your interest in the project.

WS517 commented 1 year ago

Hello, thanks for your interest in the project.

  • what command are you executing, exactly ?
  • please provide the full traceback
  • have you made any modification (even minor) to the project ?
  • what is your pyrootutils version ?

I apologize for not articulating my question clearly.I'm trying to visualize the results, but when running demo_dales.ipynb, the above error is reported when initializing the cfg, and my version of pyrootutils is 1.0.4.This seems like a path problem but I don't know how to solve it, I would be honored if you could offer some help.

drprojects commented 1 year ago

Your pyrootutils version seems fine.

WS517 commented 1 year ago

Your pyrootutils version seems fine.

  • please provide the full traceback
  • have you made any modification (even minor) to the project ?
  • do you have a .git in your project folder root ?
  • are you working in a Docker environment ?

I changed the demo_dals.ipynb file to a .py file and put it in pycharm to run, and I can be sure that my virtual environment is correct since I've done the training and evaluation. When I want to try to visualize the results, the compiler prompts: project root directory not found. indicators: ('.project-root', 'setup.cfg', 'setup.py', '.git', 'pyproject.toml'). I don't know how to fix this bug,I don't have .git in my project because I'm not quite sure what it's for.

drprojects commented 1 year ago

If you installed the project using git clone https://github.com/drprojects/superpoint_transformer.git, you should have a .git in the root of the project. This hidden folder is used by git for code versioning. I strongly recommend using git in your coding projects.

The pyrootutils library uses some specific files to identify the root path of the project. Please do not delete files from the provided source code. I suggest your restore all files from the initial projects before testing again.

Besides, managing paths for hydra, omegaconf, and pyrootutils may require some knowledge of those libraries. I cannot guarantee that your ipynb -> .py conversion will work. In particular, you will need to be careful in which directory you place your .py file. You may also need to consider adapting your paths for local imports to work properly. See the commented line in the notebooks:

# file_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))  # for .py script
file_path = os.path.dirname(os.path.abspath(''))  # for .ipynb notebook
drprojects commented 1 year ago

Without reply from you, I am assuming the issue is solved.