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

Disable Coqui analytics / Cannot finetune offline #16

Closed
TheLounger opened this issue Dec 24, 2023 · 5 comments
Closed

Disable Coqui analytics / Cannot finetune offline #16

TheLounger opened this issue Dec 24, 2023 · 5 comments

Comments

@TheLounger
Copy link

TheLounger commented Dec 24, 2023

Please generate a diagnostics report and upload the "diagnostics.log".

https://github.com/erew123/alltalk_tts/tree/main?#-how-to-make-a-diagnostics-report-file

Describe the bug
Coqui trainer package uses tracking/analytics and cannot work offline.

To Reproduce

  • Deny Internet access to python
  • Run finetune step 2

Screenshots
N/A

Text/logs

Traceback (most recent call last):
  File "O:\ai\tests\alltalk\alltalk_tts\installer_files\env\Lib\site-packages\requests\adapters.py", line 486, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "O:\ai\tests\alltalk\alltalk_tts\installer_files\env\Lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "O:\ai\tests\alltalk\alltalk_tts\installer_files\env\Lib\site-packages\urllib3\util\retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='coqui.gateway.scarf.sh', port=443): Max retries exceeded with url: /trainer/training_run (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000029092034490>: Failed to establish a new connection: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "O:\ai\tests\alltalk\alltalk_tts\finetune.py", line 817, in train_model
    config_path, original_xtts_checkpoint, vocab_file, exp_path, speaker_wav = train_gpt(language, num_epochs, batch_size, grad_acumm, train_csv, eval_csv, output_path=str(output_path), max_audio_length=max_audio_length)
                                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "O:\ai\tests\alltalk\alltalk_tts\finetune.py", line 394, in train_gpt
    trainer = Trainer(
              ^^^^^^^^
  File "O:\ai\tests\alltalk\alltalk_tts\installer_files\env\Lib\site-packages\trainer\trainer.py", line 583, in __init__
    ping_training_run()
  File "O:\ai\tests\alltalk\alltalk_tts\installer_files\env\Lib\site-packages\trainer\analytics.py", line 12, in ping_training_run
    _ = requests.get(URL, timeout=5)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "O:\ai\tests\alltalk\alltalk_tts\installer_files\env\Lib\site-packages\requests\api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "O:\ai\tests\alltalk\alltalk_tts\installer_files\env\Lib\site-packages\requests\api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "O:\ai\tests\alltalk\alltalk_tts\installer_files\env\Lib\site-packages\requests\sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "O:\ai\tests\alltalk\alltalk_tts\installer_files\env\Lib\site-packages\requests\sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "O:\ai\tests\alltalk\alltalk_tts\installer_files\env\Lib\site-packages\requests\adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='coqui.gateway.scarf.sh', port=443): Max retries exceeded with url: /trainer/training_run (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000029092034490>: Failed to establish a new connection: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions'))

Desktop (please complete the following information):
AllTalk was updated: 2023-12-24 da04454
Custom Python environment: Yes, Miniconda environment made with Oobabooga start_windows.bat, Python 3.11.
Text-generation-webUI was updated: N/A

Additional context
It's possible to start the training by commenting out this line but there probably is a better/cleaner way to get rid of their shenanigans.

@erew123
Copy link
Owner

erew123 commented Dec 24, 2023

Please set the following environment variable for whatever OS you are on TRAINER_TELEMETRY=0

https://github.com/coqui-ai/Trainer#anonymized-telemetry

@TheLounger
Copy link
Author

Ah, thanks!
Maybe put that in your script?

@erew123
Copy link
Owner

erew123 commented Dec 24, 2023

Should be able to do that, but Ill need to test that pushing the environment variable works across Win/Linux/Mac without any complaints. Ill look into it.

Have a good Christmas! :)

@TheLounger
Copy link
Author

This should work:

os.environ['TRAINER_TELEMETRY'] = '0'

Currently in a training session so can't test anything, but that's how Oobabooga does it.

@erew123
Copy link
Owner

erew123 commented Dec 24, 2023

Yeah Id spotted that one. Given it a few checks and updated as it should be fine. Otherwise. Hope you're enjoying it/finding it generally works well! Have a good Christmas! (or however you celebrate the holidays)

@erew123 erew123 closed this as completed Dec 24, 2023
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