-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Description
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04
- Ray installed from (source or binary): pip
- Ray version: latest
- Python version: 3.5
- Exact command to reproduce: see linked repo
- clone this repo
- cd to project folder
jupyter-notebook <cloned-project>/jupyter/- just run the cells
Describe the problem
In the linked repo I provide a M.W.E. of how I envision sacred and tune would work together. Inside there is a local python module named project which contains four submodules model, utils, sacred and tune.
The model submodule has code for a simple twin embedding model in keras (simply to provide some "realism" to the MWE. This code functions and can be tested in the directory jupyter.
The sacred submodule, attempts to decouple sacred specific code as much as possible (e.g. ingredients, observers, etc). If you import the ex from this module it still runs on its own. (again, see the jupyter directory)
The tune submodule is where I envision how tune would wrap the sacred ex for hyperparameter optimization.
Most likely, as I get more familiar with tune (or for users who are) the amount of code here would expand. Nonetheless there are two simple functions, one which wraps sacred, and another which registers the wrapper and expects a hyper-parameter configuration to be passed.
When calling this function ray / tune fails as:
(pid=40079) ModuleNotFoundError: No module named 'project'
which seems to be because of this python module structure.
Notably, if all this code is put at the top level of a module, this works.
I would like to keep this structure though, and I do not see why tune should or would be opinionated about that.