Can't modify the py files

Hi,

I am trying to modify some of the .py files in the dev branch of TTS.

I have cloned it to Colab using:
!git clone https://github.com/Mozilla/TTS TTS_repo
%cd TTS_repo
!git checkout dev
!pip install -r requirements.txt
!python setup.py install
%cd …

After that i went to this py file
/content/TTS_repo/TTS/utils/generic_utils.py
And modified this line of code
def create_experiment_folder(root_path, model_name, debug):

  • “”" Create a folder with the current date and time “”"*
    date_str = datetime.datetime.now().strftime("%B-%d-%Y_%I+%M%p")

My objective was to change the date format to %y%m%d

But when I run the training, it keeps generating the experiment folder with the default folder name.

After that, Just to check I also moved visual.py to a random unrelated folder in Colab but the tensorboard charts still update.

I think this means I am not looking at the right files to modify.

Can someone please tell me which path / folder I should be modifying? or if there is a command to derive the same?

Err, i think I figured it out, or at least figured out where to change the file:

So this is the path to the folders which contains the py files that get referenced when I execute a train/continue/restore command

/usr/local/lib/python3.6/dist-packages/TTS-0.0.9.1-py3.6-linux-x86_64.egg/TTS/utils/generic_utils.py

and not the thingy that got cloned to my colab instance

/content/TTS_repo/TTS/tts/utils/generic_utils.py

idk why, but ok!

Because it installs TTS as a python package. I guess you would have to run install again after your changes to make it work, as you did before.

'Sup and thanks,

I am trying to figure out if there is a way to install the TTS python package to the content directory, rather than deep within the systems folder, so I can fiddle with the files easily but thanks, what you suggested makes logical sense.

What you refer to as “deep within the systems folder” is what installing a package does :slightly_smiling_face:
(when not in a virtual environment)

You may want to look at the install option of:
pip install -e .

That’s what’s specifically recommended for your scenario in the README ( see here )

Editable install with pip is explained in the pip docs:
https://pip.pypa.io/en/stable/reference/pip_install/#install-editable

You can find more discussion online, eg here: https://stackoverflow.com/questions/42609943/what-is-the-use-case-for-pip-install-e

This is all standard Python/pip stuff, it’s not really related to this project