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

feat: chex-ify testsuite #12

Merged
merged 8 commits into from
Oct 9, 2024
Merged

feat: chex-ify testsuite #12

merged 8 commits into from
Oct 9, 2024

Conversation

SauravMaheshkar
Copy link
Collaborator

  • drop .pre-commit-config.yaml.
  • fix README instructions for running the cli.
  • add .vscode/settings.json with a simple vscode config.
  • delete redundant jflux/__main__.py.
  • enforce ruff style rules E, F and W.
  • chex-ify testsuite.

@SauravMaheshkar SauravMaheshkar added the feature 🚀 New feature or request label Oct 9, 2024
@SauravMaheshkar SauravMaheshkar added this to the v0.0.01 milestone Oct 9, 2024
@SauravMaheshkar SauravMaheshkar self-assigned this Oct 9, 2024
Copy link
Collaborator

@ariG23498 ariG23498 left a comment

Choose a reason for hiding this comment

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

Very close to merging. Have left some comments.

Let's also add a setUp function so that we don't need to setup the inputs? What do you think?

jflux/cli.py Outdated
Comment on lines 218 to 219
img = Image.fromarray((127.5 * (x + 1.0)))
img.save(fn, quality=95, subsampling=0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for doing this.

I am doing this

        x = (127.5 * (x + 1.0))
        x_numpy = np.array(x.astype(jnp.uint8))
        img = Image.fromarray(x_numpy)

        img.save(fn, quality=95, subsampling=0)
        idx += 1

Can you add this bit in this PR?

Copy link
Collaborator Author

@SauravMaheshkar SauravMaheshkar Oct 9, 2024

Choose a reason for hiding this comment

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

Added in 07cf60a

jflux/util.py Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

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

in port_flux we are missing a return statement

Could you add return flux

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added in 9bd82d6

@@ -32,7 +32,10 @@ jflux = { workspace = true }
flux = { git = "https://github.com/black-forest-labs/flux.git" }

[tool.ruff.lint]
select = ["I001"]
select = ["E", "F", "I001", "W"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just asking -- what does this do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So previously, we weren't utilising most of the nice ruff rules. This snippet enables some nice rules from https://docs.astral.sh/ruff/rules/

Copy link
Collaborator

@ariG23498 ariG23498 left a comment

Choose a reason for hiding this comment

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

🥳

@ariG23498 ariG23498 merged commit bf2d84c into main Oct 9, 2024
11 checks passed
@ariG23498 ariG23498 deleted the saurav/chexify branch October 9, 2024 08:45
@SauravMaheshkar SauravMaheshkar linked an issue Oct 9, 2024 that may be closed by this pull request
4 tasks
@SauravMaheshkar SauravMaheshkar mentioned this pull request Oct 9, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🚀 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Roadmap
2 participants