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

verbose mode for init_jl and init_project() #71

Open
thautwarm opened this issue Sep 28, 2022 · 2 comments
Open

verbose mode for init_jl and init_project() #71

thautwarm opened this issue Sep 28, 2022 · 2 comments

Comments

@thautwarm
Copy link
Member

thautwarm commented Sep 28, 2022

Tonight we encountered an issue that users didn't have write permission to site-packages, while JNumPy reported no error and exited without any meaningful message.

Considering this, we shall add support for such extreme cases. The api changes could be init_jl(verbose=True) and init_project(__file__, verbose=True).

For the implementation part, utility functions in InitTools should also take the verbose::Bool argument.

@songjhaha
Copy link
Member

songjhaha commented Sep 29, 2022

I think error message didn't show up because here use_gil=False, so we didn't capture error.

jnumpy/jnumpy/apis.py

Lines 43 to 56 in 89f1c6f

def activate_project_checked(project_dir: str):
exec_julia(
f"InitTools.activate_project({escape_to_julia_rawstr(project_dir)},"
f"{escape_to_julia_rawstr(TyPython_directory)})",
use_gil=False,
)
try:
yield
finally:
exec_julia(
f"InitTools.activate_project({escape_to_julia_rawstr(SessionCtx.DEFAULT_PROJECT_DIR)},"
f"{escape_to_julia_rawstr(TyPython_directory)})",
use_gil=False,
)

But when init_jl() we haven't init TyPython so we still need some solutions to capture error

@songjhaha
Copy link
Member

Verbose mode didn't solve the error message problem, but it could be useful if user wants to startup jnumpy project silently.
With default setting, we show the progress of julia installing package, because user should know what jnumpy is doing, maybe it's stuck in the step installing some package and takes a long time.

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

2 participants