-
Notifications
You must be signed in to change notification settings - Fork 165
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
[proposal] make the CLI available without cloning the repo #373
Conversation
Additional note, I’m honestly unsure whether running the CLI script outside of conda changes anything, even though from my understanding it shouldn’t |
I like this idea. However, your PR does unfortunately introduce a lot of issues that need to get addressed before I can merge it. I'll need to find some time to review this. |
Oh, I’m sorry I haven’t noticed them! If you give me some pointers I can try to address the issues 💪 One thing I just noticed is that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See notes
README.md
Outdated
@@ -29,32 +29,9 @@ After installing the Python package, a GUI can be accessed by running `nam` in t | |||
|
|||
### The command line trainer (all features) | |||
|
|||
Alternatively, you can clone this repo to your computer and use it locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[BLOCKING] Don't delete this. This is instructions for how to do development with the repo.
It's ok w/ me if you want to add some small section saying that pip install neural-amp-modeler
is a thing if you want to depend on it w/o modifying it. But I want developers to understand how to correctly set up their development environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good 👌 My (obviously questionable) suggestion is to clarify what is a CONTRIBUTING
guide and what are usage guidelines. This paragraph looks more like user guidelines, so I'd specify that.
I'll leave them as they are and possibly add just a paragraph about pip 💪
nam/train/cli.py
Outdated
@@ -225,11 +225,15 @@ def main_inner( | |||
model.net.export(outdir) | |||
|
|||
|
|||
if __name__ == "__main__": | |||
def main(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Nit] Now that there are 3 different "entry points" with different interfaces, it'd probably be good to docstring why they're all here and what they achieve [I can handle this.]
I rewrote the PR from scratch as I thought it'd have been simpler - and indeed I came up with way fewer and leaner changes IMHO 🚀 Sorry for the first round of review, it must have been tough as the PR was a bit messy and changed a lot of things I didn't quite check you agreed with before 🙏 What mainly changes from the "previous version of the PR" is:
I guess this is what you were referring to when you mentioned the broken test - indeed Thanks!! 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this looks great!
I can take care of the nits and checks myself, but thanks for taking the initiative on this--I like it 👍🏻
@@ -38,6 +38,29 @@ Then activate the environment you've created with | |||
|
|||
conda activate nam | |||
|
|||
Alternative: directly install the PyPi package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: PyPI
|
||
pip install neural-amp-modeler | ||
|
||
In this case, you can just run `nam-cli` in your shell instead of cloning the repository and running the `bin/train/main.py` script as explained below in the training section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
In rst it's two backticks, not one (little different from Markdown)
-
Let's call it
nam-full
plot(model, dataset_validation, show=not no_show) | ||
# Export! | ||
model.net.export(outdir) | ||
from nam.train.cli import run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Know what? Let's just remove this file altogether. I'm looking to do a release that makes breaking changes; might as well put this break as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great to me 🚀
# See: | ||
# https://github.com/sdatkinson/neural-amp-modeler/issues/105 | ||
# https://stackoverflow.com/a/44822794 | ||
def _ensure_graceful_shutdowns(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Critical] Does this still work? I'll want to check.
@@ -55,6 +55,7 @@ def get_additional_requirements(): | |||
entry_points={ | |||
"console_scripts": [ | |||
"nam = nam.train.gui:run", | |||
"nam-cli = nam.train.cli:run", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nam-full
Great!! LMK if you want me to help somehow 🚀 Thank you! |
@Eraz1997 on second thought, if you can grab those changes before Thursday you'll probably get to it before me :) |
@sdatkinson unfortunately I don't have band this week, LMK if it can be of any help next week as well! |
Got the nits and did a bit of cleanup on the documentation in Eraz1997/main. Closing this PR and we'll merge there 👍🏻 |
Perfect!! 🚀 |
hey 👋
This repo and the job you did is amazing! I wanted to contribute with this PR with something I'd value when it comes to some of my personal projects. I'm not sure this is something you want to upstream as well, so I marked it as a "proposal".
With all these changes, I actually just moved the
bin/train/main.py
script inside the package to make it available to users installing thenam
PyPi package without having to clone the whole repo.Since there's no "bin" inside the
bin
folder anymore, I moved thebin/train
one at the root level.Finally, I aligned the
README
with these changes (+ I removed some old, I guess, paragraphs)I hope it can be of any help 💪