-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Adding a test to show supported data types in TensorFlowTransform #2101
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
Conversation
var mlContext = new MLContext(seed: 1, conc: 1); | ||
// Pipeline | ||
var loader = ComponentCreation.CreateDataView(mlContext, | ||
new List<TestDataInt>(new TestDataInt[] { new TestDataInt() { a = new[] { 1L, 2, |
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.
Not aligned? #Resolved
Assert.Equal(4 + 4, cValues[3]); | ||
|
||
Assert.True(cursor.MoveNext()); | ||
c = default; |
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.
c = default; [](start = 16, length = 12)
This line is not needed. #Resolved
VBuffer<long> c = default; | ||
cgetter(ref c); | ||
|
||
var cValues = c.GetValues(); |
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.
cValues [](start = 20, length = 7)
Add an assert for the length of this. #Resolved
c = default; | ||
cgetter(ref c); | ||
|
||
cValues = c.GetValues(); |
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.
cValues [](start = 16, length = 7)
Add an assert for the length of this. #Resolved
/// Test to ensure the support for int and int64 types. | ||
/// </summary> | ||
[ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only | ||
public void TensorFlowTransformAdditionOfIntAndInt64Test() |
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.
TensorFlowTransformAdditionOfIntAndInt64Test [](start = 20, length = 44)
Hi Zeeshan, is there supposed to be a test for the 32-bit model? I thought the other tests were 32-bit models, but It looks like the other tests either are skipped or disable unless its a 64-bit process.
#Resolved
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.
TensorFlow works only on 64-bit platform. So, i think none of the TF tests are 32-bit.
In reply to: 246982838 [](ancestors = 246982838)
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.
ah! sorry I misread, you are handling int64 and int32 types...so then do the other tests use models that are using int32s?
In reply to: 246982838 [](ancestors = 246982838)
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.
actually I see -- you have a TestDataInt class that has both long and int....
In reply to: 246983378 [](ancestors = 246983378,246982838)
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.
Tests are good, but original issue is not about tests, and more about, what types we can actually support? |
documentation is here:
I believe short is also supported. I will add it to the documentation. In reply to: 453388399 [](ancestors = 453388399) |
Can Tensorflow transform work with key types? They are integers as well. #Resolved |
Updated the test to show how the supported types can be used. In reply to: 453611413 [](ancestors = 453611413,453388399) |
No, if they can be represented as any of the these types (double, float, long, int, short, sbyte, ulong, uint, ushort, byte and bool) then yes. In reply to: 453671331 [](ancestors = 453671331) |
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.
This PR adds addition test to fix #745.