这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@cardosofede
Copy link
Contributor

PR to manage multiple bots from the dashboard 🚀

@fengtality
Copy link
Contributor

fengtality commented Jun 14, 2023

When I created a bot, I ran into an error b/c it couldn't find a conf_client.yml file. I looked at the code in docker_manager.py and it appears that it should be copying a conf_client.yml file from the /data_downloader/conf folder and changing instance name to the name provided by the user. Therefore, I added a commit to add this conf_client.yml file.

Afterwards, I was able to use the broker to create an instance. However, when I attached to it, it didn't print a MQTT Connected message as in the video (https://www.youtube.com/watch?v=NKnWRpq9qW8).

I see this error in the Dashboard:

Screen Shot 2023-06-14 at 3 45 25 PM

I suspect my broker isn't connected to the bot

@david-hummingbot
Copy link
Contributor

@fengtality I think you need to run mqtt start in the client instance manually. It looks like the bot doesn't automatically start mqtt when it starts up. There's an mqtt autostart config but it looks like it's set to False by default.

2023-06-15_204203

image

@fengtality
Copy link
Contributor

After the last commit, bot instances should now auto-connect to Broker, allowing you to test the strategy start/stop controls.

To test a script, copy simple_pmm_example.py into the hummingbot_files/bot-configs/[instance-name]/conf/strategies folder.

You may need to stop and start the instance, the bot can only access script available at startup.

Afterwards, you should be able to start, get status, and stop the script from the dashboard!

@nikspz
Copy link
Contributor

nikspz commented Jun 15, 2023

Latest commit 1658290:

Test performed:

  • Created bot1,bot2,bot3 successfully using dashboard
  • Review user could stop and exit bots successfully
  • started dca_example.py using dashboard successfully
  • created bot1, bot2, bot3 successfully
  • started dca_example.py using dashboard successfully
  • check status successfully
  • attached bot1,bot2 review script actually running
  • copy simple_pmm_example.py to hummingbot_files\bot_configs\hummingbot-bot3\conf\strategies folder
  • started successfully and review status

redundant .yml file in strategy start:
Steps:

  1. copy papertrade.yml strategy to hummingbot_files\bot_configs\hummingbot-bot3\conf\strategies folder
  2. exit and start the bot3
  3. Run strategy from dashboard

failed to start the .yml file from dashboard

image
In the client:
image

@nikspz
Copy link
Contributor

nikspz commented Jun 16, 2023

to previous bug:
if you Enter without .yml Client will import the startegy but failed to Run/start it

Steps:
copy paper.yml strategy to hummingbot_files\bot_configs\hummingbot-bot3\conf\strategies folder
exit and start the bot3
Run strategy from dashboard (without typing .yml, i.e. for paper)

ValidationError: 1 validation error for Request skip_order_cancellation value could not be parsed to a boolean (type=type_error.bool)
Traceback:
File "/home/etozhe/miniconda3/envs/dashboard/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
    exec(code, module.__dict__)
File "/home/etozhe/dashmikepr/pages/8_🐙_Bot_Orchestration.py", line 124, in <module>
    client.stop(strategy)
File "/home/etozhe/dashmikepr/hbotrc/commands.py", line 118, in stop
    StopCommandMessage.Request(
File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__

image

image

Same for live exchange connected manually
image

@@ -0,0 +1,8 @@
__version__ = "0.1.0"
Copy link
Contributor

@devamin devamin Jun 17, 2023

Choose a reason for hiding this comment

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

I would prefer to install it as a package in environment_conda.yml instead of duplicating the code.

name: dashboard
channels:
  - conda-forge
dependencies:
  - python=3.9
  - sqlalchemy
  - pip
  - pip:
      - ccxt
      - streamlit
      - watchdog
      - plotly
      - pycoingecko
      - glom
      - defillama
      - statsmodels
      - pandas_ta
      - pyyaml
      - commlib-py
      - git@github.com:hummingbot/hbot-remote-client-py.git

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes I agree, but in this initial draft I made some quick changes to the code and I was testing how to run async tasks in streamlit but definitely we need to use the same repo.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let me know please how I can help, I do want to help with something, but I don't want us to double code it, or we create code conflicts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

perfect! Tomorrow we have the first live session. I think that @fengtality is going to create some tasks around how we can start working together on this.
from my side I will clean up this branch and probably we can merge it so people can start using it and then we can split our work in different pages

@cardosofede cardosofede marked this pull request as ready for review June 20, 2023 15:51
@cardosofede cardosofede requested review from fengtality and nikspz June 20, 2023 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants