lf1-io / padl

Functional deep learning
Apache License 2.0
106 stars 4 forks source link

fixed output arrow #413

Closed jasonkhadka closed 2 years ago

jasonkhadka commented 2 years ago

Description

Fixes #258

t = plus_out3 >> m1 / m2 / m2>> plus

Compose - "t":

      │
      ▼ x
   0: plus_out3         
      ││└───────────────────────────────────────┐
      │└───────────────────┐                    │
      │                    │                    │
      ▼ arg                ▼ arg                ▼ arg
   1: multiply(factor=2) / multiply(factor=2) / multiply(factor=2)
      │____________________│                    │
      │_________________________________________│ 
      │
      ▼ a
   2: plus  

previous output:

Compose - "t":

      │
      ▼ x
   0: plus_out3         
      ││└───────────────────────────────────────┐
      │└───────────────────┐                    │
      │                    │                    │
      ▼ arg                ▼ arg                ▼ arg
   1: multiply(factor=2) / multiply(factor=2) / multiply(factor=2)
      │
      ▼ a
   2: plus  
codecov-commenter commented 2 years ago

Codecov Report

Merging #413 (69c58f1) into main (0fc0746) will increase coverage by 0.65%. The diff coverage is 100.00%.

:exclamation: Current head 69c58f1 differs from pull request most recent head 350fadd. Consider uploading reports for the commit 350fadd to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #413      +/-   ##
==========================================
+ Coverage   87.54%   88.20%   +0.65%     
==========================================
  Files          15       15              
  Lines        3035     3060      +25     
==========================================
+ Hits         2657     2699      +42     
+ Misses        378      361      -17     
Impacted Files Coverage Δ
padl/print_utils.py 98.21% <100.00%> (+25.13%) :arrow_up:
padl/transforms.py 91.33% <100.00%> (+0.44%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0fc0746...350fadd. Read the comment docs.

wuhu commented 2 years ago

Looks good - while we're at it, two suggestions:

jasonkhadka commented 2 years ago

those sounds good. i will update those things.

jasonkhadka commented 2 years ago

@wuhu
New arrows for parallel

t = m1 / m2 / m2 >> plus

Compose - "t":

      ││└───────────────────────────────────────┐
      │└───────────────────┐                    │
      │                    │                    │
      ▼ arg                ▼ arg                ▼ arg
   0: multiply(factor=2) / multiply(factor=2) / multiply(factor=2)
      |                    │                    │
      │┌───────────────────┘                    │
      ││┌───────────────────────────────────────┘ 
      ▼▼▼ arg
   1: plus      

New print for rollout >> rollout

t = m1 + m2 + m2 >> m1 + m2 + m2 >> plus

t

Compose - "t":

      └─────────────────────────────────────────┐
      └────────────────────┐                    │
      │                    │                    │
      ▼ arg                ▼ arg                ▼ arg
   0: multiply(factor=2) + multiply(factor=2) + multiply(factor=2)
      |                    │                    │
      ┌────────────────────┘                    │
      ┌─────────────────────────────────────────┘ 
      ▼
      └─────────────────────────────────────────┐
      └────────────────────┐                    │
      │                    │                    │
      ▼ arg                ▼ arg                ▼ arg
   1: multiply(factor=2) + multiply(factor=2) + multiply(factor=2)
      |                    │                    │
      ┌────────────────────┘                    │
      ┌─────────────────────────────────────────┘ 
      ▼ arg
   2: plus
sjrl commented 2 years ago

Nice! This looks really good.