DSGT-DLP / Deep-Learning-Playground

Web Application where people new to Deep Learning can input a dataset and toy around with basic Pytorch modules without writing any code
MIT License
24 stars 8 forks source link

Add CLI Cmds to use Mamba with Poetry #963

Closed dwu359 closed 1 year ago

dwu359 commented 1 year ago

Add CLI Cmds to use Mamba with Poetry

What user problem are we solving? Faster installation times, no stupid pyenv version errors, cross-platform packages like pytorch can be better handled by mamba

What solution does this PR provide? backend install cmd creates a conda env named dlp, installs all packages in environment.yml with mamba, and then installs all packages in pyproject.toml with poetry.

backend add, remove cmds add and remove packages mainly from poetry unless specifically specified to install via mamba. Unfortunately mamba/conda doesn't provide support by itself to easily update environment.yml automatically, but there's a yellow IMPORTANT message at the end followed by instructions on how to update the yml properly for conda packages. Most packages should be installed via poetry though, so most people don't have to worry about this anyways.

backend uninstall cmd added

Testing Methodology How did you test your changes and verify that existing functionality is not broken backend install works backend add arrow works backend remove arrow works backend add keras -m works backend remove keras -m works

Any other considerations

karkir0003 commented 1 year ago

@dwu359 wouldn't this PR be made under dlp-cli repo and goreleaser pushes the updates automatically?

karkir0003 commented 1 year ago

@dwu359 for the mamba env name, can we make that a constant so that we don't "hardcode" parameters into the main add/remove go scripts we just added since we should force env name in mamba to be dlp

Should this install command be rerun even if a returning dev had working installation from before?

karkir0003 commented 1 year ago

@dwu359 can you put screenshots to show the test results if you can?

dwu359 commented 1 year ago

@dwu359 for the mamba env name, can we make that a constant so that we don't "hardcode" parameters into the main add/remove go scripts we just added since we should force env name in mamba to be dlp

Should this install command be rerun even if a returning dev had working installation from before?

We can, but mamba is also significantly better

dwu359 commented 1 year ago

@karkir0003 Just added support for ubuntu terminals with the -w flag (runs cmds as if it were in a non-unix terminal)