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

Error while finetuning with custom dataset #97

Open
jpmc216 opened this issue Aug 6, 2024 · 3 comments
Open

Error while finetuning with custom dataset #97

jpmc216 opened this issue Aug 6, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@jpmc216
Copy link

jpmc216 commented Aug 6, 2024

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..default_train_transform() got an unexpected keyword argument 'offset'

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
@jpmc216 jpmc216 added the bug Something isn't working label Aug 6, 2024
@gorold
Copy link
Contributor

gorold commented Aug 6, 2024

what about the yaml file in uni2ts/cli/conf/finetune/data?

@jpmc216
Copy link
Author

jpmc216 commented Aug 6, 2024

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]

@chenghaoliu89
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants