Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summarize the question. AttributeError: 'ConfigDict' object has no attribute 'ckpt_path' #662

Open
3 tasks done
sarabi5 opened this issue Oct 30, 2024 · 0 comments
Open
3 tasks done
Labels
question Further information is requested

Comments

@sarabi5
Copy link

sarabi5 commented Oct 30, 2024

Checklist

My Question

I am getting an error of "
AttributeError: 'ConfigDict' object has no attribute 'ckpt_path'" for the last line of the code. Here is my code: import open3d.ml as _ml3d
import open3d.ml.torch as ml3d # or open3d.ml.tf as ml3d

framework = "torch" # or tf
cfg_file = "/content/Open3D-ML/ml3d/configs/pvcnn_s3dis.yml"
cfg = _ml3d.utils.Config.load_from_file(cfg_file)

fetch the classes by the name

Pipeline = _ml3d.utils.get_module("pipeline", cfg.pipeline.name, framework)
Model = _ml3d.utils.get_module("model", cfg.model.name, framework)
Dataset = _ml3d.utils.get_module("dataset", cfg.dataset.name)

use the arguments in the config file to construct the instances

cfg.dataset['dataset_path'] = "/content/drive/MyDrive/S3DIS/Stanford3dDataset_v1.2_Aligned_Version-sample"
dataset = Dataset(cfg.dataset.pop('dataset_path', None), **cfg.dataset)
model = Model(**cfg.model)
pipeline = Pipeline(model, dataset, **cfg.pipeline)
import open3d.ml.torch as ml3d
from open3d.ml.torch.models import PVCNN
from open3d.ml.torch.pipelines import SemanticSegmentation

use a cache for storing the results of the preprocessing (default path is './logs/cache')

dataset = ml3d.datasets.S3DIS(dataset_path='/content/drive/MyDrive/S3DIS/Stanford3dDataset_v1.2_Aligned_Version-sample',ckpt_path="/content/drive/MyDrive/S3DIS/checkpoint", use_cache=True )

create the model with random initialization.

model = PVCNN()

pipeline = SemanticSegmentation(model=model, dataset=dataset, **cfg.pipeline)

prints training progress in the console.

pipeline.run_train()

@sarabi5 sarabi5 added the question Further information is requested label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant