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

AttributeError: module aesara.tensor has no attribute nnet #477

Open
borrascador opened this issue Jul 23, 2024 · 1 comment
Open

AttributeError: module aesara.tensor has no attribute nnet #477

borrascador opened this issue Jul 23, 2024 · 1 comment

Comments

@borrascador
Copy link

borrascador commented Jul 23, 2024

Platform: M1 Mac

Reproduction: I tried to transcribe a 500MB .wav file using your software. The models used are the big English model with punctuation detection enabled and speaker separation set to "on". Everything seems to work fine, but then the progress bar freezes at 90% during the punctuation detection step. No errors are shown to the user, just hangs (and as an aside, showing errors or allowing the user to cancel would be very nice. Nobody likes having to quit and restart!). In the console logs I see the following message: AttributeError: module aesara.tensor has no attribute nnet.

Edit: The program runs to completion if I run again without punctuation detection. Something in the punctuation step definitely seems to be the issue here.

Full logs from the stderr output in the dev console are pasted below:

/Applications/audapolis.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:26244 Download the React DevTools for a better development experience: https://reactjs.org/link/react-devtoolsYou might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq
index.dd18ee4e.js:794 ffmpeg result Object
DevTools failed to load source map: Could not parse content for file:///Applications/audapolis.app/Contents/Resources/app/node_modules/@reduxjs/toolkit/dist/module.js.map: Unexpected end of JSON input
index.dd18ee4e.js:794 server stderr
index.dd18ee4e.js:794 ERROR:    Exception in ASGI application
index.dd18ee4e.js:794 Traceback (most recent call last):
index.dd18ee4e.js:794   File "uvicorn.protocols.http.httptools_impl", line 404, in run_asgi
index.dd18ee4e.js:794     result = await app(  # type: ignore[func-returns-value]
index.dd18ee4e.js:794   File "uvicorn.middleware.proxy_headers", line 78, in __call__
index.dd18ee4e.js:794     return await self.app(scope, receive, send)
index.dd18ee4e.js:794   File "fastapi.applications", line 270, in __call__
index.dd18ee4e.js:794     await super().__call__(scope, receive, send)
index.dd18ee4e.js:794   File "starlette.applications", line 124, in __call__
index.dd18ee4e.js:794     await self.middleware_stack(scope, receive, send)
index.dd18ee4e.js:794   File "starlette.middleware.errors", line 184, in __call__
index.dd18ee4e.js:794     raise exc
index.dd18ee4e.js:794   File "starlette.middleware.errors", line 162, in __call__
index.dd18ee4e.js:794     await self.app(scope, receive, _send)
index.dd18ee4e.js:794   File "starlette.middleware.cors", line 84, in __call__
index.dd18ee4e.js:794     await self.app(scope, receive, send)
index.dd18ee4e.js:794   File "starlette.middleware.exceptions", line 75, in __call__
index.dd18ee4e.js:794     raise exc
index.dd18ee4e.js:794   File "starlette.middleware.exceptions", line 64, in __call__
index.dd18ee4e.js:794     await self.app(scope, receive, sender)
index.dd18ee4e.js:794   File "fastapi.middleware.asyncexitstack", line 21, in __call__
index.dd18ee4e.js:794     raise e
index.dd18ee4e.js:794   File "fastapi.middleware.asyncexitstack", line 18, in __call__
index.dd18ee4e.js:794     await self.app(scope, receive, send)
index.dd18ee4e.js:794   File "starlette.routing", line 680, in __call__
index.dd18ee4e.js:794     await route.handle(scope, receive, send)
index.dd18ee4e.js:794   File "starlette.routing", line 275, in handle
index.dd18ee4e.js:794     await self.app(scope, receive, send)
index.dd18ee4e.js:794   File "starlette.routing", line 68, in app
index.dd18ee4e.js:794     await response(scope, receive, send)
index.dd18ee4e.js:794   File "starlette.responses", line 170, in __call__
index.dd18ee4e.js:794     await self.background()
index.dd18ee4e.js:794   File "starlette.background", line 43, in __call__
index.dd18ee4e.js:794     await task()
index.dd18ee4e.js:794   File "starlette.background", line 28, in __call__
index.dd18ee4e.js:794     await run_in_threadpool(self.func, *self.args, **self.kwargs)
index.dd18ee4e.js:794   File "starlette.concurrency", line 41, in run_in_threadpool
index.dd18ee4e.js:794     return await anyio.to_thread.run_sync(func, *args)
index.dd18ee4e.js:794   File "anyio.to_thread", line 31, in run_sync
index.dd18ee4e.js:794     return await get_asynclib().run_sync_in_worker_thread(
index.dd18ee4e.js:794   File "anyio._backends._asyncio", line 937, in run_sync_in_worker_thread
index.dd18ee4e.js:794     return await future
index.dd18ee4e.js:794   File "anyio._backends._asyncio", line 867, in run
index.dd18ee4e.js:794     result = context.run(func, *args)
index.dd18ee4e.js:794   File "app.transcribe", line 104, in process_audio
index.dd18ee4e.js:794     content = punctuate(task, punctuation_model, content)
index.dd18ee4e.js:794   File "app.transcribe", line 112, in punctuate
index.dd18ee4e.js:794     model = models.get(punctuation_model)
index.dd18ee4e.js:794   File "app.models", line 125, in get
index.dd18ee4e.js:794     self.loaded[model_id] = self._load_model(model)
index.dd18ee4e.js:794   File "app.models", line 115, in _load_model
index.dd18ee4e.js:794     return Punctuator(str(model.path()))
index.dd18ee4e.js:794   File "punctuator.punc", line 209, in __init__
index.dd18ee4e.js:794     net = models.GRU.load_zip(model_file, 1, x)
index.dd18ee4e.js:794   File "punctuator.models", line 343, in load_zip
index.dd18ee4e.js:794     net = cls(
index.dd18ee4e.js:794   File "punctuator.models", line 239, in __init__
index.dd18ee4e.js:794     [h_f_t, h_b_t], _ = aesara.scan(
index.dd18ee4e.js:794   File "aesara.scan.basic", line 856, in scan
index.dd18ee4e.js:794     raw_inner_outputs = fn(*args)
index.dd18ee4e.js:794   File "punctuator.models", line 212, in input_recurrence
index.dd18ee4e.js:794     h_f_t = self.GRU_f.step(x_t=x_f_t, h_tm1=h_f_tm1)
index.dd18ee4e.js:794   File "punctuator.models", line 145, in step
index.dd18ee4e.js:794     rz = T.nnet.basic.sigmoid(T.dot(x_t, self.W_x) + T.dot(h_tm1, self.W_h) + self.b)
index.dd18ee4e.js:794   File "aesara.tensor", line 175, in __getattr__
index.dd18ee4e.js:794     raise AttributeError(f"module {__name__} has no attribute {name}")
index.dd18ee4e.js:794 AttributeError: module aesara.tensor has no attribute nnet
index.dd18ee4e.js:794 ERROR:uvicorn.error:Exception in ASGI application
index.dd18ee4e.js:794 Traceback (most recent call last):
index.dd18ee4e.js:794   File "uvicorn.protocols.http.httptools_impl", line 404, in run_asgi
index.dd18ee4e.js:794     result = await app(  # type: ignore[func-returns-value]
index.dd18ee4e.js:794   File "uvicorn.middleware.proxy_headers", line 78, in __call__
index.dd18ee4e.js:794     return await self.app(scope, receive, send)
index.dd18ee4e.js:794   File "fastapi.applications", line 270, in __call__
index.dd18ee4e.js:794     await super().__call__(scope, receive, send)
index.dd18ee4e.js:794   File "starlette.applications", line 124, in __call__
index.dd18ee4e.js:794     await self.middleware_stack(scope, receive, send)
index.dd18ee4e.js:794   File "starlette.middleware.errors", line 184, in __call__
index.dd18ee4e.js:794     raise exc
index.dd18ee4e.js:794   File "starlette.middleware.errors", line 162, in __call__
index.dd18ee4e.js:794     await self.app(scope, receive, _send)
index.dd18ee4e.js:794   File "starlette.middleware.cors", line 84, in __call__
index.dd18ee4e.js:794     await self.app(scope, receive, send)
index.dd18ee4e.js:794   File "starlette.middleware.exceptions", line 75, in __call__
index.dd18ee4e.js:794     raise exc
index.dd18ee4e.js:794   File "starlette.middleware.exceptions", line 64, in __call__
index.dd18ee4e.js:794     await self.app(scope, receive, sender)
index.dd18ee4e.js:794   File "fastapi.middleware.asyncexitstack", line 21, in __call__
index.dd18ee4e.js:794     raise e
index.dd18ee4e.js:794   File "fastapi.middleware.asyncexitstack", line 18, in __call__
index.dd18ee4e.js:794     await self.app(scope, receive, send)
index.dd18ee4e.js:794   File "starlette.routing", line 680, in __call__
index.dd18ee4e.js:794     await route.handle(scope, receive, send)
index.dd18ee4e.js:794   File "starlette.routing", line 275, in handle
index.dd18ee4e.js:794     await self.app(scope, receive, send)
index.dd18ee4e.js:794   File "starlette.routing", line 68, in app
index.dd18ee4e.js:794     await response(scope, receive, send)
index.dd18ee4e.js:794   File "starlette.responses", line 170, in __call__
index.dd18ee4e.js:794     await self.background()
index.dd18ee4e.js:794   File "starlette.background", line 43, in __call__
index.dd18ee4e.js:794     await task()
index.dd18ee4e.js:794   File "starlette.background", line 28, in __call__
index.dd18ee4e.js:794     await run_in_threadpool(self.func, *self.args, **self.kwargs)
index.dd18ee4e.js:794   File "starlette.concurrency", line 41, in run_in_threadpool
index.dd18ee4e.js:794     return await anyio.to_thread.run_sync(func, *args)
index.dd18ee4e.js:794   File "anyio.to_thread", line 31, in run_sync
index.dd18ee4e.js:794     return await get_asynclib().run_sync_in_worker_thread(
index.dd18ee4e.js:794   File "anyio._backends._asyncio", line 937, in run_sync_in_worker_thread
index.dd18ee4e.js:794     return await future
index.dd18ee4e.js:794   File "anyio._backends._asyncio", line 867, in run
index.dd18ee4e.js:794     result = context.run(func, *args)
index.dd18ee4e.js:794   File "app.transcribe", line 104, in process_audio
index.dd18ee4e.js:794     content = punctuate(task, punctuation_model, content)
index.dd18ee4e.js:794   File "app.transcribe", line 112, in punctuate
index.dd18ee4e.js:794     model = models.get(punctuation_model)
index.dd18ee4e.js:794   File "app.models", line 125, in get
index.dd18ee4e.js:794     self.loaded[model_id] = self._load_model(model)
index.dd18ee4e.js:794   File "app.models", line 115, in _load_model
index.dd18ee4e.js:794     return Punctuator(str(model.path()))
index.dd18ee4e.js:794   File "punctuator.punc", line 209, in __init__
index.dd18ee4e.js:794     net = models.GRU.load_zip(model_file, 1, x)
index.dd18ee4e.js:794   File "punctuator.models", line 343, in load_zip
index.dd18ee4e.js:794     net = cls(
index.dd18ee4e.js:794   File "punctuator.models", line 239, in __init__
index.dd18ee4e.js:794     [h_f_t, h_b_t], _ = aesara.scan(
index.dd18ee4e.js:794   File "aesara.scan.basic", line 856, in scan
index.dd18ee4e.js:794     raw_inner_outputs = fn(*args)
index.dd18ee4e.js:794   File "punctuator.models", line 212, in input_recurrence
index.dd18ee4e.js:794     h_f_t = self.GRU_f.step(x_t=x_f_t, h_tm1=h_f_tm1)
index.dd18ee4e.js:794   File "punctuator.models", line 145, in step
index.dd18ee4e.js:794     rz = T.nnet.basic.sigmoid(T.dot(x_t, self.W_x) + T.dot(h_tm1, self.W_h) + self.b)
index.dd18ee4e.js:794   File "aesara.tensor", line 175, in __getattr__
index.dd18ee4e.js:794     raise AttributeError(f"module {__name__} has no attribute {name}")
index.dd18ee4e.js:794 AttributeError: module aesara.tensor has no attribute nnet
index.dd18ee4e.js:794 
@bsharper
Copy link

This is the error I'm seeing, and it happens on both macOS (x86) and Windows 11. Transcription model doesn't seem to make a difference (tried with small and lgraph). Gets to 90% and stops, resource utilization (other than memory) drops to zero and no further progress is made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants