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

Adding __repr__ for container workload classes #8337

Merged

Conversation

khoaguin
Copy link
Member

@khoaguin khoaguin commented Dec 8, 2023

Solving these issues:

Summary of what this PR does:

  • <client>.images should show a table containing only the main ones: id, image_tag, image_hash, created_at
  • Doing client.worker_pools would be preferred over client.worker_pool.get_all()
  • If tag = "openmined/test-nginx:0.7.8", we can index worker image with client.images[tag]
  • client.worker_pools show a list of worker pools with id, pool_name, workers, healthy (healthy/all), running (running/all), image tag/name, created_at
  • we can also index a worker pool with client.worker_pools[tag]
  • visualising a worker pool, should show first the inline fields like in client.worker_pools and after a table of workers show workers' information
  • client.worker_pools[0].workers shows all the worker id, image tag/name, resources pool name, healthcheck (healthy/unhealthy), status (created/running/stopped), job
  • worker = client.worker_pools[0].workers[0], then worker will show id/name, image tag, worker pool name, healthy, status

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

khoaguin and others added 3 commits December 11, 2023 14:50
`SyftWorkerImage`, `SyftWorkerImageTag`, `ContainerImageRegistry`

Co-authored-by: Peter Chung <peterchung241@gmail.com>
@khoaguin
Copy link
Member Author

khoaguin commented Dec 11, 2023

Before building image
image

SyftWorkerImage repr
image

After building image
image

@khoaguin
Copy link
Member Author

should we change something about this repr?
image

@khoaguin
Copy link
Member Author

image

@khoaguin
Copy link
Member Author

image

Co-authored-by: Peter Chung <peterchung241@gmail.com>
@khoaguin
Copy link
Member Author

image

@PeterChung241 PeterChung241 mentioned this pull request Dec 12, 2023
2 tasks
@khoaguin
Copy link
Member Author

khoaguin commented Dec 13, 2023

image

@shubham3121
Copy link
Member

@khoaguin can you resolve merge conflict and merge with dev

@khoaguin
Copy link
Member Author

khoaguin commented Dec 15, 2023

image

…ictTuple`

- Can get a list of images and worker pools with `client.images` or `client.worker_pools`
- Remove some unnecessary `__repr_html__` functions
@khoaguin
Copy link
Member Author

image

@khoaguin
Copy link
Member Author

khoaguin commented Jan 2, 2024

Updated after having default worker pool in dev

image

@khoaguin
Copy link
Member Author

khoaguin commented Jan 2, 2024

image

@khoaguin
Copy link
Member Author

khoaguin commented Jan 2, 2024

image

- add config as searchable attribute for `SyftWorkerImage`
- remove config as unique attribute for `SyftWorkerImage`
…not using memory workers

- make some small changes to the api notebook to fix bugs and show repr
@khoaguin khoaguin self-assigned this Jan 3, 2024
@khoaguin
Copy link
Member Author

khoaguin commented Jan 3, 2024

When using os.environ["ORCHESTRA_DEPLOYMENT_TYPE"] = "container_stack", we get

image
image
image
image
image

rasswanth-s and others added 4 commits January 3, 2024 14:33
- add a utility method for worker status and healthcheck update
- referesh status on resolving worker in worker pool
- running and healthy workers derived from workers
- skip status checks for in mem workers

Co-authored-by: rasswanth <43314053+rasswanth-s@users.noreply.github.com>
Copy link
Member

@shubham3121 shubham3121 left a comment

Choose a reason for hiding this comment

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

Awesome work @khoaguin !!! 🎉🎊

@shubham3121 shubham3121 merged commit c3d3a0d into OpenMined:dev Jan 3, 2024
29 checks passed
@khoaguin khoaguin deleted the feat/container-workload-classes-repr branch January 4, 2024 07:02
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.

None yet

5 participants