Skip to content

Add guide for custom docker images #100

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

Merged
merged 12 commits into from
May 17, 2023
Merged

Conversation

yixu34
Copy link
Member

@yixu34 yixu34 commented May 16, 2023

image image image image image

@yixu34 yixu34 requested review from phil-scale and a team May 16, 2023 00:34
@yixu34 yixu34 self-assigned this May 16, 2023

from pydantic import BaseModel

import my_inference_fn # This is your inference function, defined elsewhere within your Python codebase.
Copy link
Contributor

Choose a reason for hiding this comment

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

This wouldn't work with doc-testing integration tests

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm ok I'll just define it inline here then.

Comment on lines 93 to 111
```

Creating the Model Endpoint:
```python3
client.create_model_endpoint(
endpoint_name=f"endpoint-{model_bundle_name}",
model_bundle=model_bundle_name,
endpoint_type="async",
min_workers=0,
max_workers=1,
per_worker=1,
memory="30Gi",
storage="40Gi",
cpus=4,
gpus=1,
gpu_type="nvidia-ampere-a10",
update_if_exists=True,
)
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Since integration tests run each code snippet separately, it would only pass tests if you unified these two blocks - maybe you could just make Creating the Model Endpoint: a comment

@@ -45,7 +45,13 @@ def extract_code_chunks(path: Path, text: str, offset: int):
code = m_code.group(2)
end_line = start_line + code.count("\n") + 1
source = "\n" * start_line + code
if "test='skip'" in prefix:
if "test='skip'" in source:
Copy link
Contributor

Choose a reason for hiding this comment

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

Not necessary for this PR but I think it would be good to find a solution that doesn't show this comment in the documentation

Copy link
Member Author

Choose a reason for hiding this comment

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

Hm ok tried a couple of things but didn't seem to work - I think test_docs can't rewrite the source?

@yixu34 yixu34 merged commit 57c7dbb into master May 17, 2023
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