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

A ready to use example: generate polymer and run simulation #5

Open
wants to merge 63 commits into
base: master
Choose a base branch
from

Conversation

Roy-Kid
Copy link
Contributor

@Roy-Kid Roy-Kid commented Mar 4, 2024

No description provided.

Copy link
Collaborator

@skrawcz skrawcz Mar 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want to use CMDLineExecutionManager as the execution manager -- like I'm doing here https://github.com/DAGWorks-Inc/hamilton/blob/d3c08a5a65413f11609917a452680d8624f52563/examples/cmdline_orchestrator/run.py. And I suggest using multithreading rather then multiprocessing.

Right now it relies on a tag cmdline to be on the function. We could instead set a property on the decorated functions or something to check for. But this will enable things to run in parallel, because they will be sent over to the remote executor to run.

Roy-Kid and others added 18 commits March 22, 2024 00:32
1. Moves function outside, and makes proper use of @resolve
2. Changes local task executor to be synchronous - this should
be fine to do. The tasks are then executed via the remote one.
This at least didn't seem to break when I changed it.
1. need to submit each node to remote. extended class there.
2. multiprocessing still causes SERDE issues. Multithreading
seems to work here.
Changes how the project module is run
Comment on lines 24 to 33
from dagworks import adapters

tracker = adapters.DAGWorksTracker(
username=USER_NAME,
api_key=API_KEY,
project_id=int(PROJECT_ID),
dag_name="toy-cmdline-dag",
tags={"env": "local"}, # , "TODO": "add_more_tags_to_find_your_run_later"},
)
hamilton_adapters.append(tracker)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can change this to be the open source one -- e.g. add sf-hamilton-sdk, and sf-hamilton-ui to the additional dependencies in the pyproject.toml.

@@ -8,9 +8,7 @@ readme = "README.md"
requires-python = ">3.8"
version = "0.1.0"
dependencies = [
"sf-hamilton[visualization]",
"tqdm",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you still need tqdm.

"sf-hamilton[visualization]",
"tqdm",
"dagworks-sdk",
"sf-hamilton"
]
[project.optional-dependencies]
dev = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can add optional dependencies like I mentioned above.

Copy link
Collaborator

@skrawcz skrawcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me know if you want to sync on this and see how I can help :)

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

Successfully merging this pull request may close these issues.

2 participants