-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Sometimes the set of C.exp_manager["kwargs"]["uri"] will not take effect #1360
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
Conversation
|
@you-n-g Looks like we need to use mlflow_search_experiments to replace mlflow_list_experiments. |
… with mlflow_search_experiments is done.
|
@you-n-g |
| the temporal uri | ||
| """ | ||
| prev_uri = self.exp_manager.default_uri | ||
| C.exp_manager["kwargs"]["uri"] = uri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @ChiahungTai
I try to explain the design of the experiment system. It is a little complicated. Discussions are welcome if I fail to make it clear.
The ExpManager is expected to be a singleton and the global Config (e.g. C) is also a singleton (btw, we can have multiple Experiments with different uri).
So we try to align them together. So you can see that they share the same variable, which is called default uri
When the user starts an experiment, the user may want to set the uri to a specific uri (it will override default uri during this period), and then unset the specific uri and fallback to the default uri. _current_uri is that specific uri.
The uri shared by ExpManager and C is the default uri.
Originally, uri_context tries to temporarily set the default_uri. So the shared uri should be changed instead of _current_uri. (sometimes user doesn't start an experiment, so there is no _current_uri. but user want to query )
I think the problem is here. The _current_uri should not be set and uri should be ignored because of the shared mechanism between two singletons.
You can upload your issue as a test case like this. It will be helpful for other users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ignore my reply.
I think the current design is not good enough. I'll try to create a new PR. You are welcome to review my new PR later.
You can upload your issue as a test case like this. It will be helpful for other users. Hope it would work right in my new PR.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@you-n-g
I would love to review your patch. I will try to write a test case for reproducation. I guess the problem is the missing of call ExpManager constructor too.
I can also help to review qlib/data part. I have done a class of DBStorage backend to support SQLite as qlib format backend in my own project.
BTW, I will reply #1326 after I finish a spirit in my own project. I can read/write Chinese. If something hard to explain in English, feel free to use Chinese.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChiahungTai
I'm excited about your great passion for Qlib.
I have invited you as a collaborator in Qllib. Hope that would make the collaboration smoother
众人拾柴火焰高. haha~
|
@ChiahungTai Please check if #1364 solves your problem and makes the logic easier. |
|
@ChiahungTai For the mlflow question.
Contributors are encouraged to help with the upgrade :) |
Description
Sometime with R.uri_context(uri=uri_path): will not be worked.
After digging the problem. The yield self is not set uri to the temporaril uri.
Motivation and Context
Bug fix
How Has This Been Tested?
pytest qlib/tests/test_all_pipeline.pyunder upper directory ofqlib.Screenshots of Test Results (if appropriate):
Types of changes