Skip to content

Error while running the training script. #12

@LarrySil

Description

@LarrySil

Hi,
I get an error like this when trying to run the training:

  • Traceback (most recent call last):
  • File "c:\TreeCrownDelineation\TreeCrownDelineation\examples\training_example.py", line 88, in
  • trainer.fit(model, data)
    
  • File "C:\Users\samul\Anaconda\envs\TCD\Lib\site-packages\pytorch_lightning\trainer\trainer.py", line 543, in fit
  • call._call_and_handle_interrupt(
    
  • File "C:\Users\samul\Anaconda\envs\TCD\Lib\site-packages\pytorch_lightning\trainer\call.py", line 44, in _call_and_handle_interrupt
  • return trainer_fn(*args, **kwargs)
    
  •        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
  • File "C:\Users\samul\Anaconda\envs\TCD\Lib\site-packages\pytorch_lightning\trainer\trainer.py", line 579, in _fit_impl
  • self._run(model, ckpt_path=ckpt_path)
    
  • File "C:\Users\samul\Anaconda\envs\TCD\Lib\site-packages\pytorch_lightning\trainer\trainer.py", line 948, in _run
  • call._call_setup_hook(self)  # allow user to set up LightningModule in accelerator environment
    
  • ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
  • File "C:\Users\samul\Anaconda\envs\TCD\Lib\site-packages\pytorch_lightning\trainer\call.py", line 94, in _call_setup_hook
  • _call_lightning_datamodule_hook(trainer, "setup", stage=fn)
    
  • File "C:\Users\samul\Anaconda\envs\TCD\Lib\site-packages\pytorch_lightning\trainer\call.py", line 181, in _call_lightning_datamodule_hook
  • return fn(*args, **kwargs)
    
  •        ^^^^^^^^^^^^^^^^^^^
    
  • TypeError: InMemoryDataModule.setup() got an unexpected keyword argument 'stage'

Tried adding the "stage" argument to the setup function, but this does not seem to fix the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions