-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Perl Data Language types are hardcoded and need to not be #20851
Comments
Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue. |
@mohawk2 Can you file PR against latest branch of mxnet where perl-package exist. |
@sergeykolychev Wow, that's a quick reply! Is there CI? I don't have the means to easily install MXNet to actually test it before making a PR. |
@mohawk2 yes, there's CI |
@mohawk2 fixing mxnet to older version of PDL is also acceptable. |
@sergeykolychev What is the correct approach for |
Hi, I'll get a PR ready for this in a few. This is against the https://github.com/apache/incubator-mxnet/tree/v1.x branch? |
My thinking is requiring a minimum version of PDL would be better :-) |
The |
Hi guys, I'm here to confirm that just by editing the file AI/MXNet/Base.pm use constant DTYPE_MX_TO_PDL => { to use constant DTYPE_MX_TO_PDL => { half-precision is not supported by PDL and this would cause chaos2 => ,
half-precision is not supported by PDL and this would cause chaosfloat16 => ,
}; is enough to solve the issue. cpanm --uninstall PDL::VectorValued::Utils cpanm --uninstall PDL::CCS::Utils Thank you very much for the support. The issue is now closed, since we now have a solution :-) |
This removes the hardcoded values and uses PDL::Type instead. Upgrades minimum PDL dependency to PDL v2.064 which provides int8 (PDL: sbyte) and int64 (PDL: longlong) types. Fixes <apache#20851>.
This removes the hardcoded values and uses PDL::Type instead. Upgrades minimum PDL dependency to PDL v2.064 which provides int8 (PDL: sbyte) and int64 (PDL: longlong) types. Fixes <apache#20851>.
This removes the hardcoded values and uses PDL::Type instead. Upgrades minimum PDL dependency to PDL v2.064 which provides the int8 (PDL: sbyte) type. Fixes <apache#20851>.
This removes the hardcoded values and uses PDL::Type instead. Upgrades minimum PDL dependency to PDL v2.064 which provides the int8 (PDL: sbyte) type. Fixes <apache#20851>.
This removes the hardcoded values and uses PDL::Type instead. Upgrades minimum PDL dependency to PDL v2.064 which provides the int8 (PDL: sbyte) type. Fixes <apache#20851>.
This removes the hardcoded values and uses PDL::Type instead. Upgrades minimum PDL dependency to PDL v2.064 which provides the int8 (PDL: sbyte) type. Fixes <apache#20851>.
This removes the hardcoded values and uses PDL::Type instead. Upgrades minimum PDL dependency to PDL v2.064 which provides the int8 (PDL: sbyte) type. Fix tests by allowing some PDL data alongside Perl scalars. Fixes <apache#20851>.
This removes the hardcoded values and uses PDL::Type instead. Upgrades minimum PDL dependency to PDL v2.064 which provides the int8 (PDL: sbyte) type. Fix tests by allowing some PDL data alongside Perl scalars. Fixes <apache#20851>.
This removes the hardcoded values and uses PDL::Type instead. Upgrades minimum PDL dependency to PDL v2.064 which provides the int8 (PDL: sbyte) type. Fix tests by allowing some PDL data alongside Perl scalars. Fixes <apache#20851>.
This removes the hardcoded values and uses PDL::Type instead. Upgrades minimum PDL dependency to PDL v2.064 which provides the int8 (PDL: sbyte) type. Fix tests by allowing some PDL data alongside Perl scalars. Fixes <apache#20851>.
* [Perl] Updates mapping between PDL and MX types This removes the hardcoded values and uses PDL::Type instead. Upgrades minimum PDL dependency to PDL v2.064 which provides the int8 (PDL: sbyte) type. Fix tests by allowing some PDL data alongside Perl scalars. Fixes <#20851>. * [Perl] Release AI-MXNet v1.6
This can be closed. Merged #20852. |
Now I have an issue with DTYPE_PDL_TO_MX. It is not consistent. use constant DTYPE_PDL_TO_MX => { However I have value 4 that is not present in the above hash:
The variable has value == 4, which produces the following error: Use of uninitialized value in hash element at perl5/lib/perl5/AI/MXNet/Base.pm line 465. The question is how to define 4 in the hash table DTYPE_PDL_TO_MX? |
@jehosha, that should already be handled because if you look at the merged code here: https://github.com/apache/incubator-mxnet/blob/v1.9.x/perl-package/AI-MXNet/lib/AI/MXNet/Base.pm#L78=, it uses the You can confirm that the correct type is there by running: $ perl -MPDL -E 'say join "|", grep { $_->enum == 4} PDL::Types::types()'
long |
Agreed - it seems most likely from the reported symptom that @jehosha is not using the fixed version of the code. |
Dear mohawk2,
Thank you for the answer.
Best regards,
Jehosha.
…On Mon, Apr 4, 2022 at 9:50 AM mohawk2 ***@***.***> wrote:
Agreed - it seems most likely from the reported symptom that @jehosha
<https://github.com/jehosha> is not using the fixed version of the code.
—
Reply to this email directly, view it on GitHub
<#20851 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADAA47BHWELKB5X5MGWRLELVDL6ULANCNFSM5M34BX5A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Dr. Josafá Pontes
Natural language processing computer scientist.
Associate professor of the National Polytechnic School of Ecuador
|
Description
@sergeykolychev This code shows hardcoded type-numbers (https://github.com/apache/incubator-mxnet/blob/v1.x/perl-package/AI-MXNet/lib/AI/MXNet/Base.pm#L62-L84):
but PDL since 2.064 has changed these numbers due to an increased number of integer types, and the floating-point types needing to all be above all the integer types.
This is the same problem as #20850 which can be closed.
Error Message
Code below prints [5,0] instead of [5, 9].
To Reproduce
From PDLPorters/pdl#377:
Steps to reproduce
Run the above Perl code.
What have you tried to solve it?
Instead the code (one way only) should be something like this in order to work on all recent-ish version of PDL (both before and after the added types, though
sbyte
is new and would need to be either adjusted for lower-versioned PDL, or simply a dependency on PDL 2.064 added):Environment
Perl 5.32, CPAN AI::MXNet 1.5, PDL 2.068.
The text was updated successfully, but these errors were encountered: