ColossalAI icon indicating copy to clipboard operation
ColossalAI copied to clipboard

[colossalai/checkpoint_io/...] fix bug in load_state_dict_into_model; format error msg

Open flymin opened this issue 1 year ago • 3 comments

📌 Checklist before creating the PR

  • [x] I have created an issue for this PR for traceability
  • [x] The title follows the standard format: [doc/gemini/tensor/...]: A concise description
  • [x] I have added relevant tags if possible for us to better distinguish different PRs
  • [ ] I have installed pre-commit: pip install pre-commit && pre-commit install

🚨 Issue number

fix #6019

📝 What does this PR do?

  1. resolve issue: will raise an error on any unexpected_keys in strict loading
  2. reformat the error message. The current code seems to expect a list rather than a string.

💥 Checklist before requesting a review

  • [x] I have linked my PR to an issue (instruction)
  • [x] My issue clearly describes the problem/feature/proposal, with diagrams/charts/table/code if possible
  • [x] I have performed a self-review of my code
  • [ ] I have added thorough tests.
  • [x] I have added docstrings for all the functions/methods I implemented

⭐️ Do you enjoy contributing to Colossal-AI?

  • [x] 🌝 Yes, I do.
  • [ ] 🌚 No, I don't.

Tell us more if you don't enjoy contributing to Colossal-AI.

flymin avatar Aug 20 '24 03:08 flymin

I have run the failed tests locally and it did not trigger any error.

flymin avatar Aug 23 '24 03:08 flymin

We've updated environment of CI. Could you rebase the main branch and rerun the tests?

ver217 avatar Aug 27 '24 02:08 ver217

I rebase the change onto d38344

flymin avatar Aug 27 '24 03:08 flymin