Giter Site home page Giter Site logo

Comments (5)

cantonsir avatar cantonsir commented on September 22, 2024 1

Finally, it is work.

I need to check all the path, including PATH from the [Train] part.

Thanks a lot.

from vak.

NickleDave avatar NickleDave commented on September 22, 2024

Hi @cantonsir, sorry you're having this issue.

I don't think this is an issue with your environment.
The error message makes me think there's a mistake in the TOML config file.

toml.decoder.TomlDecodeError: This float doesn't have a leading digit (line 8 column 1 char 344)

If you are using the config from the tutorial, line 8 would be

data_dir = "/PATH/TO/FOLDER/gyor6/032212"

Maybe you changed it but you did not put quotes around the string, or something like that?

Can you please reply with the content of your config file?
Either by pasting it directly into a comment or by attaching it to a comment.
That way I can help you troubleshoot.

from vak.

cantonsir avatar cantonsir commented on September 22, 2024

Hi NickleDave,

The following are part of "gy6or6_train.toml".

Thanks for your help.

# PREP: options for preparing dataset
[PREP]
# dataset_type: corresponds to the model family such as "frame classification" or "parametric umap"
dataset_type = "frame classification"
# input_type: input to model, either audio ("audio") or spectrogram ("spect")
input_type = "spect"
# data_dir: directory with data to use when preparing dataset
data_dir = r"C:\Users\szheng2\Documents\Bird_Data\Model Data\gy6or6\032212"
# output_dir: directory where dataset will be created (as a sub-directory within output_dir)
output_dir = r"C:\Users\szheng2\Documents\Bird_Data\Model Data\vak\prep\train"
# audio_format: format of audio, either wav or cbin
audio_format = "wav"
# annot_format: format of annotations
annot_format = "simple-seq"
# labelset: string or array with unique set of labels used in annotations
labelset = "iabcdefghjk"
# train_dur: duration of training split in dataset, in seconds
train_dur = 50
# val_dur: duration of validation split in dataset, in seconds
val_dur = 15
# test_dur: duration of test split in dataset, in seconds
test_dur = 30

# SPECT_PARAMS: parameters for computing spectrograms
[SPECT_PARAMS]
# fft_size: size of window used for Fast Fourier Transform, in number of samples
fft_size = 512
# step_size: size of step to take when computing spectra with FFT for spectrogram
# also known as hop size
step_size = 64

from vak.

NickleDave avatar NickleDave commented on September 22, 2024

Ah I think I see.

You want to remove the r from in front of all the options that are strings, and change all the backward slashes to forward slashes.

As you know the prefix r creates raw strings in Python. I think you are doing this because you have had issues with Windows paths in Python before.

But the config file is not Python code; it's in TOML format. There's no such thing as a "raw" string in TOML.

In addition, we use pathlib to work with paths. That is, once vak parses the TOML config file and loads paths like data_path into Python, they are pathlib.Path instances. pathlib lets you write paths with single forward slashes on Windows, and does all the work for you so that the paths are parsed correctly. E.g. see https://www.reddit.com/r/learnpython/comments/sifzlv/windows_path_to_python_path/
For a more thorough intro see: https://realpython.com/python-pathlib/

In other words, you should just be able to remove the r, and change the backslashes to forward slashes, and it will work.
Please let me know if not.

from vak.

NickleDave avatar NickleDave commented on September 22, 2024

Great, glad to hear it @cantonsir.

That was my guess from the new error message from where it said "line 37".

I know error messages can be overwhelming when they dump out a ton of text, but I have learned the hard way it's worth the effort to read them 🙂 even if sometimes the programmer doesn't do a good job of making them very helpful 😇

Please just let us know if there's anything we can do to help you.

You can join our forum here, introduce yourself, and ask more general question too if you'd like: https://forum.vocalpy.org/

edit: just saw you already requested an invite -- approved you! Sorry I missed it

from vak.

Related Issues (20)

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.