Giter Club home page Giter Club logo

speaker-change-detection's Issues

TypeError: cannot pickle '_thread.RLock' object

Hi, thanks for your code.
But I got error when run the code.
I setup the AMI dataset by AMI-diarization-setup and didn't change any code.
Run python train.py and got following error messages:

GPU available: True, used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
Traceback (most recent call last):
  File "train.py", line 41, in <module>
    trainer.fit(model, datamodule=dm)
  File "/home/trainer/miniconda3/envs/ulypy38/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 770, in fit
    self._call_and_handle_interrupt(
  File "/home/trainer/miniconda3/envs/ulypy38/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 721, in _call_and_handle_interrupt
    return self.strategy.launcher.launch(trainer_fn, *args, trainer=self, **kwargs)
  File "/home/trainer/miniconda3/envs/ulypy38/lib/python3.8/site-packages/pytorch_lightning/strategies/launchers/spawn.py", line 78, in launch
    mp.spawn(
  File "/home/trainer/miniconda3/envs/ulypy38/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 240, in spawn
    return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
  File "/home/trainer/miniconda3/envs/ulypy38/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 189, in start_processes
    process.start()
  File "/home/trainer/miniconda3/envs/ulypy38/lib/python3.8/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/home/trainer/miniconda3/envs/ulypy38/lib/python3.8/multiprocessing/context.py", line 284, in _Popen
    return Popen(process_obj)
  File "/home/trainer/miniconda3/envs/ulypy38/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/home/trainer/miniconda3/envs/ulypy38/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/home/trainer/miniconda3/envs/ulypy38/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)
  File "/home/trainer/miniconda3/envs/ulypy38/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
TypeError: cannot pickle '_thread.RLock' object

Please help me to solve this problem.
Thank you.

Problem with auroc classifier constructor

I got the following error when running train.py

Traceback (most recent call last):
  File "c:\Users\USER\speaker-change-detection\train.py", line 24, in <module>
    model = SSCDModel(batch_size=BATCH_SIZE, scd=DO_SCD, use_transformer=False)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\USER\speaker-change-detection\model.py", line 94, in __init__
    AUROC(
  File "C:\Users\USER\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchmetrics\classification\auroc.py", line 370, in __new__
    raise ValueError(
ValueError: Expected argument `task` to either be `'binary'`, `'multiclass'` or `'multilabel'` but got 293

When clicking on the error line I found the following code:

AUROC(
                    self.num_frames if self.scd else self.num_classes,
                    pos_label=1,
                    average="macro",
                    compute_on_step=False,
                ),

and the AUROC constructor requires 'task' parameter which must be one of ["binary", "multiclass", "multilabel"]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.