-
Notifications
You must be signed in to change notification settings - Fork 1
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
test_round_3 added to loading #129
base: main
Are you sure you want to change the base?
Conversation
closes #125 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I just added 3 best practice comments.
I'm excited to see, how our models perform on the set! :)
df_r3 = pd.read_csv(file_cached) | ||
|
||
except: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is good practice to hande errrors explicitly:
except FileError:
df_r3.query(f'id_article=={i} and {label}==1').sample(1, | ||
random_state=42))) | ||
id_list.extend(list(df_ann.id_post)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comment on efficiency: extending a list is not efficient. You could also use df_ann after both for-loops:
id_list = list(df_ann.id_post.unique())
return id_list # or directly return the above
def get_augmented_val_id(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are douplicating code from get_augmented_val_X_y. Best practise would be to use this function (get_augmented_val_id) in the X_y-function.
In branch issue-131-gbert-advanced-training I had built an alternative solution to #125 (i.e. test the gbert model on the annotation round 3 data). It's found in the 2 commits 81c452d and 4a2a39a combined. |
No description provided.