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

Add reset button to footer #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add reset button to footer #24

wants to merge 1 commit into from

Conversation

harrykeightley
Copy link
Contributor

Closes #16

@nicklambourne
Copy link
Contributor

It's good practice to include screenshots of UI changes so reviewers can understand the UI impact without having to pull the branch and spin up the app, can you do so here, please?

@harrykeightley
Copy link
Contributor Author

It's good practice to include screenshots of UI changes so reviewers can understand the UI impact without having to pull the branch and spin up the app, can you do so here, please?

reset_button

Copy link
Contributor

@benfoley benfoley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, one minor question about whether we should show the error message if reset fails

setModels([]);
setTranscriptions([]);
} else {
console.error('Error resetting app');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth showing the error message to help diagnose if the reset failed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can make this an alert if you'd prefer for all users to see this (which I don't think any will be still). For context, the only way the request is going to fail here should be if the server container is down. The server container also get's restarted immediately if it ever goes down.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's fine then. No need to propagate that error.

@benfoley
Copy link
Contributor

benfoley commented Nov 21, 2022

Pressing Reset during training creates havoc.

I suspect that this is triggered by the reset process deleting the model directory, causing the log process to fail due to missing file (can't open the file), causing the reset to fail. This has flow-on effect such as the data and the interface getting out of sync due to dataset data being deleted but the dataset.json file remaining.

Could be fixed by monitoring data-processing, training and transcription processes, but that sounds complicated.

May be able to catch 500 status due to missing files and update the GUI accordingly?

More detailed error message:

127.0.0.1 - - [21/Nov/2022 16:08:57] "GET /api/reset/ HTTP/1.1" 204 -
Error on request:
Traceback (most recent call last):
  File "/Users/bbb/Library/Caches/pypoetry/virtualenvs/server-IAZECY_M-py3.10/lib/python3.10/site-packages/werkzeug/serving.py", line 335, in run_wsgi
    execute(self.server.app)
  File "/Users/bbb/Library/Caches/pypoetry/virtualenvs/server-IAZECY_M-py3.10/lib/python3.10/site-packages/werkzeug/serving.py", line 327, in execute
    write(b"")
  File "/Users/bbb/Library/Caches/pypoetry/virtualenvs/server-IAZECY_M-py3.10/lib/python3.10/site-packages/werkzeug/serving.py", line 262, in write
    self.send_response(code, msg)
  File "/Users/bbb/.asdf/installs/python/3.10.0/lib/python3.10/http/server.py", line 492, in send_response
    self.log_request(code)
  File "/Users/bbb/Library/Caches/pypoetry/virtualenvs/server-IAZECY_M-py3.10/lib/python3.10/site-packages/werkzeug/serving.py", line 426, in log_request
    self.log("info", '"%s" %s %s', msg, code, size)
  File "/Users/bbb/Library/Caches/pypoetry/virtualenvs/server-IAZECY_M-py3.10/lib/python3.10/site-packages/werkzeug/serving.py", line 435, in log
    _log(
  File "/Users/bbb/Library/Caches/pypoetry/virtualenvs/server-IAZECY_M-py3.10/lib/python3.10/site-packages/werkzeug/_internal.py", line 224, in _log
    getattr(_logger, type)(message.rstrip(), *args, **kwargs)
  File "/Users/bbb/.asdf/installs/python/3.10.0/lib/python3.10/logging/__init__.py", line 1468, in info
    self._log(INFO, msg, args, **kwargs)
  File "/Users/bbb/.asdf/installs/python/3.10.0/lib/python3.10/logging/__init__.py", line 1615, in _log
    self.handle(record)
  File "/Users/bbb/.asdf/installs/python/3.10.0/lib/python3.10/logging/__init__.py", line 1625, in handle
    self.callHandlers(record)
  File "/Users/bbb/.asdf/installs/python/3.10.0/lib/python3.10/logging/__init__.py", line 1687, in callHandlers
    hdlr.handle(record)
  File "/Users/bbb/.asdf/installs/python/3.10.0/lib/python3.10/logging/__init__.py", line 967, in handle
    self.emit(record)
  File "/Users/bbb/.asdf/installs/python/3.10.0/lib/python3.10/logging/handlers.py", line 498, in emit
    logging.FileHandler.emit(self, record)
  File "/Users/bbb/.asdf/installs/python/3.10.0/lib/python3.10/logging/__init__.py", line 1208, in emit
    self.stream = self._open()
  File "/Users/bbb/.asdf/installs/python/3.10.0/lib/python3.10/logging/__init__.py", line 1197, in _open
    return open_func(self.baseFilename, self.mode,
FileNotFoundError: [Errno 2] No such file or directory: '/Users/bbb/sandbox/elpis_next/server/data/models/MODEL/logs.txt'

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

Successfully merging this pull request may close these issues.

Add a reset all button
3 participants