taipy icon indicating copy to clipboard operation
taipy copied to clipboard

[🐛 BUG] taip4.0 scenario multiple reruns

Open sumanth-tccc opened this issue 1 year ago • 4 comments

What went wrong? 🤔

Taipy 4.0 multiple times it is rerunning and the whole process is 10x slower now

Steps to Reproduce Issue

import taipy as tp
from taipy.gui import Gui
from src.config.config import *
from taipy import Config 
from src.pages.root import *
from src.constants import *


if __name__ == '__main__':

    # Load configuration
    Config.configure_job_executions(mode="standalone", max_nb_of_workers  =1 )
    Config.load('src/config/config.toml')
    scenario_cfg = Config.scenarios['nielsen_top_40']

    pages = {
    "/": root,
    "Databases": databases,
    "Data-Visualization-New": data_visualization_new,
    "Visualization-Hierarchy": visualization_hierarchy, 
    "Emerging-Brands": emerging_brands,
    "Projection-Trends": projection_trends,

    }

    tp.Orchestrator().run()


    if tp.get_scenarios() == []:
        print('create_scenario')
        scenario = tp.create_scenario(scenario_cfg)
        print(scenario)
        tp.submit(scenario)
    else:
        print('get_scenario')
        scenario = tp.get_scenarios()[0]

    top40_country_list = TOP_40_MARKET_LS

    # Read datasets
    raw_dataset = scenario.raw_dataset.read()
   
    
    stylekit = {
        "color_primary":"#F40009",
        "highlight-row": "#F40009",
    }

    gui = Gui(pages=pages)
    gui.run(gui, title="NSP", dark_mode=False, port=8494, stylekit=stylekit ) 

Screenshots

DESCRIPTION

Code of Conduct

  • [X] I have checked the existing issues.
  • [ ] I am willing to work on this issue (optional)

sumanth-tccc avatar Oct 10 '24 16:10 sumanth-tccc

Hi, @sumanth-tccc

Thank you for the feedback. We are going to look at this quickly. Could you also share your toml configuration so we can easily reproduce your situation? Any environment details could also help.

Thank you in advance.

jrobinAV avatar Oct 10 '24 16:10 jrobinAV

Hi @jrobinAV This is happening on gui.run(gui, title="NSP", dark_mode=False, port=8494, debug=True, use_reloader=True, stylekit=stylekit )

With the debug and use_reloader parameters off it is working close as 3.1.1

sumanth-tccc avatar Oct 10 '24 16:10 sumanth-tccc

Oh ok, that helps a lot. Thanks!

jrobinAV avatar Oct 10 '24 16:10 jrobinAV

that's the point of the reloader: it reloads if anything changes Maybe we should take a look and see what triggers the reload ?

FredLL-Avaiga avatar Oct 11 '24 09:10 FredLL-Avaiga

@jrobinAV @FabienLelaquais I don't see any issues with use reloader rerunning again and again the code because of Taipy Core objects being created.

However, we have issues when using development version and mode standalone. The code is being rerunned when scenarios are being created and submitted. Taipy tries to submit and delete the development version at the same time. The deletion of the development version also takes time.

I think this is where the issue is.

FlorianJacta avatar Feb 24 '25 11:02 FlorianJacta

@sumanth-tccc Could you share your toml config file src/config/config.toml so we can ensure that the investigation is in the correct environment?

jrobinAV avatar Feb 25 '25 08:02 jrobinAV

This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines.

github-actions[bot] avatar Mar 11 '25 09:03 github-actions[bot]

This issue has been unassigned automatically because it has been marked as "🥶Waiting for contributor" for more than 14 days with no activity.

github-actions[bot] avatar Mar 26 '25 09:03 github-actions[bot]

Without any answer, and since we cannot reproduce the issue, we are closing the issue.

jrobinAV avatar Apr 18 '25 13:04 jrobinAV