Iainmon / ChAI

A Chapel library for Machine Learning that supports distributed inference, automatic differentiation, and CUDA/HIP utilization.
https://iainmon.github.io/ChAI
4 stars 5 forks source link

[Design Issue] Overcomplicated module children system #13

Open Iainmon opened 1 month ago

Iainmon commented 1 month ago

The system that keeps track of a module's children, their names, order, etc. is overcomplicated and should be fixed. It will impact how users interact with their models.

In lib/Network.chpl, we have, https://github.com/Iainmon/ChAI/blob/da80575fa1fdc90b22531168662814e1755ca434/lib/Network.chpl#L271 which should just be a dict(string,shared Module) or something. It seems like the moduleChildren record just causes more problems and requires more overloads. Most of the iters in the module class shouldn't really be used. I wasn't able to spend too much time designing this and think it could be made much simpler.