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

[Feature] Added logging and evaluation functionality #252

Closed
wants to merge 2 commits into from

Conversation

Saf9933
Copy link
Contributor

@Saf9933 Saf9933 commented Oct 2, 2024

Summary
The two key features:

  • Added logging to track model loading, configuration, task execution, and evaluation.
  • Added an evaluation function that calculates accuracy after task execution using a test dataset loaded from JSON.
    README Updates:
  • Updated the README.md file to include a Contributing section.
    The section explains how others can fork the repository, create new branches, and submit Pull Requests to contribute to the project.

Device Compatibility

  • The code is written to work on systems with or without CUDA support. It will automatically detect if CUDA is available and use it; otherwise, it defaults to the CPU.
    Testing issue for my MacBook
    Due to hardware limitations (MacBook M1, no CUDA support), I was unable to fully test the code. However, I structured it to run efficiently on a system with CUDA-enabled hardware. I request that someone with the necessary hardware verify the functionality thank you :).

Files Changed:

  • mlora_train.py: Added logging, dataset loading, and evaluation.
  • README.md: Contributing section

mlora_train.py Outdated


# Custom dataset class to load data from JSON
class CustomDataset(Dataset):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's better to create a new file and new class .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback! I’ve now refactored the dataset loading and evaluation into a separate module (dataset_utils.py) as suggested you can check it out!

@yezhengmao1
Copy link
Collaborator

can we split the function (dataset loading and evaluation) to another file or module?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this file into a new directory "dataset" ?

@Saf9933 Saf9933 closed this Oct 25, 2024
@Saf9933 Saf9933 deleted the feature/logging-evaluation branch October 25, 2024 16:03
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

Successfully merging this pull request may close these issues.

2 participants