Error while finetuning with custom dataset
Describe the bug Error while finetuning with custom dataset
To Reproduce Please provide a code snippet of a minimal reproducible example for the error.
python -m uni2ts.data.builder.simple texas TexasTurbineYearly.csv --offset 8640
python -m cli.finetune run_name=my_lsf_run model=moirai_1.0_R_small data=texas val_data=texas
Placed the below yaml in this folder( uni2ts/cli/conf/finetune/val_data)
_target_: uni2ts.data.builder.ConcatDatasetBuilder
_args_:
_target_: uni2ts.data.builder.simple.generate_eval_builders
dataset: texas_eval
offset: 8640 # Same as _lsf_dataset.py
eval_length: 2880 # Same as _lsf_dataset.py
prediction_lengths: [96, 192, 336, 720]
context_lengths: [1000, 2000, 3000, 4000, 5000]
patch_sizes: [32, 64]
Expected behavior Followed the instructions here to fine-tune on custom dataset. https://github.com/SalesforceAIResearch/uni2ts?tab=readme-ov-file#fine-tuning
Error message or code output
ine 238, in load_dataset
transform=transform_map[self.dataset](
TypeError: MoiraiFinetune.train_transform_map.
put error or undesired output here
Environment
- Operating system: MacOS
- Python version: 3.10
- PyTorch version: 2.3.3
- uni2ts version (have you pulled the latest version?) latest
what about the yaml file in uni2ts/cli/conf/finetune/data?
Same as the yaml placed under this folder( uni2ts/cli/conf/finetune/val_data)
_target_: uni2ts.data.builder.ConcatDatasetBuilder
_args_:
_target_: uni2ts.data.builder.simple.generate_eval_builders
dataset: ETTh2_eval
offset: 8640 # Same as _lsf_dataset.py
eval_length: 2880 # Same as _lsf_dataset.py
prediction_lengths: [96, 192, 336, 720]
context_lengths: [1000, 2000, 3000, 4000, 5000]
patch_sizes: [32, 64]
Hi @jpmc216, in the current version, the config format of finetuning data and validation data is different. For the fine-tuning data, you can follow this example https://github.com/SalesforceAIResearch/uni2ts/blob/main/cli/conf/finetune/data/etth1.yaml . You can find that it does not have offset attribute, which raise the error