-
Notifications
You must be signed in to change notification settings - Fork 6
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
Consider removing absolute paths from model.sh
#124
Comments
model.sh
The original motivation for the absolute paths was to make it easier to launch a detached process from Java. I'll check if there is a good way to do this without relying on the shell script to change directories. |
Turns out that for remote jobs, it gets more complicated to handle paths when they're relative. Since this is not a high-priority issue, I am closing this as "won't fix". |
Thank you for taking a look! I agree this isn't a priority since the solution is complicated. |
While looking at this issue, a thought came to me on how to deal with the remote path issue. I'm reopening this, just to keep it on the TODO list. The main issue with relative remote paths is how to transmit them through SSH. The current procedure is to convert them to absolute paths, then quote if needed. The part about converting to absolute path could be removed, as there isn't really a good way to do this. The current method is just a hack that is rarely actually used, and doesn't really work when it is used. Instead, paths will be transmitted exactly as is. The remaining issue is that a relative path to an executable will generally fail. It is usually an immediate reference to an executable in the current working directory (CWD), but "." isn't necessarily in the search path. Rather than requiring the user to configure this, we should prepend a dot to the path. However, we shouldn't do that with every single relative path. The trick here is to extend Host.quote() to take a flag indicating whether to treat the path as an executable. |
As part of testing exported models, I realized that
model.sh
files generated during export contain several absolute paths to the export directory. Ideally from my perspective,.sh
files should avoid including absolute paths, e.g. so the entire export directory can be arbitrarily relocated (less any external path dependencies in the model).A simplified export script might be something like the following, where the working directory would be controlled by the user / client code:
The text was updated successfully, but these errors were encountered: