Unverified Commit e25e525f authored by Sayak Paul's avatar Sayak Paul Committed by GitHub
Browse files

[LoRA test suite] refactor the test suite and cleanse it (#7316)

* cleanse and refactor lora testing suite.

* more cleanup.

* make check_if_lora_correctly_set a utility function

* fix: typo

* retrigger ci

* style
parent de9adb90
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
""" Conversion script for the Stable Diffusion checkpoints.""" """Conversion script for the Stable Diffusion checkpoints."""
import os import os
import re import re
......
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
""" PyTorch - Flax general utilities.""" """PyTorch - Flax general utilities."""
import re import re
import jax.numpy as jnp import jax.numpy as jnp
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
""" PyTorch - Flax general utilities.""" """PyTorch - Flax general utilities."""
from pickle import UnpicklingError from pickle import UnpicklingError
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
""" Conversion script for the Stable Diffusion checkpoints.""" """Conversion script for the Stable Diffusion checkpoints."""
import re import re
from contextlib import nullcontext from contextlib import nullcontext
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
""" """
Doc utilities: Utilities related to documentation Doc utilities: Utilities related to documentation
""" """
import re import re
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
""" Logging utilities.""" """Logging utilities."""
import logging import logging
import os import os
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
""" """
PEFT utilities: Utilities related to peft library PEFT utilities: Utilities related to peft library
""" """
import collections import collections
import importlib import importlib
from typing import Optional from typing import Optional
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
""" """
State dict utilities: utility methods for converting state dicts easily State dict utilities: utility methods for converting state dicts easily
""" """
import enum import enum
from .logging import get_logger from .logging import get_logger
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
""" """
PyTorch utilities: Utilities related to PyTorch PyTorch utilities: Utilities related to PyTorch
""" """
from typing import List, Optional, Tuple, Union from typing import List, Optional, Tuple, Union
from . import logging from . import logging
......
This diff is collapsed.
This diff is collapsed.
...@@ -34,6 +34,7 @@ For a check only (as used in `make quality`) run: ...@@ -34,6 +34,7 @@ For a check only (as used in `make quality`) run:
python utils/custom_init_isort.py --check_only python utils/custom_init_isort.py --check_only
``` ```
""" """
import argparse import argparse
import os import os
import re import re
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
Script to close stale issue. Taken in part from the AllenNLP repository. Script to close stale issue. Taken in part from the AllenNLP repository.
https://github.com/allenai/allennlp. https://github.com/allenai/allennlp.
""" """
import os import os
from datetime import datetime as dt from datetime import datetime as dt
from datetime import timezone from datetime import timezone
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment