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

Birmiwal.rahul development #107

Merged
merged 47 commits into from
Oct 30, 2023
Merged

Birmiwal.rahul development #107

merged 47 commits into from
Oct 30, 2023

Conversation

RBirmiwal
Copy link
Collaborator

This branch contains updates that incorporate the following desired tasks:

  1. Automate docs build from master to gh-pages
  2. Unittesting for problem and system

These files are test_system.py, test_problem.py, .github/workflows/update_docs.yml, /docs/readme.md

There is an update to the readme in /docs to reflect the change in documentation update.
There is also a one-line change to the docstring of System's MovingHorizon class (system.py) -- correcting an error that the output should be a 3D tensor of shape (ndelay, batch, dim)

@madelynshapiro
Copy link
Collaborator

Is the tmp/html/ folder necessary to merge into master for the automated gh-pages build or is it leftover from testing the docs deployment?

Copy link
Contributor

@drgona drgona left a comment

Choose a reason for hiding this comment

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

nicely done!

@RBirmiwal
Copy link
Collaborator Author

Made some additional changes to test_system.py and system.py. Added in output correctness check to MovingHorizon forward. Also modified associated docstring in system.py. The output should indeed be of dimension [ndelay, batch, data_dim]. One can confirm this by running:

torch.manual_seed(0)

# 1, wrap nn.Linear into Node
net_1 = lambda x: x*2
node_1 = Node(net_1, ['x1'], ['y1'])
# print input and output keys
# evaluate forward pass of the node with dictionary input dataset
input_data = {'x1': torch.rand(3,1)}
output = (node_1(input_data))

horizon = MovingHorizon(node_1, ndelay=5)
baz = horizon(input_data)

print(baz['y1'].shape) 

should print torch.size([5,3,1])

@RBirmiwal RBirmiwal merged commit eb97a80 into develop Oct 30, 2023
@madelynshapiro madelynshapiro mentioned this pull request Nov 7, 2023
@RBirmiwal RBirmiwal deleted the birmiwal.rahul_development branch April 9, 2024 00:15
colbyham pushed a commit that referenced this pull request Jun 27, 2024
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.

3 participants