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

Refactor the codebase #14

Merged
merged 5 commits into from
Sep 13, 2023
Merged

Refactor the codebase #14

merged 5 commits into from
Sep 13, 2023

Conversation

SachiraKuruppu
Copy link
Contributor

  • Extract the RAG e2e training script process_function into utils -- To declutter the training script.
  • Rename train.py module in utils folder to train_utils.py -- Make it clear that these are util functions.
  • Move base models out of the training folder to a separate folder -- These models are used in evaluation too. Not ideal to keep them in the training folder.

Copy link
Member

@shamanez shamanez left a comment

Choose a reason for hiding this comment

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

can we remove unused imports :)

Copy link
Member

Choose a reason for hiding this comment

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

let's change the name of this : peft_lora_constrastive_learning.py -->> retriever_only.py

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed this to train_retriever_only.py to be consistent with the rag_e2e training script.

@Ben-Epstein
Copy link
Contributor

can we remove unused imports :)

Unused imports will cause tests to fail, so we should be okay there

@@ -13,13 +13,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import sys

Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be necessary if you are installing the package. Can we remov this?

@Ben-Epstein
Copy link
Contributor

@rsachira can you remove the line sys.path.append(os.getcwd()) and install this package

pip install invoke
inv install

Then it won't be necessary

@shamanez shamanez merged commit 02ee90f into main Sep 13, 2023
1 check passed
@Ben-Epstein Ben-Epstein deleted the refactor branch September 21, 2023 22:04
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.

3 participants