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

Fix notebooks #212

Merged
merged 4 commits into from
Nov 13, 2024
Merged

Fix notebooks #212

merged 4 commits into from
Nov 13, 2024

Conversation

josephdviviano
Copy link
Collaborator

Fixes the smiley and simple continuous notebook to properly use the current torchgfn API.

@josephdviviano josephdviviano added the bug Something isn't working label Nov 8, 2024
@josephdviviano josephdviviano self-assigned this Nov 8, 2024
Copy link
Collaborator

@younik younik 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 have reproduced the output on my laptop, which is good.

I have a couple of questions. Unfortunately, I cannot comment on diff.

env = LineEnvironment(
-   mus=[-2, 4, 6, 10],
+   mus=[-3, 4, 6, 10],
    variances=[0.2, 0.4, 1, 0.2],
    n_sd=4.5,
    init_value=0
)

What is the rationale for this change (cell 16, continuous line tutorial)?

-def make_States_class(self) -> type[DiscreteStates]:
-  ...
+# def make_States_class(self) -> type[DiscreteStates]:
+#  ...

In the smiley tutorial, you commented out this function, as it is not necessary... can we just delete it?

@josephdviviano
Copy link
Collaborator Author

josephdviviano commented Nov 11, 2024 via email

@alip67
Copy link
Collaborator

alip67 commented Nov 11, 2024

I reproduced the output on colab, which is good. A few Suggestion:
1- Add !pip install trochgfn in the start of the Torchgfn section.
2- change the env.mask_invalid_actions in the FacesEnv to the self.mask_invalid_actions
3- Add a colab link for all of the notebooks

@josephdviviano
Copy link
Collaborator Author

Thanks good catch @alip67 RE: env. vs self.. OTOH, I don't really want to support colab, these notebooks are designed to be run on your local machine.

@josephdviviano josephdviviano merged commit 4a9f112 into master Nov 13, 2024
4 checks passed
@josephdviviano josephdviviano deleted the fix_notebooks branch November 13, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants