hypergan 2.0.0a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hypergan/__init__.py +39 -0
- hypergan/__main__.py +5 -0
- hypergan/_build_provenance.json +1 -0
- hypergan/_file_lock.py +32 -0
- hypergan/api.py +2221 -0
- hypergan/artifacts.py +334 -0
- hypergan/autoencoder_components.py +60 -0
- hypergan/background_poll.py +74 -0
- hypergan/bounded_cli_output.py +562 -0
- hypergan/bounded_observer.py +278 -0
- hypergan/checkpoint_compatibility.py +203 -0
- hypergan/checkpoints.py +902 -0
- hypergan/cli.py +2165 -0
- hypergan/color_words.py +288 -0
- hypergan/colorization_components.py +360 -0
- hypergan/colorization_data.py +256 -0
- hypergan/colorization_metrics.py +168 -0
- hypergan/config.py +1041 -0
- hypergan/console_settings.py +87 -0
- hypergan/cpu_worker_service.py +575 -0
- hypergan/cpu_workers.py +125 -0
- hypergan/data.py +429 -0
- hypergan/datasets.py +6 -0
- hypergan/diff_augment.py +131 -0
- hypergan/distributed.py +110 -0
- hypergan/distributed_checkpoints.py +558 -0
- hypergan/distributed_commit.py +297 -0
- hypergan/distributed_training.py +733 -0
- hypergan/diversity_metrics.py +175 -0
- hypergan/evaluation_cli.py +22 -0
- hypergan/evaluation_snapshot.py +28 -0
- hypergan/event_views.py +500 -0
- hypergan/execution.py +360 -0
- hypergan/execution_preflight.py +264 -0
- hypergan/execution_profiles.py +142 -0
- hypergan/gpu_inventory.py +687 -0
- hypergan/hndl_augmentation.py +40 -0
- hypergan/hndl_networks.py +42 -0
- hypergan/image_cache.py +66 -0
- hypergan/image_components.py +326 -0
- hypergan/image_data.py +96 -0
- hypergan/image_grids.py +151 -0
- hypergan/image_metrics.py +121 -0
- hypergan/inspection.py +1956 -0
- hypergan/interval_evaluation.py +294 -0
- hypergan/item_data.py +165 -0
- hypergan/metric_evaluation.py +425 -0
- hypergan/metric_evaluation_worker.py +136 -0
- hypergan/metric_examples.py +81 -0
- hypergan/metric_plugins.py +339 -0
- hypergan/metrics.py +407 -0
- hypergan/metrics_reducer/__init__.py +12 -0
- hypergan/model_description.py +651 -0
- hypergan/model_file.py +1014 -0
- hypergan/models/gaussian-grid.toml +48 -0
- hypergan/network_config.py +131 -0
- hypergan/networks/autoencoder_offset.hndl +1 -0
- hypergan/networks/colorization_conv_head.hndl +6 -0
- hypergan/networks/colorization_dcgan256.hndl +14 -0
- hypergan/networks/colorization_dinov3_multidepth.hndl +20 -0
- hypergan/networks/colorization_dinov3_patch_tokens.hndl +19 -0
- hypergan/networks/colorization_encoder_features.hndl +19 -0
- hypergan/networks/colorization_feature_concat.hndl +2 -0
- hypergan/networks/colorization_feature_project.hndl +3 -0
- hypergan/networks/colorization_generator16.hndl +69 -0
- hypergan/networks/colorization_generator32.hndl +69 -0
- hypergan/networks/colorization_joint_score.hndl +2 -0
- hypergan/networks/colorization_linear_head.hndl +3 -0
- hypergan/networks/colorization_multidepth_projection.hndl +18 -0
- hypergan/networks/colorization_multiscale_score.hndl +2 -0
- hypergan/networks/colorization_pixel_features.hndl +8 -0
- hypergan/networks/colorization_pixel_head.hndl +17 -0
- hypergan/networks/colorization_query.hndl +2 -0
- hypergan/networks/colorization_random_project.hndl +2 -0
- hypergan/networks/colorization_scale_head16.hndl +8 -0
- hypergan/networks/colorization_scale_head32.hndl +10 -0
- hypergan/networks/colorization_scale_head4.hndl +4 -0
- hypergan/networks/colorization_scale_head8.hndl +6 -0
- hypergan/networks/image_attention.hndl +15 -0
- hypergan/networks/image_critic_score.hndl +6 -0
- hypergan/networks/image_encoder.hndl +17 -0
- hypergan/networks/image_feature_head.hndl +9 -0
- hypergan/networks/image_generator.hndl +13 -0
- hypergan/networks/image_pixel.hndl +7 -0
- hypergan/networks/image_pixel_block.hndl +16 -0
- hypergan/networks/image_resnet_stage1.hndl +7 -0
- hypergan/networks/image_resnet_stage2.hndl +2 -0
- hypergan/networks/image_resnet_stage3.hndl +2 -0
- hypergan/networks/reference.hndl +6 -0
- hypergan/numerical_policy.py +95 -0
- hypergan/objective_program.py +425 -0
- hypergan/observation_io.py +150 -0
- hypergan/particlegan_integration.py +134 -0
- hypergan/plugin_functions.py +94 -0
- hypergan/ports.py +9 -0
- hypergan/pretrained_providers.py +104 -0
- hypergan/preview_snapshot.py +229 -0
- hypergan/preview_worker.py +128 -0
- hypergan/previews.py +590 -0
- hypergan/provenance.py +187 -0
- hypergan/queue.py +819 -0
- hypergan/recipe_generator.py +691 -0
- hypergan/recipes.py +279 -0
- hypergan/registry.py +1337 -0
- hypergan/replicated_execution.py +487 -0
- hypergan/replicated_worker.py +184 -0
- hypergan/run_controller.py +990 -0
- hypergan/run_events.py +185 -0
- hypergan/run_requests.py +277 -0
- hypergan/run_signals.py +42 -0
- hypergan/run_state.py +80 -0
- hypergan/single_execution.py +225 -0
- hypergan/snapshot_renderer.py +71 -0
- hypergan/summary.py +336 -0
- hypergan/toml_writer.py +125 -0
- hypergan/training.py +543 -0
- hypergan/web_assets/THIRD_PARTY_LICENSES.txt +289 -0
- hypergan/web_assets/__init__.py +25 -0
- hypergan/web_assets/app.js +22 -0
- hypergan/web_assets/index.html +225 -0
- hypergan/web_assets/logo.png +0 -0
- hypergan/web_assets/runs.css +75 -0
- hypergan/web_assets/runs.js +203 -0
- hypergan/web_assets/style.css +871 -0
- hypergan/web_assets/view-worker.js +204 -0
- hypergan/web_autostart.py +1283 -0
- hypergan/web_dev.py +132 -0
- hypergan/web_files.py +83 -0
- hypergan/web_launch.py +272 -0
- hypergan/web_schema.py +165 -0
- hypergan/web_server.py +1323 -0
- hypergan/web_service.py +651 -0
- hypergan/web_session.py +191 -0
- hypergan/workspace.py +325 -0
- hypergan-2.0.0a1.dist-info/METADATA +328 -0
- hypergan-2.0.0a1.dist-info/RECORD +140 -0
- hypergan-2.0.0a1.dist-info/WHEEL +5 -0
- hypergan-2.0.0a1.dist-info/entry_points.txt +2 -0
- hypergan-2.0.0a1.dist-info/licenses/LICENSE +21 -0
- hypergan-2.0.0a1.dist-info/top_level.txt +1 -0
hypergan/__init__.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""HyperGAN's lightweight public package.
|
|
2
|
+
|
|
3
|
+
Training dependencies are loaded only when a training or sampling API is used.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
__version__ = "2.0.0a1"
|
|
7
|
+
|
|
8
|
+
from .api import __all__ as _api_all
|
|
9
|
+
|
|
10
|
+
__all__ = tuple(_api_all)
|
|
11
|
+
del _api_all
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def __getattr__(name: str):
|
|
15
|
+
if name.startswith("_"):
|
|
16
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
17
|
+
import importlib
|
|
18
|
+
|
|
19
|
+
# The metrics module is callable as hg.metrics(run) and provides module attributes
|
|
20
|
+
if name == "metrics":
|
|
21
|
+
return importlib.import_module(".metrics", __name__)
|
|
22
|
+
|
|
23
|
+
# Guard: only allow public symbols declared in __all__
|
|
24
|
+
if name in __all__:
|
|
25
|
+
api = importlib.import_module(".api", __name__)
|
|
26
|
+
if hasattr(api, name):
|
|
27
|
+
return getattr(api, name)
|
|
28
|
+
|
|
29
|
+
# Allow direct submodule access (e.g. hypergan.cli, hypergan.config)
|
|
30
|
+
try:
|
|
31
|
+
return importlib.import_module(f".{name}", __name__)
|
|
32
|
+
except ImportError:
|
|
33
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from None
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def __dir__() -> list[str]:
|
|
37
|
+
# Return __all__ plus standard module dunder attributes present in globals
|
|
38
|
+
dunders = {k for k in globals() if k.startswith("__") and k.endswith("__")}
|
|
39
|
+
return sorted(dunders | set(__all__))
|
hypergan/__main__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"commit": "f1346125d29376caf548f27ac1ce4c7ed51895a5", "dirty": false, "schema_version": 1}
|
hypergan/_file_lock.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""Exclusive descriptor locks shared by queue writers and run-lock probes."""
|
|
2
|
+
import errno
|
|
3
|
+
import os
|
|
4
|
+
import time
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def lock_file(fd, *, blocking=False):
|
|
8
|
+
if os.name == 'nt':
|
|
9
|
+
import msvcrt
|
|
10
|
+
while True:
|
|
11
|
+
# Match run_state.run_lock: the first byte can lie beyond EOF.
|
|
12
|
+
os.lseek(fd, 0, os.SEEK_SET)
|
|
13
|
+
try:
|
|
14
|
+
msvcrt.locking(fd, msvcrt.LK_NBLCK, 1)
|
|
15
|
+
return
|
|
16
|
+
except OSError as error:
|
|
17
|
+
if not blocking or error.errno not in (errno.EACCES, errno.EAGAIN, errno.EDEADLK):
|
|
18
|
+
raise
|
|
19
|
+
time.sleep(.01)
|
|
20
|
+
else:
|
|
21
|
+
import fcntl
|
|
22
|
+
fcntl.flock(fd, fcntl.LOCK_EX | (0 if blocking else fcntl.LOCK_NB))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def unlock_file(fd):
|
|
26
|
+
if os.name == 'nt':
|
|
27
|
+
import msvcrt
|
|
28
|
+
os.lseek(fd, 0, os.SEEK_SET)
|
|
29
|
+
msvcrt.locking(fd, msvcrt.LK_UNLCK, 1)
|
|
30
|
+
else:
|
|
31
|
+
import fcntl
|
|
32
|
+
fcntl.flock(fd, fcntl.LOCK_UN)
|