-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[OTHER] High latency between scenario submission to job pending #1714
Comments
Hi @jrobinAV, Can you tell me more about this issue? |
I would like to work on this issue as hacktober participant can you assign me this issue? |
@AkashJana18 You have been assigned to another issue. @jrobinAV Do you have more information to add to this issue for @Lymah123 ? |
New Quest!A new Quest has been launched in @Avaiga’s repo. Some loot has been stashed in this issue to reward the solver! 🗡 Comment ⚔️ When you submit a PR, comment Questions? Check out the docs. |
@FlorianJacta @noobHappylife Can you assign this issue to me, if no one is working on it. |
@AkashJana18 The user has experienced a performance issue when the code was deployed on a ubuntu server. This issue happened on the Ubuntu server and with Taipy 3.1.1. You could try this code maybe: from taipy import Config
import taipy as tp
import pandas as pd
import datetime as dt
data = pd.read_csv(
"https://raw.githubusercontent.com/Avaiga/taipy-getting-started-core/develop/src/daily-min-temperatures.csv"
)
# Normal function used by Taipy
def predict(
historical_temperature: pd.DataFrame, date_to_forecast: dt.datetime
) -> float:
print(f"Running baseline...")
historical_temperature["Date"] = pd.to_datetime(historical_temperature["Date"])
historical_same_day = historical_temperature.loc[
(historical_temperature["Date"].dt.day == date_to_forecast.day)
& (historical_temperature["Date"].dt.month == date_to_forecast.month)
]
return historical_same_day["Temp"].mean()
# Configuration of Data Nodes
historical_temperature_cfg = Config.configure_data_node("historical_temperature")
date_to_forecast_cfg = Config.configure_data_node("date_to_forecast")
predictions_cfg = Config.configure_data_node("predictions")
# Configuration of tasks
predictions_cfg = Config.configure_task(
"predict",
predict,
[historical_temperature_cfg, date_to_forecast_cfg],
predictions_cfg,
)
# Configuration of scenario
scenario_cfg = Config.configure_scenario(
id="my_scenario", task_configs=[predictions_cfg]
)
Config.export("config.toml")
if __name__ == "__main__":
# Run of the Core
tp.Core().run()
# Creation of the scenario and execution
scenario = tp.create_scenario(scenario_cfg)
scenario.historical_temperature.write(data)
scenario.date_to_forecast.write(dt.datetime.now())
tp.submit(scenario)
print("Value at the end of task", scenario.predictions.read())
def save(state):
state.scenario.historical_temperature.write(data)
state.scenario.date_to_forecast.write(state.date)
state.refresh("scenario")
tp.gui.notify(state, "s", "Saved! Ready to submit")
date = None
scenario_md = """
<|{scenario}|scenario_selector|>
Select a Date
<|{date}|date|on_change=save|active={scenario}|>
Run the scenario
<|{scenario}|scenario|>
<|{scenario}|scenario_dag|>
View all the information on your prediction here
<|{scenario.predictions}|data_node|>
"""
tp.Gui(scenario_md).run() |
@FlorianJacta I have already been assigned to another to it would be better if anyone else take this issue as it also has the hacktober tag on this... |
We have changed our policy so that anyone can take any issues, whether assigned or not. If someone else wants to be assigned to this issue, he will be able to. |
I have started working on the issue already |
@Lymah123 Sorry for the late answer. I don't have more information than what is on the issue:
Maybe @noobHappylife got more info. |
Hi,
Hope it helps. |
@noobHappylife , thank you. |
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. |
This issue has been unassigned automatically because it has been marked as "🥶Waiting for contributor" for more than 14 days with no activity. |
What would you like to share or ask?
Tested on Taipy v3.1.1.
I've experienced something strange, on a ubuntu server, using scenario viz element, between submit (button clicked) to first log of submission status change to pending can be slow, up-to 10 or 20 seconds. However, on a local PC it's usually very fast.
After upgrade to Taipy v4.0.0dev. It works much better, close to what I've experienced on a local PC.
Code of Conduct
The text was updated successfully, but these errors were encountered: