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

Preprocess with debug gives error. #1599

Open
6 of 8 tasks
amitagh opened this issue May 7, 2024 · 2 comments
Open
6 of 8 tasks

Preprocess with debug gives error. #1599

amitagh opened this issue May 7, 2024 · 2 comments
Labels
bug Something isn't working possibly_solved

Comments

@amitagh
Copy link

amitagh commented May 7, 2024

Please check that this issue hasn't been reported before.

  • I searched previous Bug Reports didn't find any similar reports.

Expected Behavior

Preprocess with debug should work but gives error:

without --debug it works.

Using below dataset config.

datasets:

  • path: /content/mar_orca_dataset.json
    type: alpaca_w_system.load_open_orca
    ds_type: json
    dataset_prepared_path: /content
    dataset_processes: 2

Current behaviour

Preprocess with debug should work but gives error:

**** Axolotl Dependency Versions *****
accelerate: 0.28.0
peft: 0.10.0
transformers: 4.40.0.dev0
trl: 0.8.5
torch: 2.1.2
bitsandbytes: 0.43.0


Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/content/src/axolotl/src/axolotl/cli/preprocess.py", line 70, in
fire.Fire(do_cli)
File "/usr/local/lib/python3.10/dist-packages/fire/core.py", line 143, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/usr/local/lib/python3.10/dist-packages/fire/core.py", line 477, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/usr/local/lib/python3.10/dist-packages/fire/core.py", line 693, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/content/src/axolotl/src/axolotl/cli/preprocess.py", line 30, in do_cli
parsed_cfg = load_cfg(config, **kwargs)
File "/content/src/axolotl/src/axolotl/cli/init.py", line 352, in load_cfg
with open(config, encoding="utf-8") as file:
FileNotFoundError: [Errno 2] No such file or directory: 'examples'

Steps to reproduce

Run preprocess with debug option and error is seen.

Config yaml

base_model: meta-llama/Meta-Llama-3-8B-Instruct
#model_type: AutoModelForCausalLM  #For Gemma
model_type: LlamaForCausalLM
tokenizer_type: AutoTokenizer

load_in_8bit: false
load_in_4bit: true
strict: false

#datasets:
#  - path: /content/test_txt_data-10exmpl.json
#    type: completion
#    field: text
#datasets:
#  - path: ./mar_alpaca_dataset.json
#    type: alpaca
#    ds_type: json
datasets:
  - path: /content/mar_orca_dataset.json
    type: alpaca_w_system.load_open_orca
    ds_type: json
dataset_prepared_path: /content
dataset_processes: 2
val_set_size: 0
output_dir: ./qlora-out

adapter: qlora
lora_model_dir:

sequence_len: 700
sample_packing: true
pad_to_sequence_len: true

lora_r: 16
lora_alpha: 32
lora_dropout: 0.05
lora_target_modules:
  - q_proj
  - v_proj
  - k_proj
  - o_proj
  - gate_proj
  - down_proj
  - up_proj
#lora_modules_to_save:
  #- embed_tokens
  #- lm_head
lora_target_linear: true
lora_fan_in_fan_out:


gradient_accumulation_steps: 1
micro_batch_size: 1
num_epochs: 1
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.0002

train_on_inputs: false
group_by_length: false
bf16: false
fp16: false
tf32: false

gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: False

warmup_ratio: 0.1
evals_per_epoch: 1
eval_table_size:
eval_max_new_tokens: 128
eval_sample_packing: False
saves_per_epoch: 1
debug:
deepspeed:
weight_decay: 0.0
fsdp:
fsdp_config:
special_tokens:
   pad_token: <|end_of_text|>

save_safetensors: True
gpu_memory_limit: 14

Possible solution

There shouldnt be an error

Which Operating Systems are you using?

  • Linux
  • macOS
  • Windows

Python Version

3.10

axolotl branch-commit

latest

Acknowledgements

  • My issue title is concise, descriptive, and in title casing.
  • I have searched the existing issues to make sure this bug has not been reported yet.
  • I am using the latest version of axolotl.
  • I have provided enough information for the maintainers to reproduce and diagnose the issue.
@amitagh amitagh added the bug Something isn't working label May 7, 2024
@winglian
Copy link
Collaborator

winglian commented May 8, 2024

Hi @amitagh, what is the exact command you used with --debug? make sure to use --debug after you set the YAML file argument.

correct: python -m axolotl.cli.preprocess path/to/your.yaml --debug

incorrect: python -m axolotl.cli.preprocess --debug path/to/your.yaml

@amitagh
Copy link
Author

amitagh commented May 9, 2024 via email

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

No branches or pull requests

2 participants