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

cannot import name 'load_goals' from 'utils.string_utils' #6

Open
shutttttdown opened this issue Nov 29, 2024 · 2 comments
Open

cannot import name 'load_goals' from 'utils.string_utils' #6

shutttttdown opened this issue Nov 29, 2024 · 2 comments

Comments

@shutttttdown
Copy link

I have cloned the newest code but occur the error:

cannot import name 'load_goals' from 'utils.string_utils'

and I checked there is no load_goals function in the utils.string_utils,

it there is anyway to solve it?

Thanks

@zhaoxu98
Copy link
Collaborator

Hi, thank you for pointing out the issue!

Sorry for the mistake. The bug has been identified and fixed. Please pull the latest code from the repository, and it should work correctly now. If you encounter any further issues, feel free to let me know.

Thanks again for your feedback!

@shutttttdown
Copy link
Author

Thanks for your quick fix!

Additionally, I have found a few issues:

  1. In main.py at line 40
    from baseline.DrAttack.DrAttack_single_main import DrAttack_initial, DrAttack_single_main, DrAttack_stop
    , the line
from baseline.DrAttack.DrAttack_single_main import DrAttack_initial, DrAttack_single_main, DrAttack_stop

causes the error:

ImportError: cannot import name 'text_process' from 'utils.test_utils'

Since I am only running the PAIR algorithm now, I simply commented out this line to proceed.

  1. The file paths for the save_test_to_file
    def save_test_to_file(args, instructions):
    function and the load_split_file_whole
    def load_split_file_whole(args):
    function do not match: The save path for save_test_to_file does not contain the 'split' field, which is required by load_split_file_whole. Additionally, the saved file name for save_test_to_file does not start with 'idx', which causes load_split_file_whole to fail when trying to read the saved file.

These are the issues I've encountered so far while attempting to reproduce the PAIR algorithm. I will report bug if I encounter more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants