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

Testing out external scripts #99

Closed
wants to merge 6 commits into from
Closed

Testing out external scripts #99

wants to merge 6 commits into from

Conversation

dabail10
Copy link
Collaborator

Testing out calls to external scripts here.

@dabail10 dabail10 marked this pull request as draft May 15, 2024 15:31
@TeaganKing TeaganKing linked an issue May 15, 2024 that may be closed by this pull request
TeaganKing and others added 3 commits May 15, 2024 15:27
First pass at trying to use conda run instead of the typical python
interpreter. Somewhat successful:

ploomber.exceptions.TaskBuildError: Error building task 'divergence': the task ran successfully but the product File('vector.png') is missing. Ensure your code is generating it.
ploomber.exceptions.TaskBuildError: Exception when running on_finish for task 'divergence'
@mnlevy1981
Copy link
Collaborator

From the 89b8c5e commit log:

ploomber.exceptions.DAGBuildError:
============================================= DAG build failed =============================================
--------------------------- CUPiDScriptRunner: divergence -> File('vector.png') ----------------------------
-------------------- /glade/work/mlevy/codes/CUPiD/examples/nblibrary/ice/divergence.py --------------------
ploomber.exceptions.TaskBuildError: Error building task 'divergence': the task ran successfully but the product File('vector.png') is missing. Ensure your code is generating it.
ploomber.exceptions.TaskBuildError: Exception when running on_finish for task 'divergence'
============================================= Summary (1 task) =============================================
CUPiDScriptRunner: divergence -> File('vector.png')
============================================= DAG build failed =============================================

@rmshkv it looks like it is creating examples/nblibrary/ice/vector.png, rather than examples/coupled_model/computed_notebooks/ice/vector.png (or maybe we want examples/coupled_model/computed_scripts/ice/vector.png?)

@dabail10
Copy link
Collaborator Author

Perhaps I need a complete path here?

@mnlevy1981
Copy link
Collaborator

Perhaps I need a complete path here?

I don't think so -- the problem is that ploomber is running your script in examples/nblibrary/ so that's where the output is going... but we should be able to set up CUPiD so that ploomber executes it in a different location (that's what we do for notebooks)

@rmshkv
Copy link
Contributor

rmshkv commented May 17, 2024

I dug into this a little and it seems like by default local_execution is set to false for both notebooks and scripts, so I wouldn't expect the output to be saved in the nblibrary directory at first glance. When I run it myself with the current configuration I get environment errors, so not able to test myself without doing some more work on that functionality first.

@dabail10 dabail10 closed this Sep 26, 2024
@dabail10 dabail10 deleted the script branch September 26, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow scripts to be run instead of notebooks
4 participants