fani-lab / LADy

LADy 💃: A Benchmark Toolkit for Latent Aspect Detection Enriched with Backtranslation Augmentation
Other
5 stars 6 forks source link

Redownloading the toy files #101

Open AkiraShougun opened 1 week ago

AkiraShougun commented 1 week ago

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 commented 1 week ago

@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 commented 1 week ago

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 commented 2 days ago

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.")