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

new phase updateLabel implementation #58 #102

Merged
merged 1 commit into from
Jan 2, 2022

Conversation

navinrathore
Copy link
Contributor

Implementation of LabelUpdater extended from labeller.
Output/Prints are similar in both the phases
Marked Records are replaced

Local Branch has been fetched from 0.3.1

Copy link
Member

@sonalgoyal sonalgoyal left a comment

Choose a reason for hiding this comment

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

Comments on overriding classes and methods

setZinggOptions(ZinggOptions.UPDATE_LABEL);
}

public void execute() throws ZinggClientException {
Copy link
Member

Choose a reason for hiding this comment

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

rename getUnmarkedRecords in labeller to getRecordsToProcess, call that in execute. In this class, override that method so that you do not have to override execute here

return;
}

private void updateLabellerStat(int selectedOption, int existingType) {
Copy link
Member

Choose a reason for hiding this comment

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

have one method updateLabellerstat(selectedOption, existingType, increment) in base class and call that with increment +1 there or -1 here

updateLabellerStat(selectedOption);
}

void writeLabelledOutput(Dataset<Row> records, SaveMode mode) {
Copy link
Member

Choose a reason for hiding this comment

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

define method getPipeForRecordsTowrite in base class. override it here with SaveMode. call it in writeLAbelledOutput in base class.

return;
}

List<Column> displayCols = DSUtil.getFieldDefColumns(lines, args, false);
Copy link
Member

Choose a reason for hiding this comment

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

displaycols is redundant, we use df.show so i doubt if it being used. please check

Copy link
Member

Choose a reason for hiding this comment

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

also, overall is there a way to abstract the logic - reading and quitting at 9, displaying some stuff, accepting user input, doing some action(update/mark) in the base class and only override the relevant methods in the update labeller class?

@sonalgoyal sonalgoyal merged commit ae7a704 into zinggAI:0.3.1 Jan 2, 2022
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.

2 participants