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

Migrate to pydantic>=2.5, torch==2.1.1, ray[default]>=2.9 #534

Merged
merged 3 commits into from
Jan 29, 2024

Conversation

spillai
Copy link
Contributor

@spillai spillai commented Jan 24, 2024

Summary

Related issues

#220

Checks

  • make lint: I've run make lint to lint the changes in this PR.
  • make test: I've made sure the tests (make test-cpu or make test) are passing.
  • Additional tests:
    • Benchmark tests (when contributing new models)
    • GPU/HW tests

@spillai spillai added optimizations Enhancements or optimizations distribution Distribution related issues dev-ex labels Jan 24, 2024
@spillai spillai added this to the NOS v0.2 milestone Jan 24, 2024
@spillai spillai self-assigned this Jan 24, 2024
@spillai spillai force-pushed the spillai/0.2.0-dev branch 2 times, most recently from 9811603 to df9c886 Compare January 25, 2024 16:40
 - various migration upgrades to ModelSpec and other dataclasses
  with new pydantic `field_validator` syntax
@@ -151,22 +149,42 @@ class FunctionSignature:
method: str
"""Class method name. (e.g. forward, __call__ etc)"""

init_args: Tuple[Any, ...] = field(default_factory=tuple)
Copy link
Contributor

Choose a reason for hiding this comment

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

[nit] might be good to validate method != None? same for func_or_cls

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is already handled in the new pydantic validation

@@ -237,7 +237,7 @@ def _get_actor_options(cls, spec: ModelSpec, deployment: ModelDeploymentSpec) ->

if spec.runtime_env is not None:
logger.debug("Using custom runtime environment, this may take a while to build.")
actor_opts["runtime_env"] = RuntimeEnv(**asdict(spec.runtime_env))
actor_opts["runtime_env"] = RuntimeEnv(**spec.runtime_env.model_dump())
Copy link
Contributor

Choose a reason for hiding this comment

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

?

nos/version.py Show resolved Hide resolved
@@ -238,7 +238,7 @@ def txt2img(self, texts: str) -> Image.Image:

# Image generation (txt2img)
txt2img_signature = FunctionSignature(
Custom,
func_or_cls=Custom,
Copy link
Contributor

Choose a reason for hiding this comment

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

'func_or_class' is kind of a confusing name given that we also have method.

@spillai spillai merged commit 8153126 into autonomi-ai:main Jan 29, 2024
5 checks passed
spillai added a commit to autonomi-ai/nos-playground that referenced this pull request Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-ex distribution Distribution related issues optimizations Enhancements or optimizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants