Skip to content
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

Referencing .lua files in parent directories #25

Open
Tushar-N opened this issue Nov 6, 2016 · 0 comments
Open

Referencing .lua files in parent directories #25

Tushar-N opened this issue Nov 6, 2016 · 0 comments

Comments

@Tushar-N
Copy link

Tushar-N commented Nov 6, 2016

I have a torch_model.lua file in my parent directory (/home/tushar/) that I'm trying to reference from /home/tushar/test using its relative path.

import PyTorchHelpers
TorchModel = PyTorchHelpers.load_lua_class('../torch_model.lua', 'TorchModel')

I get the following error

unprotected error in call to Lua API (module '../torch_model' not found:
	no field package.preload['../torch_model']
	no file '/home/tushar/.luarocks/share/lua/5.1////torch_model.lua'
	...

Absolute paths also fail for me.

TorchModel = PyTorchHelpers.load_lua_class('/home/tushar/torch_model.lua', 'TorchModel')

If the .lua is in the same directory (or a child directory) then it works fine. Is there any other way to reference files in my parent directory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant