Comments (5)
Finally, it is work.
I need to check all the path, including PATH from the [Train] part.
Thanks a lot.
from vak.
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.
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.
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.
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)
- ENH: Require that `metrics` for a model definition be a subclass of `torchmetrics.Metric` HOT 3
- BUG: Getting a warning about Nvidia Tensor Cores HOT 1
- BUG: Getting a warning about missing logger directories HOT 2
- ENH: Have `vak.predict` accept `post_tfm_kwargs` like `eval` + `learncurve`
- ENH: Minimize duplication of data when preparing datasets for frame classification models HOT 1
- BUG: Fix model families to log train loss on step
- ENH: Rename `SegmentErrorRate` -> `CharacterErrorRate`
- ENH: Rename `datasets` to `pipes`, that have built-in transforms HOT 1
- BUG: predict raises KeyError when config file is missing `[PREDICT.transform_kwargs]` with `window_size` option HOT 5
- BUG: Loss and metrics are not logged correctly HOT 1
- ENH: Have all model families save "best" checkpoint with the same name
- CLN: Move `vak.common.trainer` into `frame_classification` / have per-model family trainers
- ENH: Add post-processing transform to remove short silent gaps
- ENH: check that value for validation step is valid for frame classification models before running learning curve
- Error for duplicate value val_dur in gy6ro6_train.toml from tutorial HOT 3
- chore: release checklist
- BUG/DOC: Tutorial eval and predict configs missing sections with model names HOT 8
- BUG/CLN: Refactor model abstraction so we don't subclass LightningModel, to fix loss logging HOT 2
- Error when running vak prep train.toml HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vak.