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

Added MAXO-GEN models, namely, SAC, AGIQA-1k, AGIQA-3k and AIGCIQA-2023. #1542

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions t5x/export_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,7 @@ def save(
train_state_initializer = get_train_state_initializer(
model, partitioner, task_feature_lengths, batch_size, trailing_shapes
)
utils.import_module('pmmx.projects.maxo.export_task')

output_features = _standardize_output_features(
mixture_or_task_name, output_features
Expand Down
5 changes: 3 additions & 2 deletions t5x/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import flax.core
from flax.core import scope as flax_scope
from flax.linen import partitioning as flax_partitioning
import gin
import jax
from jax.experimental import multihost_utils
import jax.numpy as jnp
Expand All @@ -55,7 +56,6 @@
from tensorflow.io import gfile
import typing_extensions


FLAGS = flags.FLAGS

# Remove _ShardedDeviceArray when users of t5x have their types updated
Expand Down Expand Up @@ -1818,7 +1818,8 @@ def import_module(module: str):
"""Imports the given module at runtime."""
logging.info('Importing %s.', module)
try:
importlib.import_module(module)
with gin.unlock_config():
importlib.import_module(module)
except RuntimeError as e:
if (
str(e)
Expand Down
Loading