Skip to content

Commit

Permalink
drhuffman12/add_team_utils_part_6 (#61)
Browse files Browse the repository at this point in the history
* drhuffman12/add_team_utils_part_6 remove aarch64 build (for now)

* drhuffman12/add_team_utils_part_6 comment cleanup

* drhuffman12/add_team_utils_part_6 misc tests re train_and_and_cross_breed_team*

* drhuffman12/add_team_utils_part_6 eval_team*

* drhuffman12/add_team_utils_part_6 rename 'Ai4cr::Data::Utils' to 'Ai4cr::Utils::Rand'; start 'Utils::IoSet::FileText

* drhuffman12/add_team_utils_part_6 initial app and test code re Ai4cr::Utils::IoSet

* drhuffman12/add_team_utils_part_6 finalize app and test code for 'Ai4cr::Utils::IoSet::Abstract' and sub-classes

* drhuffman12/add_team_utils_part_6 rename 'Ai4cr::Utils::IoSet' as 'Ai4cr::Utils::IoData'

* drhuffman12/add_team_utils_part_6 rename 'ios' to 'iod'

* drhuffman12/add_team_utils_part_6 handle old/new Enum.to_json

* drhuffman12/add_team_utils_part_6 add app and test code re '#iod_to_io_set_with_offset'

* drhuffman12/add_team_utils_part_6 app and test code re '#iod_to_io_set_with_offset_time_cols'

* drhuffman12/add_team_utils_part_6 adjust tests re 'Ai4cr::Utils::IoData::FileText' (pend the transitional test for Crystal 0.36.0 vs 1.0.0)

* drhuffman12/add_team_utils_part_6 version bump from '0.1.22' to '0.1.23'
  • Loading branch information
drhuffman12 committed Feb 28, 2021
1 parent 376f8eb commit 54cf06e
Show file tree
Hide file tree
Showing 29 changed files with 1,188 additions and 233 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/linux_aarch64.yml

This file was deleted.

4 changes: 1 addition & 3 deletions .github/workflows/linux_amd64.yml
@@ -1,10 +1,8 @@
name: Crystal CI
name: Crystal CI Ubuntu

on:
push:
branches: [ master ]
# pull_request:
# branches: [ master ]

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,3 +8,4 @@
/shard.lock

/test-results/
spec/tmp/
7 changes: 3 additions & 4 deletions README.md
Expand Up @@ -56,7 +56,7 @@ e.g.: `time crystal spec --release`

Use the `-Dpreview_mt` (for `crystal build` or `-D preview_mt` for `crystal spec`) flag for multithreading.

e.g.: `CRYSTAL_WORKERS=16 crystal spec spec/ai4cr/neural_network/rnn/rnn_simple_manager_spec.cr --release -D preview_mt`
e.g.: `CRYSTAL_WORKERS=14 crystal spec spec/ai4cr/neural_network/rnn/rnn_simple_manager_spec.cr --release -D preview_mt`

See also:
* https://crystal-lang.org/2019/09/23/crystal-0.31.0-released.html
Expand Down Expand Up @@ -84,11 +84,10 @@ REMINDER: Running Crystal in a Docker container (at least used to) runs slower t
So, for more performance, run it outside of a Docker container.


To build and run them:
To build and run them and see the debugging output (DEBUG=1):

```
crystal build --release src/bench/mini_nets_vs_backprop.cr
./mini_nets_vs_backprop
DEBUG=1 crystal spec spec_bench
```

Example output:
Expand Down
2 changes: 1 addition & 1 deletion shard.yml
@@ -1,5 +1,5 @@
name: ai4cr
version: 0.1.22
version: 0.1.23

authors:
- Daniel Huffman <drhuffman12@yahoo.com>
Expand Down
2 changes: 1 addition & 1 deletion spec/ai4cr/neural_network/rnn/rnn_simple_manager_spec.cr
Expand Up @@ -2,7 +2,7 @@ require "./../../../spectator_helper"

Spectator.describe Ai4cr::NeuralNetwork::Rnn::RnnSimpleManager do
let(my_breed_manager) { Ai4cr::NeuralNetwork::Rnn::RnnSimpleManager.new }
let(delta_child_1) { Ai4cr::Data::Utils.rand_neg_half_to_pos_one_and_half_no_zero_no_one }
let(delta_child_1) { Ai4cr::Utils::Rand.rand_neg_half_to_pos_one_and_half_no_zero_no_one }

let(ancestor_adam_value) { 0.1 }
let(ancestor_eve_value) { 0.9 }
Expand Down
34 changes: 34 additions & 0 deletions spec/ai4cr/utils/io_set/file_type_spec.cr
@@ -0,0 +1,34 @@
require "./../../../spectator_helper"

Spectator.describe Ai4cr::Utils::IoData::FileText do
let(file_type_raw) { Ai4cr::Utils::IoData::FileType::Raw }
let(file_type_iod) { Ai4cr::Utils::IoData::FileType::Iod }

describe "FileType" do
context "Raw" do
it "#to_s" do
expect(file_type_raw.to_s).to eq("Raw")
end

pending "#to_json" do
# old_type = "0" # as of Crystal 0.36.0 [1e6f96aef] (2021-01-26)
new_type = "raw" # as of Crystal 1.0.0-dev [eef60c49b] (2021-02-25)

expect(file_type_raw.to_json).to eq(new_type)
end
end

context "Iod" do
it "#to_s" do
expect(file_type_iod.to_s).to eq("Iod")
end

pending "#to_json" do
# old_type = "1" # as of Crystal 0.36.0 [1e6f96aef] (2021-01-26)
new_type = "iod" # as of Crystal 1.0.0-dev [eef60c49b] (2021-02-25)

expect(file_type_iod.to_json).to eq(new_type)
end
end
end
end

0 comments on commit 54cf06e

Please sign in to comment.