fix: revert imports change

- revert absolute imports change
This commit is contained in:
BuildTools 2024-08-16 16:28:24 -07:00
parent d2c83efebb
commit 27a53a5b2b
No known key found for this signature in database
GPG Key ID: 3270C066C15D530B
8 changed files with 37 additions and 41 deletions

View File

@ -7,20 +7,20 @@
from PySide6.QtGui import *
from PySide6.QtWidgets import *
from src.GPUMonitor import GPUMonitor
from src.KVOverrideEntry import KVOverrideEntry
from src.Logger import Logger
from src.ModelInfoDialog import ModelInfoDialog
from src.imports_and_globals import (
from GPUMonitor import GPUMonitor
from KVOverrideEntry import KVOverrideEntry
from Logger import Logger
from ModelInfoDialog import ModelInfoDialog
from imports_and_globals import (
open_file_safe,
resource_path,
show_about,
ensure_directory,
)
from src.Localizations import *
import src.ui_update
import src.lora_conversion
import src.utils
from Localizations import *
import ui_update
import lora_conversion
import utils
class AutoGGUF(QMainWindow):
@ -38,33 +38,29 @@ def __init__(self):
# References
self.update_base_model_visibility = partial(
src.ui_update.update_base_model_visibility, self
ui_update.update_base_model_visibility, self
)
self.update_assets = src.ui_update.update_assets.__get__(self)
self.update_cuda_option = src.ui_update.update_cuda_option.__get__(self)
self.update_cuda_backends = src.ui_update.update_cuda_backends.__get__(self)
self.download_llama_cpp = src.utils.download_llama_cpp.__get__(self)
self.refresh_releases = src.utils.refresh_releases.__get__(self)
self.browse_lora_input = src.utils.browse_lora_input.__get__(self)
self.browse_lora_output = src.utils.browse_lora_output.__get__(self)
self.convert_lora = src.lora_conversion.convert_lora.__get__(self)
self.update_assets = ui_update.update_assets.__get__(self)
self.update_cuda_option = ui_update.update_cuda_option.__get__(self)
self.update_cuda_backends = ui_update.update_cuda_backends.__get__(self)
self.download_llama_cpp = utils.download_llama_cpp.__get__(self)
self.refresh_releases = utils.refresh_releases.__get__(self)
self.browse_lora_input = utils.browse_lora_input.__get__(self)
self.browse_lora_output = utils.browse_lora_output.__get__(self)
self.convert_lora = lora_conversion.convert_lora.__get__(self)
self.show_about = show_about.__get__(self)
self.update_threads_spinbox = partial(
src.ui_update.update_threads_spinbox, self
)
self.update_threads_slider = partial(src.ui_update.update_threads_slider, self)
self.update_threads_spinbox = partial(ui_update.update_threads_spinbox, self)
self.update_threads_slider = partial(ui_update.update_threads_slider, self)
self.update_gpu_offload_spinbox = partial(
src.ui_update.update_gpu_offload_spinbox, self
ui_update.update_gpu_offload_spinbox, self
)
self.update_gpu_offload_slider = partial(
src.ui_update.update_gpu_offload_slider, self
ui_update.update_gpu_offload_slider, self
)
self.update_model_info = partial(
src.ui_update.update_model_info, self.logger, self
)
self.update_system_info = partial(src.ui_update.update_system_info, self)
self.update_model_info = partial(ui_update.update_model_info, self.logger, self)
self.update_system_info = partial(ui_update.update_system_info, self)
self.update_download_progress = partial(
src.ui_update.update_download_progress, self
ui_update.update_download_progress, self
)
# Create a central widget and main layout

View File

@ -15,7 +15,7 @@
QComboBox,
)
from src.Localizations import (
from Localizations import (
GPU_USAGE_FORMAT,
GPU_DETAILS,
GPU_USAGE_OVER_TIME,

View File

@ -1,5 +1,5 @@
from PySide6.QtWidgets import QMessageBox
from src.Localizations import *
from Localizations import *
def show_error(logger, message):

View File

@ -38,7 +38,7 @@
from PySide6.QtCore import QTimer, Signal, QThread, Qt, QSize
from PySide6.QtGui import QCloseEvent, QAction
from src.Localizations import *
from Localizations import *
def show_about(self):

View File

@ -2,11 +2,11 @@
from PySide6.QtWidgets import QListWidgetItem
from src.QuantizationThread import QuantizationThread
from src.TaskListItem import TaskListItem
from src.error_handling import handle_error, show_error
from src.imports_and_globals import ensure_directory
from src.Localizations import *
from QuantizationThread import QuantizationThread
from TaskListItem import TaskListItem
from error_handling import handle_error, show_error
from imports_and_globals import ensure_directory
from Localizations import *
def convert_lora(self):

View File

@ -4,7 +4,7 @@
from PySide6.QtCore import QTimer
from PySide6.QtWidgets import QApplication
from src.AutoGGUF import AutoGGUF
from AutoGGUF import AutoGGUF
from flask import Flask, jsonify
server = Flask(__name__)

View File

@ -1,4 +1,4 @@
from src.Localizations import *
from Localizations import *
import psutil

View File

@ -4,8 +4,8 @@
from Localizations import *
import requests
from src.DownloadThread import DownloadThread
from src.imports_and_globals import ensure_directory
from DownloadThread import DownloadThread
from imports_and_globals import ensure_directory
def browse_lora_input(self):