Skip to content

Commit

Permalink
FIX: Add imports for diffusion and vision cached model classes to `ar…
Browse files Browse the repository at this point in the history
…tkit.api` (#25)

* add imports to artkit.api

* API: move CachedDiffusionModel up to .diffusion

* API: move CachedVisionModel up to .vision

* API: re-remove .base packages from artkit.api

* DOC: update release notes

* API: re-add cision and diffusion packages to artkit.api

* BUILD: prepare for next release (#15)

* BUILD: remove dependency on aiolimiter

* BUILD: relax ptools dependency for future minor releases

* BUILD: adjust build config

* BUILD: update version to 1.0.1

* BUILD: require pytest~=8.2 for test runs

* BUILD: rephrase dependencies using ~=

* DOC: add comments to release pipeline

* DOC: add comments to release pipeline

* BUILD: move LLM dependencies

* BUILD: fix typo in meta.yaml

* BUILD: remove quotes from meta.yaml

* updated and commented on workflow triggers, conditions, dependencies

* BUILD: move LLM-specific packages to min/max configs and list them in conda/tox test configs

* DOC: add comments to release pipeline

* BUILD: minor tweaks to the release pipeline

* BUILD: include aiohttp in mypy dependencies

* BUILD: check version consistency only when preparing/pushing a release

* BUILD: enforce test env dependency versions only if specified

* BUILD: set tox env name to py3 everywhere

* BUILD: preserve test dependencies in default build

* BUILD: explicitly state tox.ini path

* BUILD: pytorch is torch on PyPi

* BUILD: move test dependencies to tox base testenv

* BUILD: remove old pytest & linting actions now integrated with pipeline

* BUILD: move test dependencies to tox base testenv

* BUILD: consistently refer to pytorch as 'torch'

* BUILD: add comments to tox.ini

* BUILD: run min/max matrix tests with different python versions

* BUILD: split out matrix exclusions for 3.12

* BUILD: don't build matplotlib from source during tests

---------

Co-authored-by: Matthew Wong <[email protected]>
Co-authored-by: Andy Moon <[email protected]>

* DOC: Miscellaneous cleanups (#26)

* cleanup virtual env setup and local module import sections

* add empty line after section headers in issues templates for improved readability

* equitability tutorial: fix typos

* MacOS or Unix

---------

Co-authored-by: j-ittner <[email protected]>
Co-authored-by: Matthew Wong <[email protected]>
Co-authored-by: Andy Moon <[email protected]>
  • Loading branch information
4 people authored Jun 22, 2024
1 parent 15e85a3 commit 5d0f521
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 14 deletions.
18 changes: 17 additions & 1 deletion RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
Release Notes
=============
=============

*artkit* 1.0.1
--------------

- FIX: :class:`.CachedDiffusionModel` and :class`CachedVisionModel` are now also
available through the :mod:`artkit.api` module. Bot classes had been defined in the
:mod:`artkit.diffusion.base` and :mod:`artkit.vision.base` modules, respectively,
even though they are not abstract base classes. The fix moves both classes one level
up to the :mod:`artkit.diffusion` and :mod:`artkit.vision` modules, which also exposes
then through the :mod:`artkit.api` module.


*artkit* 1.0.0
--------------

Initial release of *artkit*.
4 changes: 3 additions & 1 deletion src/artkit/model/diffusion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
# -----------------------------------------------------------------------------

"""
Diffusion model implementations (text-to-image generation)
Diffusion model implementations (text-to-image generation).
"""

from ._cached import *
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@

from pytools.api import inheritdoc

from ....util import Image
from ._diffusion import DiffusionModel
from ...util import Image
from ..base import CachedGenAIModel
from .base import DiffusionModel

__all__ = [
"CachedDiffusionModel",
]

from ...base import CachedGenAIModel

#
# Type variables
#
Expand Down
1 change: 0 additions & 1 deletion src/artkit/model/diffusion/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@
Base classes for the diffusion model
"""

from ._adapter import *
from ._diffusion import *
4 changes: 3 additions & 1 deletion src/artkit/model/vision/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
# -----------------------------------------------------------------------------

"""
Vision model implementations (image-to-text generation)
Vision model implementations (image-to-text generation).
"""

from ._cached import *
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

from pytools.api import inheritdoc

from ....util import Image
from ...base import CachedGenAIModel
from ._vision import VisionModel
from ...util import Image
from ..base import CachedGenAIModel
from .base import VisionModel

__all__ = [
"CachedVisionModel",
Expand Down
1 change: 0 additions & 1 deletion src/artkit/model/vision/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@
Base classes for the vision model
"""

from ._adapter import *
from ._vision import *
3 changes: 2 additions & 1 deletion test/artkit_test/model/diffusion/test_diffusion_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import pytest
from openai import RateLimitError

from artkit.model.diffusion.base import CachedDiffusionModel, DiffusionModel
from artkit.model.diffusion import CachedDiffusionModel
from artkit.model.diffusion.base import DiffusionModel
from artkit.model.diffusion.openai import OpenAIDiffusion
from artkit.model.util import RateLimitException

Expand Down
3 changes: 2 additions & 1 deletion test/artkit_test/model/vision/test_vision_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from openai import RateLimitError

from artkit.model.util import RateLimitException
from artkit.model.vision.base import CachedVisionModel, VisionModel
from artkit.model.vision import CachedVisionModel
from artkit.model.vision.base import VisionModel
from artkit.model.vision.openai import OpenAIVision
from artkit.util import Image

Expand Down

0 comments on commit 5d0f521

Please sign in to comment.