How can I use intermediate result in higher rank job? #131
Unanswered
LimYoonhwan
asked this question in
Q&A
Replies: 1 comment 1 reply
-
As def write_result():
result_pv().to_csv(_model.path.parent / "result_step1.csv")
return result_pv() Then in def read_result():
return pd.read_csv(_model.path.parent / "result_step1.csv") and I would create a Python script, which is something like: m = mx.read_model("Model1")
m.Step1.write_result()
m.Step2.do_something() # which uses m.Step2.read_result() directly or indirectly. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, it’s been a while since my last visit and I have a question to ask.
I’m currently trying to implement a run in three stages through Modelx. In the first stage, an initial result file is generated from the input data. Then, in the second stage, the result generated in the first stage is read as input data to generate the second stage result. Finally, in the third stage, the result of the second stage is used as input to calculate the final result.
I’m considering two ways to implement this:
Creating the first stage space under the second stage space, and the second stage space under the third stage space. -> My concern with this method is that I couldn’t find a way to implement reading the results of a lower space from an upper space. Is there a way to implement this in Modelx?
The second method is to run the first, second, and third stage tasks individually, create the result file in a specific path, and then read the file from that path for the next stage task. This method seems to have no difficulty in implementation as it is the same as creating each of the three models.
I’m going to try implementing it with the second method first, but I’d like to take advantage of the space characteristics of Modelx like the first method. Do you have any recommendations for implementing this model structure, among the two methods above or any other methods?
Thanks for reading my question!
Beta Was this translation helpful? Give feedback.
All reactions