Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructured and modularized code #5

Merged
merged 3 commits into from Oct 20, 2021
Merged

Conversation

AdityaKane2001
Copy link
Contributor

@AdityaKane2001 AdityaKane2001 commented Oct 12, 2021

@sradc

As discussed I have modularized the code in a way I think is best. Please take a look at the structure and let me know if you think there need to be any changes. All tests are passing.

# New structure

.
├── smallpebble/
│   ├── core/
│   │   ├── __init__.py
│   │   └── ops.py/
│   │       ├── AssignmentError
│   │       ├── Lazy
│   │       ├── Placeholder
│   │       ├── Variable
│   │       ├── add
│   │       ├── add_at
│   │       ├── broadcastinfo
│   │       ├── div
│   │       ├── enable_broadcast
│   │       ├── exp
│   │       ├── expand_dims
│   │       ├── get_gradients
│   │       ├── getitem
│   │       ├── log
│   │       ├── matmul
│   │       ├── matrix_transpose
│   │       ├── maxax
│   │       ├── mul
│   │       ├── neg
│   │       ├── np_add_at
│   │       ├── np_strided_sliding_view
│   │       ├── reshape
│   │       ├── setat
│   │       ├── square
│   │       ├── sub
│   │       ├── sum
│   │       └── where 
│   ├── nn/
│   │   ├── __init__.py
│   │   ├── conv.py/
│   │   │   ├── conv2d
│   │   │   ├── maxpool2d      
│   │   │   ├── pad        
│   │   │   ├── pad_amounts
│   │   │   ├── padding2d
│   │   │   ├── patches_index
│   │   │   └── strided_sliding_view
│   │   └── training.py/
│   │       ├── Adam
│   │       ├── batch
│   │       ├── convlayer
│   │       ├── cross_entropy
│   │       ├── get_learnables
│   │       ├── he_init
│   │       ├── leaky_relu
│   │       ├── learnable
│   │       ├── linearlayer
│   │       ├── onehot
│   │       ├── sgd_step
│   │       └── softmax
│   ├── misc/
│   │   └── <unchanged>
│   ├── tests/
│   │   └── <unchanged>
│   ├── array_ibrary.py/
│   │   └── <unchanged>
│   └── version.py/
│       └── <unchanged>
├── LICENSE
├── README
├── build.py
├── setup.py
└── ...

@sradc
Copy link
Owner

sradc commented Oct 18, 2021

Hey, sorry for the delay. Looks like a good start. Can you:

  • Format the files with black, black --line-length 92
  • Have this as the header of the files:
# Copyright 2021 The SmallPebble authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

@AdityaKane2001
Copy link
Contributor Author

AdityaKane2001 commented Oct 20, 2021

@sradc

Done!
Since I'll be contributing a ton to the repo, could you please make me a collaborator? It will make it easy to handle things, I can keep a branch for myself.

@sradc
Copy link
Owner

sradc commented Oct 20, 2021

@AdityaKane2001, will do.

PR lgtm, but README.ipynb seems to be corrupted. Do you also get this issue, and can you revert the notebook so it's non-corrupted?

@AdityaKane2001
Copy link
Contributor Author

@sradc

Restored the notebook.

Thanks for the invitation!

@sradc sradc self-requested a review October 20, 2021 18:12
Copy link
Owner

@sradc sradc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. I ran the tests locally they pass. Thanks for adding the license + formatting. I was never 100% sure about the modularisation, but happy to go with it and see how it works out.

@sradc sradc merged commit c345fc3 into sradc:main Oct 20, 2021
@AdityaKane2001
Copy link
Contributor Author

AdityaKane2001 commented Oct 20, 2021

@sradc

I see. Thanks for merging!

Let me know what's the upcoming agenda.

Edit: I'd just need a few days to read up the code. I'm not yet completely familiar with the code, so I'll just go through it and then I'll start any new tasks. Sounds good?

@sradc
Copy link
Owner

sradc commented Oct 20, 2021

@AdityaKane2001, np!

I'd just need a few days to read up the code. I'm not yet completely familiar with the code, so I'll just go through it and then I'll start any new tasks. Sounds good?

No problem, let me know if you have any questions. I think the documentation could be improved, and I do plan to write a more tutorial style guide to the implementation at some point.

The stuff on this todo list still looks good, and I'm happy to hear other ideas too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants