amazon-science / CodeSage

CodeSage: Code Representation Learning At Scale (ICLR 2024)
https://code-representation-learning.github.io
Apache License 2.0
82 stars 3 forks source link

classifier_dropout bug fix #5

Closed wasiahmad closed 8 months ago

wasiahmad commented 8 months ago

Issue #, if available:

4

Description of changes: Instead of

model = AutoModelForSequenceClassification.from_pretrained(args.model_name_or_path, trust_remote_code=True)

we should use:

model = AutoModelForSequenceClassification.from_pretrained(
    args.model_name_or_path, config=config, trust_remote_code=True
)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.