AI-PredictionClient
view release on metacpan
or search on metacpan
Changes
view on Meta::CPAN
1 2 3 4 5 6 7 8 9 10 | 0.01 2017-07-12
- Initial release to CPAN
0.02 2017-07-14
- Fix dependencies found by CPAN testers. Documentation maintenance
0.03 2017-07-16
- Bump up dependencies' version requirements
0.04 2017-07-21
- Bump up dependencies. Documentation maintenance.
0.05 2017-07-23
- Bump up dependencies.
|
LICENSE
view on Meta::CPAN
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
|
META.json
view on Meta::CPAN
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | "MIME::Base64" : "0" ,
"Moo" : "0" ,
"Moo::Role" : "0" ,
"MooX::Options" : "0" ,
"Perl6::Form" : "0" ,
"perl" : "5.01" ,
"strict" : "0" ,
"warnings" : "0"
}
},
"test" : {
"requires" : {
"Test::More" : "0"
}
}
},
"provides" : {
"AI::PredictionClient" : {
"file" : "lib/AI/PredictionClient.pm" ,
"version" : "0.05"
},
|
Makefile.PL
view on Meta::CPAN
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | "Moo::Role" => 0,
"MooX::Options" => 0,
"Perl6::Form" => 0,
"strict" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"Test::More" => 0
},
"VERSION" => "0.05" ,
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"AI::PredictionClient::Alien::TensorFlowServingProtos" => 0,
"Alien::Google::GRPC" => 0,
"Cwd" => 0,
"Data::Dumper" => 0,
"Inline" => 0,
|
cpanfile
view on Meta::CPAN
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | requires "JSON" => "0" ;
requires "MIME::Base64" => "0" ;
requires "Moo" => "0" ;
requires "Moo::Role" => "0" ;
requires "MooX::Options" => "0" ;
requires "Perl6::Form" => "0" ;
requires "perl" => "5.01" ;
requires "strict" => "0" ;
requires "warnings" => "0" ;
on 'test' => sub {
requires "Test::More" => "0" ;
};
on 'configure' => sub {
requires "AI::PredictionClient::Alien::TensorFlowServingProtos" => "0.05" ;
requires "Alien::Google::GRPC" => "0.06" ;
requires "ExtUtils::MakeMaker" => "0" ;
requires "Inline" => "0" ;
requires "Inline::CPP" => "0" ;
requires "Inline::MakeMaker" => "0" ;
|
lib/AI/PredictionClient.pm
view on Meta::CPAN
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | Inception.pl --image_file=anything --debug_camel --host=xx7.x11.xx3.x14 --port=9000 Inception.pl --image_file=grace_hopper.jpg --host=xx7.x11.xx3.x14 --port=9000
Inception.pl --image_file=anything --debug_camel --debug_loopback --port 2004 --host technologic
|
lib/AI/PredictionClient.pm
view on Meta::CPAN
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | otherwise it will build and install its own local copies.
$ [sudo] apt-get install autoconf automake libtool
See the Alien::Google::GRPC for potential additional build dependencies.
At this time only Linux builds are supported.
|
lib/AI/PredictionClient/Docs/Overview.pod
view on Meta::CPAN
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | Inception.pl --image_file=anything --debug_camel --host=xx7.x11.xx3.x14 --port=9000 Inception.pl --image_file=grace_hopper.jpg --host=xx7.x11.xx3.x14 --port=9000
Inception.pl --image_file=anything --debug_camel --debug_loopback --port 2004 --host technologic
|
lib/AI/PredictionClient/Docs/Overview.pod
view on Meta::CPAN
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | otherwise it will build and install its own local copies.
$ [sudo] apt-get install autoconf automake libtool
See the Alien::Google::GRPC for potential additional build dependencies.
At this time only Linux builds are supported.
|
lib/AI/PredictionClient/InceptionClient.pm
view on Meta::CPAN
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | sub call_inception {
my $self = shift ;
my $image = shift ;
my $tensor = AI::PredictionClient::Classes::SimpleTensor->new();
$tensor ->shape([ { size => 1 } ]);
$tensor ->dtype( "DT_STRING" );
if ( $self ->camel) {
my $camel_test = AI::PredictionClient::Testing::Camel->new();
$tensor ->value([ $camel_test ->camel_jpeg_ref ]);
} else {
$tensor ->value([ $image ]);
}
$self ->inputs({ images => $tensor });
if ( $self ->callPredict()) {
my $predict_output_map_href = $self ->outputs;
my $inception_results_href ;
|
lib/AI/PredictionClient/Testing/Camel.pm
view on Meta::CPAN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | $AI::PredictionClient::Testing::Camel::VERSION = '0.05' ;
use 5.010;
my $camel_jpeg_b64 ;
my $camel_png_b64 ;
has camel_jpeg_ref => (
is => 'lazy' ,
builder => 1,
|
lib/AI/PredictionClient/Testing/Camel.pm
view on Meta::CPAN
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | gC0AWwC2AGwBeH7G/wLjtM2l8m/OTQAAAABJRU5ErkJggg==';
|
lib/AI/PredictionClient/Testing/PredictionLoopback.pm
view on Meta::CPAN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | $AI::PredictionClient::Testing::PredictionLoopback::VERSION = '0.05' ;
use 5.010;
around BUILDARGS => sub {
my $orig = shift ;
my $class = shift ;
if ( @_ == 1 && ! ref $_ [0]) {
|
lib/AI/PredictionClient/Testing/PredictionLoopback.pm
view on Meta::CPAN
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | } else {
return $class -> $orig ( @_ );
}
};
has server_port => ( is => 'rw' ,);
sub callPredict {
my ( $self , $request_data ) = @_ ;
my $test_return01
= '{ "outputs" :{ "classes" :{ "dtype" : "DT_STRING" , "tensorShape" :{ "dim" :[{ "size" : "1" },{ "size" : "6" }]}, "stringVal" :[ "bG9vcGJhY2sgdGVzdCBkYXRhCg==" , "bWlsaXRhcnkgdW5pZm9ybQ==" , "Ym93IHRpZSwgYm93LXRpZSwgYm93dGll" , "bW9ydGFyYm9hcmQ=" ,"c3VpdCwgc3VpdCBvZiBjbG90...
my $test_return02
= '{ "outputs" :{ "classes" :{ "dtype" : "DT_STRING" , "tensorShape" :{ "dim" :[{ "size" : "1" },{ "size" : "5" }]}, "stringVal" :[ "bG9hZCBpdAo=" , "Y2hlY2sgaXQK" , "cXVpY2sgLSByZXdyaXRlIGl0Cg==" , "dGVjaG5vbG9naWMK" , "dGVjaG5vbG9naWMK" ]}, "scores" :{ "dtype" : "DT_FLOAT" ,"tensor...
my $return_ser = '{"Status": "OK", ' ;
$return_ser .= '"StatusCode": "42", ' ;
$return_ser .= '"StatusMessage": "", ' ;
$return_ser .= '"DebugRequestLoopback": ' . $request_data . ', ' ;
if ( $self ->server_port eq 'technologic:2004' ) {
$return_ser .= '"Result": ' . $test_return02 . '}' ;
} else {
$return_ser .= '"Result": ' . $test_return01 . '}' ;
}
return $return_ser ;
}
1;
|
t/00load.t
view on Meta::CPAN
1 2 3 4 5 6 7 8 9 10 11 | BEGIN {
use_ok( 'AI::PredictionClient::CPP::PredictionGrpcCpp' );
}
ok( 1, 'AI::PredictionClient::CPP::PredictionGrpcCpp loaded.' );
done_testing();
|
t/author-critic.t
view on Meta::CPAN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #!perl
BEGIN {
unless ( $ENV {AUTHOR_TESTING}) {
print qq{1..0 # SKIP these tests are for testing by the author\n} ;
exit
}
}
all_critic_ok();
|
t/author-pod-spell.t
view on Meta::CPAN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | BEGIN {
unless ( $ENV {AUTHOR_TESTING}) {
print qq{1..0 # SKIP these tests are for testing by the author\n} ;
exit
}
}
|
t/author-pod-syntax.t
view on Meta::CPAN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #!perl
BEGIN {
unless ( $ENV {AUTHOR_TESTING}) {
print qq{1..0 # SKIP these tests are for testing by the author\n} ;
exit
}
}
all_pod_files_ok();
|
t/release-minimum-version.t
view on Meta::CPAN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #!perl
BEGIN {
unless ( $ENV {RELEASE_TESTING}) {
print qq{1..0 # SKIP these tests are for release candidate testing\n} ;
exit
}
}
eval "use Test::MinimumVersion" ;
plan skip_all => "Test::MinimumVersion required for testing minimum versions"
if $@;
all_minimum_version_ok( qq{5.10.1} );
|