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

Transform model fine-tuning code to Python package #111

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Devasy23
Copy link
Owner

@Devasy23 Devasy23 commented Oct 30, 2024

Transform the model fine-tuning code in the Jupyter notebook files into a Python package named deeptune to help people fine-tune and train models of siamese architecture.

  • Package Structure:

    • Create deeptune package with subdirectories: data, models, training, evaluation, utils, and cli.
    • Add __init__.py files to each subdirectory to make them sub-packages.
    • Add config.py for configuration settings.
    • Add requirements.txt to list dependencies.
  • CLI Support:

    • Create cli.py in cli subdirectory to allow users to interact with the package through the command line.
    • Implement evaluate_model command to evaluate models.
  • Loss Functions:

    • Implement Triplet Loss, ArcFace Loss, and Contrastive Loss in training/losses.py.
  • Data Generators:

    • Implement TripletGenerator in training/data_generators.py to generate triplets for the triplet loss function.
  • Evaluation:

    • Move Model-Training/eval-mark-I.py to evaluation/eval_mark_I.py and update imports.
    • Move Model-Training/Evaluate_model_1.ipynb to evaluation/evaluate_model_1.ipynb and update imports.
  • Documentation:

    • Update README.md to include instructions for using the new Python package, CLI usage, and example code.

For more details, open the Copilot Workspace session.

Devasy23 and others added 2 commits October 30, 2024 10:12
Transform the model fine-tuning code in the Jupyter notebook files into a Python package named `deeptune` to help people fine-tune and train models of siamese architecture.

* **Package Structure:**
  - Create `deeptune` package with subdirectories: `data`, `models`, `training`, `evaluation`, `utils`, and `cli`.
  - Add `__init__.py` files to each subdirectory to make them sub-packages.
  - Add `config.py` for configuration settings.
  - Add `requirements.txt` to list dependencies.

* **CLI Support:**
  - Create `cli.py` in `cli` subdirectory to allow users to interact with the package through the command line.
  - Implement `evaluate_model` command to evaluate models.

* **Loss Functions:**
  - Implement Triplet Loss, ArcFace Loss, and Contrastive Loss in `training/losses.py`.

* **Data Generators:**
  - Implement `TripletGenerator` in `training/data_generators.py` to generate triplets for the triplet loss function.

* **Evaluation:**
  - Move `Model-Training/eval-mark-I.py` to `evaluation/eval_mark_I.py` and update imports.
  - Move `Model-Training/Evaluate_model_1.ipynb` to `evaluation/evaluate_model_1.ipynb` and update imports.

* **Documentation:**
  - Update `README.md` to include instructions for using the new Python package, CLI usage, and example code.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/Devasy23/FaceRec?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
3 Security Hotspots
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

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.

1 participant