Commit Graph

24 Commits

Author SHA1 Message Date
Kyle Altendorf
d84917f5df
hint chia.plotting.create_plots (#14692)
* hint chia.plotting.create_plots

* correct the import

* fixup

* imports

* get final from typing_extensions
2023-03-08 12:57:50 -06:00
Kyle Altendorf
20b2d66012
fix reporting of deprecation of plotter install and bladebit2 commands (#14421) 2023-02-07 18:13:01 -06:00
dustinface
42f6a883ae
isort: Remove the remaining exceptions and sort the related files (#14124) 2022-12-13 17:10:55 -06:00
Izumi Hoshino
b37f2009bd
Made it able to RAM plot with bladebit2 (#13833) 2022-11-30 12:09:30 -06:00
wjblanke
5c38a39077
upped the number of file handles for madmax (#13856)
* upped the number of file handles. this won't affect the hard limit but only soft limits set previously

* Set soft limit to max (hard limit)
2022-11-09 03:31:51 -06:00
Kyle Altendorf
fa5bcf3e82
leverage argparse for chia plotters help (#13742) 2022-10-28 23:59:36 -05:00
Izumi Hoshino
6dfbc1ef7c
Made error message of chia plotters version more traceable (#13704) 2022-10-26 15:48:24 -05:00
Izumi Hoshino
0e93464521
Deprecate chia plotters install command (#13584)
* Deprecated `chia plotters install` command

* Fixed lint errors

* Made it able to recognize plotter executables in venv

* Added install-plotter.sh

* Removed strings for debug

* Added install-plotter.ps1

* Fixed an issue where madmax plotter under venv dir was not recognized by 'chia plotters' command

* Added exec permission to install-plotter.sh

* Fixed issues found in install-plotter.sh

* Fixed lint errors

* Added `-p` option to install.sh/install.ps1

* Fixed lint errors

* Added nice deprecated warning

* Fixed a lint error

* Slightly improved branching

* Made log messages look nice

* Fixed an issue where install.sh/ps1 -p failed if virtual env is not acivated
2022-10-17 12:35:58 -05:00
Kyle Altendorf
3b084a165b
configure isort to add the future annotations import (#13327)
* configure isort to add the future annotations import

* apply the new isort setting

* remove type ignores for new mypy (#13539)

https://pypi.org/project/mypy/0.981/

* another
2022-09-30 03:40:22 -05:00
Izumi Hoshino
e40772a0bf
Added support for --no-t1-direct and --no-t2-direct (#13526) 2022-09-26 09:20:40 -05:00
Izumi Hoshino
a2b6a9b5f3
Cmj.bladebit (#11187)
* Making source code cleaner

* Cleaned up `install_plotter.py`

* Now `$CHIA_ROOT/plotters/bladebit` is searched first then bundled bladebit

* Fixed a lint error

* WIP: Implement bladebit update/checkout feature

* Enable to specify git branch/tag/commit on bladebit installation

* Modify arguments display order

* Added `chia plotters version` command

* Fixed lint errors

* Fixed lint error 2

* Implemented `chia plotters bladebit2` and handling for its options

* Fixed typo

* Fixed a lint error

* Added comment

* Added missing plotter arguments

* Fixed LGTM warning

* Fixed wrong typing

* Fixed a lint error

* Fixed an issue where `None` was evaluated as an empty string

* Support bladebit2 plotting from web request

* Updated response of `get_plotters` API for upcoming `bladebit2`

* Fixed bladebit2 argument handling

* Modified progress dict

* Added --no-cpu-affinity option to bladebit1

* Fixed a minor error

* Fixed an error where `chia plotters version` failed

* Fixed an issue where building bladebit2 failed

* Fixed an issue where bladebit2 stopped working if `--cache` option was set

* Updated branch for bladebit2

* Fixed an issue where plotting with madmax/bladebit failed for Python < 3.8 on Windows

* Now `chia plotters install madmax|bladebit2` should work on RedHat like OSes

* Fixed a wrong yum package name

* Added yum packages required for Bladebit2

* Changed the way to update bladebit

* Implemented option handling for madmax as well as bladebit

* Fixed a lint error

* Fixed a minor issue

* Fixed LGTM warning

* Applied changes for bladebit 2.0.0-alpha-2

* Fixed a lint error

* Trying to fix windows pre-commit error

* Fixed isort error
2022-09-23 19:42:37 -05:00
dustinface
47ea161330
plotters: Only produce beta logs if beta: true, not if it just exists (#13445) 2022-09-16 16:20:54 -05:00
dustinface
70fe981fb3
cmds: Implement chia beta (#12389)
* cmds: Implement `chia beta` for the beta test program

* Unhide and document all `beta` subcommands

* Refactor all subcommands

* Introduce `chia beta configure`

* Introduce `chia beta status`

* Test all `chia beta` commands

* Use a separate file logger for beta logs

* Write the plotting call args to the log file

* Sort potential submissions

* Some refactoring around log file log handler creation

* JSON dump the plotting args
2022-09-12 16:57:31 -05:00
dustinface
84b0da7587
plotters: Move install_plotter into plotters (#12403) 2022-08-15 12:18:55 -05:00
Kyle Altendorf
11b210809b
run pre-commit across platforms in ci (#12287)
* run pre-commit across platforms in ci

why?  because we have developers working on multiple platforms.

* pre-clean for pre-commit in ci

* chia setup python action

* fixup

* fix windows specific hinting

* no TypeAlias yet

* debug

* debug

* adjust activated.ps1

* verbose pre-commit

* exit better

* Revert "debug"

This reverts commit 93a100afc7.

* less debug

* less `|`

* Update .pre-commit-config.yaml

* Update activated.ps1
2022-07-15 21:08:07 -05:00
dustinface
c400d816af
harvester: Validate the path in add_plot_directory (#11625)
Make sure it exists, is a directory and hasn't been added already.
2022-05-24 13:21:44 -07:00
Zachary Brown
a1db012b7a
Add libgmp-dev to Bladebit installation (#11406) 2022-05-05 08:17:14 -07:00
Zachary Brown
3767fed513
update plotters installation to include an apt update before the apt install (#11400) 2022-05-02 15:56:49 -07:00
Mariano Sorgente
9ff3fc993f
Ms.plot load perf2 (#10978)
* 2.7 seconds -> 0.45 seconds

* Merge

* Work on create_plots refactor

* Try to fix tests

* Try to fix tests

* Use new functions

* Fix block_tools by adding dir

* Extra argument

* Try to fix cyclic import

* isort

* Drop warning

* Some cleanups around `exclude_final_dir` and directory adding

* Cleanup `min_mainnet_k_size` checks

* Drop unrelated changes

* Fixes after rebase

* Fix cyclic import

* Update tests/block_tools.py

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* Update tests/block_tools.py

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2022-04-11 09:16:01 -07:00
Kyle Altendorf
a691d3c4b2
asyncio.get_event_loop() is deprecated in 3.10, stop using it (mostly) (#10418)
* asyncio.get_event_loop() is deprecated in 3.10, stop using it

https://docs.python.org/3.10/library/asyncio-eventloop.html#asyncio.get_event_loop
> Deprecated since version 3.10: Deprecation warning is emitted if there is no running event loop. In future Python releases, this function will be an alias of get_running_loop().

* black
2022-03-28 13:20:50 -07:00
Kyle Altendorf
65c0829f66
madMAx executable discovery error handling cleanup (#9501)
* Add missing version=None for

* Log errors in get_madmax_install_info() instead of printing
2022-02-14 22:28:42 -08:00
Jeff
1fd7197df0
CLI fixes for plotting with madmax (#9197)
* Fixed waitforcopy when using madmax CLI

* Fixed madmax CLI usage with the tmptoggle -G option

* Don't specify a default for tmpdir2

* Removed defaults for tmp/tmp2/final dirs. Values must be provided.
2021-11-09 10:52:09 -08:00
Jeff
c80208cda9
Terminate madmax/bladebit on Windows on Ctrl-C (#9113) 2021-11-04 08:59:13 -07:00
Florin Chirica
f550555c7d
Add plotters. (#8497)
* Initial commit add plotters.

* Lint.

* Add progress for bladebit.

* Address some review comments.

* Oops...

* Add install option.

* Change chiapos to fit the old standard.

* Update chia/plotters/bladebit.py

Co-authored-by: Jeff Cruikshank <paninaro@gmail.com>

* Update chia/plotters/install_plotter.py

Co-authored-by: Jeff Cruikshank <paninaro@gmail.com>

* Lint.

* Remove farmerkey as required.

* Chia plotters chiapos works with no arguments.

* Added get_plotters RPC to support the GUI (#8530)

* Added 'get_plotters' daemon RPC. Probes installed/available plotters on behalf of the GUI.

* Linter fix

* Minor type tweak

* Tweaks.

* Run with default arguments all plotters.

* Fix bug.

* Update chia/plotters/bladebit.py

Co-authored-by: Jeff Cruikshank <paninaro@gmail.com>

* Change bladebit repo.

* Update chia/plotters/bladebit.py

Co-authored-by: Jeff Cruikshank <paninaro@gmail.com>

* Update chia/plotters/plotters.py

Co-authored-by: Jeff Cruikshank <paninaro@gmail.com>

* Update chia/plotters/plotters.py

Co-authored-by: Jeff Cruikshank <paninaro@gmail.com>

* Update chia/plotters/plotters.py

Co-authored-by: Jeff Cruikshank <paninaro@gmail.com>

* Update chia/plotters/plotters.py

Co-authored-by: Jeff Cruikshank <paninaro@gmail.com>

* Update chia/plotters/plotters.py

Co-authored-by: Jeff Cruikshank <paninaro@gmail.com>

* Update chia/plotters/plotters.py

Co-authored-by: Jeff Cruikshank <paninaro@gmail.com>

* Update chia/plotters/plotters.py

Co-authored-by: Jeff Cruikshank <paninaro@gmail.com>

* Update chia/plotters/plotters.py

Co-authored-by: Jeff Cruikshank <paninaro@gmail.com>

* Re-added the connect-to-daemon hidden option

* Use connect_to_daemon value for madmax and bladebit plot key resolution.

* Updated --tmp_dir, --tmp_dir2, --final_dir options to match old options from chia plots create

* Add CONNECT_TO_DAEMON as a valid option for madmax/bladebit

* Thread multiplier should be an int

* Passing params for madmax to start_plotting. Still needs cleanup/refactoring.

* Update chia/plotters/bladebit.py

Co-authored-by: Kyle Altendorf <sda@fstab.net>

* Update chia/plotters/madmax.py

Co-authored-by: Kyle Altendorf <sda@fstab.net>

* Filename option -z.

* Factor out calling the plotter.

* First attempt refactor install scripts.

* Switch to exec.

* Attempt to fix mypy warning.

* Remove filename.

* Increase RLIMIT_NOFILE for madmax on non-Windows platforms

* Add trailing path separator to madmax tmpdir/tmp2dir/finaldir arguments (required by madmax)

* Fixes to support madmax plotting from the GUI.
Writing output from the plotters now includes a flush to ensure the plotter log (used by the GUI) is updated frequently.

* Handle madmax's tmptoggle option internally when plotting with the GUI

* Formatting and linter fix

* Fixed the -i option for bladebit

* Construct BladeBit plotting options

* Cleanup code for building plotter command line options

* Added a post-processing step after each plotting job completes. Adds the final_dir plot directory as necessary.

* Fix plotter root path

* Reverting prior checkin. Need to figure out how to handle CHIA_ROOT being overridden

* BladeBit support for Windows

* BladeBit's --memory-json option is used to check memory requirements

* Madmax Windows support

* Plotters directory is now under CHIA_ROOT

* Madmax version detection

* BladeBit will default to 0 threads. BladeBit will max-out available threads with this configuration.

* LGTM fixes

* Module definition for chia.plotters to resolve mypy issues with chiapos (package vs chiapos.py)

* Updated BladeBit build script to account for 1.2.0 changes.
Replaced remaining subprocess.run calls with run_command.
Use BladeBit's reported memory requirement instead of hardcoded value.

* Show a disclaimer when using thirdparty plotter

* Test adding mac madmax plotter to the installers

* Get latest madmax from the latest GH release

* Fix bad var name

* m1 madmax

* Add linux/linux arm

* pip install -e for arm installer, so that its consistent with the other platforms when looking for additional files

* madmax + windows

* Get madmax with Invoke-WebRequest

* Use the correct windows slashes

* add madmax to the list of windows binaries

* Check if madmax exists on windows install and move it to site packages if it does

* Make sure windows has .exe extension for madmax

* Update azure to get latest version of madmax from GH releases

* Bladebit for linux/linux arm

* Fix error with binaries.extend

* Bundle bladebit + windows

* Fix download url for bladebit

* Check for bladebit in windows script. move to correct directory if it exists

* Detect and use packaged plotters

* Removed unnecessary import

* Updating the branch to use chiaplotters_gui for installer verification

* Removed a change that was intended for debugging only

* Remove disclaimer

* Updated for new madmax plotter with k33, k34 support.
Updated chia-blockchain-gui submodule

* Fixed typo

* Package the chia_plot_k34 executable

* Boink

* Revert "Boink"

This reverts commit 8d13c07110.

* Additional chia_plot_k34 spots that I missed

* pyinstaller.spec fix for chia_plot_k34

* Windows installer fix for chia_plot_k34.exe

* Restoring chia-blockchain-gui submodule to 047ce16 (as in main)

* Update to chiapos 1.0.6

Co-authored-by: Jeff Cruikshank <paninaro@gmail.com>
Co-authored-by: Jeff Cruikshank <jeff@chia.net>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Chris Marslender <chrismarslender@gmail.com>
Co-authored-by: Earle Lowe <30607889+emlowe@users.noreply.github.com>
2021-10-28 15:37:46 -07:00