Skip to content

Commit 4221356

Browse files
committed
version control
1 parent c38994a commit 4221356

File tree

9 files changed

+27
-14
lines changed

9 files changed

+27
-14
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,30 @@ jobs:
1919
- name: Set up Python
2020
uses: actions/setup-python@v2
2121
with:
22-
python-version: '3.9' # Updated to 3.9
22+
python-version: '3.9'
2323

2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip
2727
pip install -r requirements.txt
2828
pip install -r dev-requirements.txt
29-
pip install "black[jupyter]" # Install Jupyter support for Black
29+
pip install "black[jupyter]"
3030
31-
- name: Run Black
31+
- name: Run Isort to Auto-Fix Imports
32+
run: |
33+
isort . --skip-glob "*.ipynb" # Automatically fix import order for all files except Jupyter notebooks
34+
35+
- name: Run Isort Check
3236
run: |
33-
black . --exclude "\.ipynb$" # Skip Jupyter notebook files
37+
isort --check-only . --skip-glob "*.ipynb" # Verify that all imports are correctly sorted
3438
35-
- name: Run isort
39+
- name: Run Black
3640
run: |
37-
isort --check-only . --skip-glob "*.ipynb" # Skip Jupyter notebook files
41+
black . --exclude "\.ipynb$"
3842
3943
- name: Run Pylint
4044
run: |
41-
pylint src tests --ignore-patterns=".*\.ipynb$" # Skip Jupyter notebook files
45+
pylint src tests --ignore-patterns=".*\.ipynb$"
4246
4347
- name: Run tests with coverage
4448
run: |

src/data/data_augmentation.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import requests
1+
import logging
22
import random
3-
import spacy
3+
4+
import backoff
45
import nltk
6+
import requests
7+
import spacy
58
from nltk.corpus import wordnet
6-
import backoff
7-
import logging
89

910
# Load Spacy model for NER and tokenization
1011
nlp = spacy.load("en_core_web_sm")

src/evaluation/contextual_metrics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from bert_score import score
22

3+
34
class ContextualMetrics:
45
@staticmethod
56
def bleu(reference, candidate):

src/preprocessing/augmentation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import random
22
import re
3-
import spacy
3+
44
import nltk
5+
import spacy
56
from nltk.corpus import stopwords
67
from spellchecker import SpellChecker
78

src/preprocessing/cleaning.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import pandas as pd
21
import re
32

3+
import pandas as pd
4+
5+
46
class DataCleaning:
57
def __init__(self, df):
68
self.df = df

src/preprocessing/curriculum_learning.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import pandas as pd
22

3+
34
class CurriculumLearning:
45
def __init__(self, df):
56
self.df = df

src/reinforcement/multi_objective_rl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import numpy as np
22

3+
34
class MultiObjectiveRL:
45
def __init__(self, reward_weights):
56
self.reward_weights = reward_weights

src/training/distributed_rl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import torch
2+
import torch.distributed as dist
23
import torch.nn as nn
34
import torch.optim as optim
45
from torch.utils.data import DataLoader
5-
import torch.distributed as dist
6+
67

78
class DistributedTraining:
89
def __init__(self, model, dataset):

src/training/ppo_hyperparameter_tuning.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from ray import tune
33
from ray.rllib.agents.ppo import PPOTrainer
44

5+
56
def ppo_training(config):
67
trainer = PPOTrainer(config=config)
78
for i in range(50):

0 commit comments

Comments
 (0)