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

Redownloading the toy files #101

Open
AkiraShougun opened this issue Nov 13, 2024 · 3 comments
Open

Redownloading the toy files #101

AkiraShougun opened this issue Nov 13, 2024 · 3 comments

Comments

@AkiraShougun
Copy link
Member

Hello, I tried to work over the assigned task so I deleted the toy file and executed the same code that is in the readme file, namely,

python main.py -naspects 5 -am rnd -data ../data/raw/semeval/toy.2016SB5/ABSA16_Restaurants_Train_SB1_v2.xml -output ../output/toy.2016SB5/

I got the following results in my terminal
Screenshot 2024-11-12 200953
Screenshot 2024-11-12 201008

@hosseinfani
Copy link
Member

@AkiraShougun
I think the problem is related to version conflict for numpy.

The other error is expected as in the code, it tries to load the pickle file, but if it's not there, it catches the error (but it is still in the stacktrace) and then tries to generate it.

@AkiraShougun
Copy link
Member Author

I just want to make sure. Which package list is the most recently updated? I will be removing my Conda environment and reinstall it. Last time I used environment.yml. Is requirements.txt the most recently updated?

@AkiraShougun
Copy link
Member Author

Hello,

I got the package version files that Linh had and compared it with mine since apparently we get different errors. I made a python script to show what are the differences and I found a lot of differences. I attached the files.
diaa.txt
linh.txt
The python script that I ran is the following:

import sys

def read_file(file_path):
    with open(file_path, 'r') as file:
        return file.readlines()

def compare_files(file1, file2):
    lines1 = read_file(file1)
    lines2 = read_file(file2)

    diff = []
    for line in lines1:
        if line not in lines2:
            diff.append(f"- {line.strip()}")
    for line in lines2:
        if line not in lines1:
            diff.append(f"+ {line.strip()}")

    return diff

if __name__ == "__main__":
    if len(sys.argv) != 3:
        print("Usage: python compare_files.py <file1> <file2>")
        sys.exit(1)

    file1 = sys.argv[1]
    file2 = sys.argv[2]

    differences = compare_files(file1, file2)
    if differences:
        print("Differences between files:")
        for line in differences:
            print(line)
    else:
        print("The files are identical.")

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