Skip to content

Conversation

@klausmh
Copy link
Collaborator

@klausmh klausmh commented May 13, 2020

No description provided.

var active = SchemaBindings.GetActive(predicate);
Contracts.Assert(active.Length == SchemaBindings.ColumnCount);

// REVIEW: We can get a different input predicate for the input cursor and for the lookahead cursor. The lookahead

Choose a reason for hiding this comment

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

REVIEW [](start = 15, length = 6)

@harishsk, do you think it is ok to leave this as a review comment, or should this be addressed?
To follow the suggestion in the comment we would need to introduce an abstract method that gets the active columns for the lookahead cursor - in the simple implementation it would simply return _source.Schema[SchemaBindings._inputColumnIndex].

Choose a reason for hiding this comment

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

Or even simpler: _source.Schema[InputCol].


In reply to: 424217890 [](ancestors = 424217890)

@klausmh klausmh marked this pull request as ready for review May 14, 2020 02:45

protected override Batch InitializeBatch(DataViewRowCursor input) => new Batch(_batchSize);

protected override Func<bool> GetIsNewBatchDelegate(DataViewRowCursor input)

Choose a reason for hiding this comment

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

GetIsNewBatchDelegate [](start = 38, length = 21)

After giving it some thought, I think GetIsNewBatchDelegate and GetLastInBatchDelegate can be implemented privately in the base class.
(This computation is not specific to SrCnn, it would be done the same way for any mapper that uses a constant batch size. If in the future there will be a need to introduce a different way of computing these, we can refactor the base class).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But these are used in BatchDataViewMapperBase.Cursor?

@mengaims mengaims merged commit 7ea51d8 into mengaims:master May 15, 2020
mengaims added a commit that referenced this pull request Jun 5, 2020
* Draft PR for SrCnn batch detection API interface (#1)

* POC Batch transform

* SrCnn batch interface

* Removed comment

* Handled some APIreview comments.

* Handled other review comments.

* Resolved review comments. Added sample.

Co-authored-by: Yael Dekel <[email protected]>

* Implement SrCnn entire API by function

* Fix bugs and add test

* Resolve comments

* Change names and add documentation

* Handling review comments

* Resolve the array allocating issue

* Move modeler initializing to CreateBatch and other minor fix.

* Fix 3 remaining comments

* Fixed code analysis issue.

* Fixed minor comments

Co-authored-by: klausmh <[email protected]>
Co-authored-by: Yael Dekel <[email protected]>
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.

6 participants