Instruction stringlengths 13 145k | input_code stringlengths 35 390k | output_code stringlengths 35 390k |
|---|---|---|
Separer les differentes actions d'edition d'un groupe en plusieurs pages
Il faudrait diviser les actions des pages d'edition en plusieurs sous pages
- [ ] Convertir les pages pour utiliser le template update base
- [ ] Mettre les membres dans une nouvelle page
| server/apps/group/urls.py
<|code_start|>from django.conf.urls import url
from django.urls import path
from .views import *
app_name = 'group'
urlpatterns = [
path('<slug:pk>/', DetailClubView.as_view(), name='detail'),
path('<slug:pk>/edit', UpdateClubView.as_view(), name='update'),
path('<slug:group_slu... | server/apps/group/urls.py
<|code_start|>from django.conf.urls import url
from django.urls import path
from .views import *
app_name = 'group'
urlpatterns = [
path('<slug:pk>/', DetailClubView.as_view(), name='detail'),
path('<slug:pk>/edit', UpdateClubView.as_view(), name='update'),
path('<slug:group_slu... |
Ajouter les parents dans les groupes
Ajouter un field parent dans les groupes pour pouvoir faire des liens entre groupes
| server/apps/group/migrations/0004_club_parent.py
<|code_start|><|code_end|>
server/apps/group/models.py
<|code_start|>from django.db import models
from django.contrib.auth.models import User
from django.utils.text import slugify
from django.urls.base import reverse
from apps.student.models import Student
from apps.uti... | server/apps/group/migrations/0004_club_parent.py
<|code_start|># Generated by Django 3.0.5 on 2020-06-02 07:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('group', '0003_auto_20200601_2109'),
]
operations = [
migrations.AddField(
... |
Frontend events planifés et events archivés ne fonctionnent pas
Events archivés renvoit une erreur 500.
Event planifiés ne renvoit rien
| server/apps/event/api_views.py
<|code_start|>from datetime import datetime
from rest_framework import generics
from .models import BaseEvent
from .serializers import BaseEventSerializer
class ListEventsGroupAPIView(generics.ListAPIView):
"""List events for a group depending on the chosen
time window. By def... | server/apps/event/api_views.py
<|code_start|>from datetime import datetime
from rest_framework import generics
from .models import BaseEvent
from .serializers import BaseEventSerializer
class ListEventsGroupAPIView(generics.ListAPIView):
"""List events for a group depending on the chosen
time window. By def... |
Mot de passe perdu
Cette fonctionnalité de fonctionne pas sur mon ordinateur mais fonctionne sur l'ordinateur de Gabin Schieffer <br/> Proposé par julie.geffraye@eleves.ec-nantes.fr
| server/apps/account/urls.py
<|code_start|>from django.conf.urls import url
from django.urls import path
from .views import *
app_name = 'account'
urlpatterns = [
path('login', AuthView.as_view(), name='login'),
path('logout', LogoutView.as_view(), name='logout'),
path('registration', RegistrationView.as_... | server/apps/account/urls.py
<|code_start|>from django.conf.urls import url
from django.urls import path
from .views import *
app_name = 'account'
urlpatterns = [
path('login', AuthView.as_view(), name='login'),
path('logout', LogoutView.as_view(), name='logout'),
path('registration', RegistrationView.as_... |
Pages lentes
Certaines pages sont un peu lentes à charger:
- liste des clubs
C'est peut-être lié au grand nombre d'images, il faudrait étudier la possibilité de cacher ces images.
| server/apps/club/views.py
<|code_start|>from django.views.generic import ListView, TemplateView
from django.contrib.auth.mixins import LoginRequiredMixin
from django.urls import resolve
from apps.club.models import Club, BDX
from apps.group.models import Group
from apps.group.views import BaseDetailGroupView
from app... | server/apps/club/views.py
<|code_start|>from django.views.generic import ListView, TemplateView
from django.contrib.auth.mixins import LoginRequiredMixin
from django.urls import resolve
from apps.club.models import Club
from apps.group.views import BaseDetailGroupView
from apps.utils.slug import *
class ListClubView... |
Problème avec les liens vers les auteur.ic.es des suggestions
Quand quelqu'un fait une suggestion depuis le site, le lien pour avoir le nom de la personne ne fonctionne pas.
| server/apps/home/forms.py
<|code_start|>from django import forms
class SuggestionForm(forms.Form):
title = forms.CharField(max_length=50, required=True)
description = forms.CharField(widget=forms.Textarea)
<|code_end|>
server/apps/home/views.py
<|code_start|>from datetime import *
from typing import List
from ... | server/apps/home/forms.py
<|code_start|>from django import forms
TYPE_CHOICES = (
(1, ("Bug")),
(2, ("Suggestion"))
)
class SuggestionForm(forms.Form):
title = forms.CharField(max_length=50, required=True)
description = forms.CharField(widget=forms.Textarea)
suggestionOrBug = forms.ChoiceField(la... |
[Colocs] Bug d'affichage des adresses avec une coloc future
Si on ajoute une coloc avec une date de début dans le futur, elle devient la dernière coloc associée à cette adresse, et comme elle n'est pas encore occupée, elle disparaît de la carte
| server/apps/roommates/api_views.py
<|code_start|>from rest_framework import generics, permissions, status
from rest_framework.response import Response
from rest_framework.views import APIView
from .serializers import HousingLastRoommatesSerializer #HousingSerializer, RoommatesGroupSerializer, RoommatesMemberSerializer... | server/apps/roommates/api_views.py
<|code_start|>from rest_framework import generics, permissions, status
from rest_framework.response import Response
from rest_framework.views import APIView
# HousingSerializer, RoommatesGroupSerializer, RoommatesMemberSerializer
from .serializers import HousingLastRoommatesSerialize... |
Colocathlon
Préparation du support de fonctionnalités pour le colocathlon, à la demande du BDE. Fonctionnalités demandées :
- [x] Possibilité pour chaque coloc de renseigner ses horaires d'ouvertures et activités proposées, et si elles participent ou non
- [x] Affichage des infos ci-dessous pour tout le monde sur l... | server/apps/group/models.py
<|code_start|>from django.db import models
from django.contrib.auth.models import User
from django.utils.text import slugify
from django.urls.base import reverse
from django.template.loader import render_to_string
from django.utils import timezone
from django_ckeditor_5.fields import CKEdit... | server/apps/group/models.py
<|code_start|>from django.db import models
from django.contrib.auth.models import User
from django.utils.text import slugify
from django.urls.base import reverse
from django.template.loader import render_to_string
from django.utils import timezone
from django_ckeditor_5.fields import CKEdit... |
Colocathlon
Préparation du support de fonctionnalités pour le colocathlon, à la demande du BDE. Fonctionnalités demandées :
- [x] Possibilité pour chaque coloc de renseigner ses horaires d'ouvertures et activités proposées, et si elles participent ou non
- [x] Affichage des infos ci-dessous pour tout le monde sur l... | server/apps/club/api_views.py
<|code_start|>from django.http.response import HttpResponse
from rest_framework import generics, permissions
from rest_framework.response import Response
from django.shortcuts import get_object_or_404
from django.db.models import Q
from django.utils import timezone
from django.utils.datep... | server/apps/club/api_views.py
<|code_start|>from django.http.response import HttpResponse
from rest_framework import generics, permissions
from rest_framework.response import Response
from django.shortcuts import get_object_or_404
from django.db.models import Q
from django.utils import timezone
from django.utils.datep... |
Add vanilla GRU
We want to a simple vanilla GRU for time series forecasting maybe with the probabilistic component as well.
| flood_forecast/basic/gru_vanilla.py
<|code_start|><|code_end|>
flood_forecast/model_dict_function.py
<|code_start|>from flood_forecast.transformer_xl.multi_head_base import MultiAttnHeadSimple
from flood_forecast.transformer_xl.transformer_basic import SimpleTransformer, CustomTransformerDecoder
from flood_forecast.tra... | flood_forecast/basic/gru_vanilla.py
<|code_start|>import torch
class VanillaGRU(torch.nn.Module):
def __init__(self, n_time_series: int, hidden_dim: int, num_layers: int, n_target: int, dropout: float,
forecast_length=1, use_hidden=False):
"""
Simple GRU to preform deep time serie... |
geodisplay.py projection not working with any other options but the default
While using the GeographicPlotDisplay function when trying to use other cartopy projections the map extent changes or no data appears.
The default is PlateCarree and works fine but when trying to use a Mercator projection the data shows up ... | act/plotting/GeoDisplay.py
<|code_start|>"""
act.plotting.GeoDisplay
-----------------------
Stores the class for GeographicPlotDisplay.
"""
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from .plot import Display
try:
import cartopy.crs as ccrs
from cartopy.io.img_tiles import Stame... | act/plotting/GeoDisplay.py
<|code_start|>"""
act.plotting.GeoDisplay
-----------------------
Stores the class for GeographicPlotDisplay.
"""
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from .plot import Display
try:
import cartopy.crs as ccrs
from cartopy.io.img_tiles import Stame... |
Deprecation Warnings
Deprecation warnings from the latest build that we need to look into
`act/qc/clean.py:43
/home/travis/build/ARM-DOE/ACT/act/qc/clean.py:43: DeprecationWarning: invalid escape sequence \_
"""
act/qc/clean.py:52
/home/travis/build/ARM-DOE/ACT/act/qc/clean.py:52: DeprecationWarning: inv... | act/qc/clean.py
<|code_start|>"""
act.qc.clean
------------------------------
Class definitions for cleaning up QC variables to standard
cf-compliance
"""
import xarray as xr
import re
import numpy as np
import copy
@xr.register_dataset_accessor('clean')
class CleanDataset(object):
"""
Class for cleaning u... | act/qc/clean.py
<|code_start|>"""
act.qc.clean
------------------------------
Class definitions for cleaning up QC variables to standard
cf-compliance
"""
import xarray as xr
import re
import numpy as np
import copy
@xr.register_dataset_accessor('clean')
class CleanDataset(object):
"""
Class for cleaning u... |
Attributes on coordinate variable dropped after applying qcfilter.add_test() to data variable
After applying `ds.qcfilter.add_test()` to a data variable, the attributes on the coordinate variable dimensioning the tested variable are removed. This happens for act-atmos versions 1.0.2 and 1.0.3, but not 0.7.2 and before.... | act/qc/qcfilter.py
<|code_start|>"""
Functions and methods for creating ancillary quality control variables
and filters (masks) which can be used with various corrections
routines in ACT.
"""
import numpy as np
import xarray as xr
import dask
from act.qc import qctests, comparison_tests
@xr.register_dataset_access... | act/qc/qcfilter.py
<|code_start|>"""
Functions and methods for creating ancillary quality control variables
and filters (masks) which can be used with various corrections
routines in ACT.
"""
import numpy as np
import xarray as xr
import dask
from act.qc import qctests, comparison_tests
@xr.register_dataset_access... |
Add Google Analytics ID
Add a Google Analytics ID to the `conf.py` file used by sphinx. For those interested in having access the analytics, you will need to send over your gmail address
Fixes #396
| docs/source/conf.py
<|code_start|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Atmospheric data Community Toolkit documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 28 12:35:56 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that n... | docs/source/conf.py
<|code_start|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Atmospheric data Community Toolkit documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 28 12:35:56 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that n... |
QC bitwise comparison of float values
Some xarray methods may cast the QC variables from type int to type float. For example .resample() will convert all variables to float type. This causes issues when performing bitwise comparisons of QC variables. In particular
in function get_qc_test_mask()
check_bit = ... | act/qc/qcfilter.py
<|code_start|>"""
Functions and methods for creating ancillary quality control variables
and filters (masks) which can be used with various corrections
routines in ACT.
"""
import numpy as np
import xarray as xr
import dask
from act.qc import qctests, comparison_tests
@xr.register_dataset_access... | act/qc/qcfilter.py
<|code_start|>"""
Functions and methods for creating ancillary quality control variables
and filters (masks) which can be used with various corrections
routines in ACT.
"""
import numpy as np
import xarray as xr
import dask
from act.qc import qctests, comparison_tests
@xr.register_dataset_access... |
Error when clean routine tries to remove unused bits
When running the script below on the ARM ADC systems, an error occurs when trying to add a DQR to the QC which stems from trying to remove unused bits from those QC variables
```
File “/home/kehoe/dev/dq/lib/python/ACT/act/qc/qcfilter.py”, line 1065, in unset_b... | act/qc/qcfilter.py
<|code_start|>"""
Functions and methods for creating ancillary quality control variables
and filters (masks) which can be used with various corrections
routines in ACT.
"""
import dask
import numpy as np
import xarray as xr
from act.qc import comparison_tests, qctests
@xr.register_dataset_access... | act/qc/qcfilter.py
<|code_start|>"""
Functions and methods for creating ancillary quality control variables
and filters (masks) which can be used with various corrections
routines in ACT.
"""
import dask
import numpy as np
import xarray as xr
from act.qc import comparison_tests, qctests
@xr.register_dataset_access... |
Usability Issue: plot_barbs_from_spd_dir takes in direction, speed
For example:
`TimeSeriesDisplay.plot_barbs_from_spd_dir(dir_field, spd_field, pres_field=None, dsname=None, **kwargs)`
It would make sense to change the input to spd_field, dir_field or rename the function for consistency.
| act/plotting/timeseriesdisplay.py
<|code_start|>"""
Stores the class for TimeSeriesDisplay.
"""
import datetime as dt
import warnings
from copy import deepcopy
from re import search, search as re_search
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from matp... | act/plotting/timeseriesdisplay.py
<|code_start|>"""
Stores the class for TimeSeriesDisplay.
"""
import datetime as dt
import warnings
from copy import deepcopy
from re import search, search as re_search
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from matp... |
HistogramDisplay, plot_stairstep_graph encounters ValueError for range
I'm attempting to generate histograms for some Aerosol Optical Depth data. It is rather sparse, and looks like this:
[nan, nan, 0.04041248, nan, nan, nan, nan, nan, nan, 0.08403611, nan, nan, nan, nan, nan, 0.08443181, 0.05368716, nan, 0.07251927... | act/plotting/histogramdisplay.py
<|code_start|>""" Module for Histogram Plotting. """
import matplotlib.pyplot as plt
import numpy as np
import xarray as xr
from ..utils import datetime_utils as dt_utils
from .plot import Display
class HistogramDisplay(Display):
"""
This class is used to make histogram plot... | act/plotting/histogramdisplay.py
<|code_start|>""" Module for Histogram Plotting. """
import matplotlib.pyplot as plt
import numpy as np
import xarray as xr
from ..utils import datetime_utils as dt_utils
from .plot import Display
class HistogramDisplay(Display):
"""
This class is used to make histogram plot... |
Make the NOAA PSL reader more generic
The current reader only works with wind profiler data from the CTD site (see https://github.com/ARM-DOE/ACT/blob/main/act/io/noaapsl.py#L36)... we need to make this more generic to support other sites, and other date types from this site since the files are similar in structure and... | act/io/__init__.py
<|code_start|>"""
This module contains procedures for reading and writing various ARM datasets.
"""
from .armfiles import WriteDataset, check_arm_standards, create_obj_from_arm_dod, read_netcdf
from .csvfiles import read_csv
from .mpl import proc_sigma_mplv5_read, read_sigma_mplv5
from .noaagml imp... | act/io/__init__.py
<|code_start|>"""
This module contains procedures for reading and writing various ARM datasets.
"""
from .armfiles import WriteDataset, check_arm_standards, create_obj_from_arm_dod, read_netcdf
from .csvfiles import read_csv
from .mpl import proc_sigma_mplv5_read, read_sigma_mplv5
from .noaagml imp... |
ENH: Enable Hour/Minute Level of Searching with ARMLive API
Currently, the hour/minute/second field of the ARM data access API is not being passed to the query, preventing the ability to search at this level. This is an issue when working with larger datasets (ex. x-band radar) where a day of data is 10s of GB in size ... | act/discovery/get_armfiles.py
<|code_start|>"""
Script for downloading data from ARM's Live Data Webservice
"""
import argparse
import json
import os
import sys
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
from act.utils import date_parser
def download_data(userna... | act/discovery/get_armfiles.py
<|code_start|>"""
Script for downloading data from ARM's Live Data Webservice
"""
import argparse
import json
import os
import sys
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
from act.utils import date_parser
def download_data(userna... |
read_psl_wind_profiler_temperature not reading full file
It looks like the new function to read NOAA PSL temperature is not reading the full file. For instance, the file linked below has 2 times in it 172536 and 175538 UTC but only the first one is being read in. We need to update it to read in all times in the file.... | act/discovery/get_armfiles.py
<|code_start|>"""
Script for downloading data from ARM's Live Data Webservice
"""
import argparse
import json
import os
import sys
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
from act.utils import date_parser
def download_data(userna... | act/discovery/get_armfiles.py
<|code_start|>"""
Script for downloading data from ARM's Live Data Webservice
"""
import argparse
import json
import os
import sys
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
from act.utils import date_parser
def download_data(userna... |
BUG: Fix QC bug in tests
Now CI is failing due to some bug on ubuntu systems
```bash
def test_qc_flag_description():
[32](https://github.com/ARM-DOE/ACT/runs/7508339706?check_suite_focus=true#step:6:33)
"""
[33](https://github.com/ARM-DOE/ACT/runs/7508339706?check_suite_focus=true#step:6:34)
Thi... | act/discovery/get_armfiles.py
<|code_start|>"""
Script for downloading data from ARM's Live Data Webservice
"""
import argparse
import json
import os
import sys
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
from act.utils import date_parser
def download_data(userna... | act/discovery/get_armfiles.py
<|code_start|>"""
Script for downloading data from ARM's Live Data Webservice
"""
import argparse
import json
import os
import sys
from datetime import timedelta
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
from act.utils import date_pa... |
PSL Wind Profile Reader Hardcoded to CTD site
Line 38 in io.noaapsl.read_psl_wind_profiler is hardcoded to the CTD site, we should automatically read the site code in and parse off of that or update to pass in a site name.
| act/io/noaapsl.py
<|code_start|>"""
Modules for reading in NOAA PSL data.
"""
from datetime import datetime
from itertools import groupby
import fsspec
import numpy as np
import pandas as pd
import xarray as xr
def read_psl_wind_profiler(filename, transpose=True):
"""
Returns `xarray.Dataset` with stored da... | act/io/noaapsl.py
<|code_start|>"""
Modules for reading in NOAA PSL data.
"""
from datetime import datetime
from itertools import groupby
import fsspec
import numpy as np
import pandas as pd
import xarray as xr
def read_psl_wind_profiler(filename, transpose=True):
"""
Returns `xarray.Dataset` with stored da... |
Subpanel plots greater then index 2 seems to fail.
When plotting a suplot of size (2, 3) I receive this error:
```
File ~\dev\ACT\act\plotting\timeseriesdisplay.py:608, in TimeSeriesDisplay.plot(self, field, dsname, subplot_index, cmap, set_title, add_nan, day_night_background, invert_y_axis, abs_limits, time_rng, y_... | act/plotting/timeseriesdisplay.py
<|code_start|>"""
Stores the class for TimeSeriesDisplay.
"""
import datetime as dt
import warnings
from copy import deepcopy
from re import search, search as re_search
import textwrap
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
import numpy as np
import pandas... | act/plotting/timeseriesdisplay.py
<|code_start|>"""
Stores the class for TimeSeriesDisplay.
"""
import datetime as dt
import textwrap
import warnings
from copy import deepcopy
from re import search, search as re_search
import matplotlib as mpl
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
import ... |
ARM Data API Returns Text when File not Available
I tried to download gucceilpblhtM1.a0 but it's not available through the webservice due to it being an a0-level file. Instead the API returned text that was included in the file. We should put in a check to ensure that these cases are caught and files are not produce... | act/discovery/get_armfiles.py
<|code_start|>"""
Script for downloading data from ARM's Live Data Webservice
"""
import argparse
import json
import os
import sys
from datetime import timedelta
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
from act.utils import date_pa... | act/discovery/get_armfiles.py
<|code_start|>"""
Script for downloading data from ARM's Live Data Webservice
"""
import argparse
import contextlib
import json
import os
import sys
from datetime import timedelta
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
from act.ut... |
Accessor not available in dataset
I fetched the latest updates after the lazy_loading PR and ran pytest and am seeing a lot of errors with accessors not loading. Clean, QCFilter, and QCTests are no longer available in the datasets for some reason.
FAILED test_io.py::test_io_mfdataset - AttributeError: 'Dataset' obj... | act/__init__.py
<|code_start|>"""
ACT: The Atmospheric Community Toolkit
======================================
"""
import lazy_loader as lazy
# No more pandas warnings
from pandas.plotting import register_matplotlib_converters
from . import tests
from ._version import get_versions
register_matplotlib_converters()
... | act/__init__.py
<|code_start|>"""
ACT: The Atmospheric Community Toolkit
======================================
"""
import lazy_loader as lazy
# No more pandas warnings
from pandas.plotting import register_matplotlib_converters
from . import tests
from ._version import get_versions
from .qc import QCFilter, QCTests... |
ICARTT formatting error when using cleanup
When I read in an ICARTT file and then try and run obj.clean.cleanup() to get it to CF standards, it throws the following error. We should look at making the object compliant with what's needed for this cleanup.
```
Traceback (most recent call last):
File "/Users/athei... | act/io/icartt.py
<|code_start|>"""
Modules for Reading/Writing the International Consortium for Atmospheric
Research on Transport and Transformation (ICARTT) file format standards V2.0
References:
ICARTT V2.0 Standards/Conventions:
- https://www.earthdata.nasa.gov/s3fs-public/imported/ESDS-RFC-029v2.pdf
"""
i... | act/io/icartt.py
<|code_start|>"""
Modules for Reading/Writing the International Consortium for Atmospheric
Research on Transport and Transformation (ICARTT) file format standards V2.0
References:
ICARTT V2.0 Standards/Conventions:
- https://www.earthdata.nasa.gov/s3fs-public/imported/ESDS-RFC-029v2.pdf
"""
i... |
ARM Data API Returns Text when File not Available
I tried to download gucceilpblhtM1.a0 but it's not available through the webservice due to it being an a0-level file. Instead the API returned text that was included in the file. We should put in a check to ensure that these cases are caught and files are not produce... | act/discovery/get_armfiles.py
<|code_start|>"""
Script for downloading data from ARM's Live Data Webservice
"""
import argparse
import json
import os
import sys
from datetime import timedelta
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
from act.utils import date_pa... | act/discovery/get_armfiles.py
<|code_start|>"""
Script for downloading data from ARM's Live Data Webservice
"""
import argparse
import json
import os
import sys
from datetime import timedelta
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
from act.utils import date_pa... |
Xarray not able to read old MMCR data
Some older data might not be compatible with xarray. sgpmmcrmomC1.b1.20041107 data yielded this error:
xarray.core.variable.MissingDimensionsError: 'heights' has more than 1-dimension and the same name as one of its dimensions ('mode', 'heights'). xarray disallows such variable... | act/io/__init__.py
<|code_start|>"""
This module contains procedures for reading and writing various ARM datasets.
"""
import lazy_loader as lazy
__getattr__, __dir__, __all__ = lazy.attach(
__name__,
submodules=['armfiles', 'csvfiles', 'icartt', 'mpl', 'noaagml', 'noaapsl', 'pysp2'],
submod_attrs={
... | act/io/__init__.py
<|code_start|>"""
This module contains procedures for reading and writing various ARM datasets.
"""
import lazy_loader as lazy
__getattr__, __dir__, __all__ = lazy.attach(
__name__,
submodules=['armfiles', 'csvfiles', 'icartt', 'mpl', 'noaagml', 'noaapsl', 'pysp2'],
submod_attrs={
... |
Additional plotting examples
Some additional needs were brought up with the ACT plotting examples. It would be useful to provide
- Examples for working with axes returned from plotting code and modifying them after plot generation
- Examples for using the integrated xarray plotting for quick plots
| examples/plot_examples.py
<|code_start|><|code_end|>
| examples/plot_examples.py
<|code_start|>"""
Xarray Plotting Examples
------------------------
This is an example of how to use some different aspects
of ACT's plotting tools as well as Xarray's tools.
"""
import matplotlib.pyplot as plt
import xarray as xr
import act
# Set up plot space ahead of time
fig, ax = plt... |
improving the function of the current skew-T plot
I am working on the VAP SondePram. We'd like to display the values of CAPE/CIN/LCL/LFC/LNB on the skew-T plot, and these values are supposed to reflect the calculation results of the VAP. Could you improve the skew-T display so that we can realize this function? Pleas... | examples/plotting/plot_skewt_with_text.py
<|code_start|><|code_end|>
| examples/plotting/plot_skewt_with_text.py
<|code_start|>"""
Skew-T plot of a sounding
-------------------------
This example shows how to make a Skew-T plot from a sounding
and calculate stability indicies.
Author: Maxwell Grover
"""
import glob
import metpy
import numpy as np
import xarray as xr
from matplotlib i... |
Ability to handle time_bounds
A number of instruments have different methods for averaging to a timestamp, some have the timestamp at the end of the averaging interval and some as the start. Two examples are the ARM ECOR and EBBR systems at the SGP site and include the time_bounds variable in the dataset.
It would... | act/utils/__init__.py
<|code_start|>"""
This module contains the common procedures used by all modules of the ARM
Community Toolkit.
"""
import lazy_loader as lazy
__getattr__, __dir__, __all__ = lazy.attach(
__name__,
submodules=['data_utils', 'datetime_utils', 'geo_utils', 'inst_utils', 'io_utils', 'qc_util... | act/utils/__init__.py
<|code_start|>"""
This module contains the common procedures used by all modules of the ARM
Community Toolkit.
"""
import lazy_loader as lazy
__getattr__, __dir__, __all__ = lazy.attach(
__name__,
submodules=['data_utils', 'datetime_utils', 'geo_utils', 'inst_utils', 'io_utils', 'qc_util... |
Add ARM Data Surveyor Command Line Tool
### Description
Migrate functionality from the ARM Data Surveyor
https://code.arm.gov/dq/ADS
to ACT
| scripts/ads.py
<|code_start|><|code_end|>
setup.py
<|code_start|>from os import path
from setuptools import setup, find_packages
import sys
import versioneer
# NOTE: This file must remain Python 2 compatible for the foreseeable future,
# to ensure that we error out properly for people with outdated setuptools
# and/o... | scripts/ads.py
<|code_start|>"""
ARM Data Surveyor (ADS)
Command line wrapper around ACT. Not all
features of ACT are included as options in ADS.
Please see the examples.txt for examples on how
to use ADS.
Author: Jason Hemedinger
"""
import argparse
import re
import json
import glob
import ast
import pathlib
impor... |
Valid Min in act.utils.decode_present_weather
* ACT version: 1.3.4
* Python version:3.9.15
* Operating System: Windows 10
### Description
I am receiving an error for "del data.attrs['valid_min'] when reading in data trying to decode present weather data.
### What I Did
```
act.utils.decode_present_weath... | act/utils/inst_utils.py
<|code_start|>"""
Functions containing utilities for instruments.
"""
def decode_present_weather(ds, variable=None, decoded_name=None):
"""
This function is to decode codes reported from automatic weather stations suchas the PWD22.
This is based on WMO Table 4680.
Parameters
... | act/utils/inst_utils.py
<|code_start|>"""
Functions containing utilities for instruments.
"""
def decode_present_weather(ds, variable=None, decoded_name=None):
"""
This function is to decode codes reported from automatic weather stations suchas the PWD22.
This is based on WMO Table 4680.
Parameters
... |
Attempting to set identical low and high xlims
* ACT version: 1.4.0
* Python version: 3.8.13
* Operating System: Linux
### Description
When processing in an automated queue we sometimes process when there are few time steps. The process does not fail but does produce a warning.
/.conda/envs/dqo-base/lib/pytho... | act/plotting/act_cmap.py
<|code_start|>"""
Available colormaps (reversed versions also provided), these
colormaps are available within matplotlib with names act_COLORMAP':
* HomeyerRainbow
"""
import matplotlib as mpl
import matplotlib.cm
import matplotlib.colors as colors
from ._act_cmap import datad, yuv_rai... | act/plotting/act_cmap.py
<|code_start|>"""
Available colormaps (reversed versions also provided), these
colormaps are available within matplotlib with names act_COLORMAP':
* HomeyerRainbow
"""
import matplotlib as mpl
import matplotlib.cm
import matplotlib.colors as colors
from ._act_cmap import datad, yuv_rai... |
Add option to include required global attributes when writing to netCDF
Some people are planning to use ACT to generate official datastreams and need to have required global attributes set. We should help them add the correct attributes with correct values.
| act/utils/inst_utils.py
<|code_start|>"""
Functions containing utilities for instruments.
"""
def decode_present_weather(ds, variable=None, decoded_name=None):
"""
This function is to decode codes reported from automatic weather stations suchas the PWD22.
This is based on WMO Table 4680.
Parameters
... | act/utils/inst_utils.py
<|code_start|>"""
Functions containing utilities for instruments.
"""
def decode_present_weather(ds, variable=None, decoded_name=None):
"""
This function is to decode codes reported from automatic weather stations suchas the PWD22.
This is based on WMO Table 4680.
Parameters
... |
Make SkewT Display More Flexible with Matplotlib
While taking a look at #606 , I noticed that there is not currently a way to feed in a user-defined figure or axes to the SkewT Display. This would be an important feature to add, enabling users to customize their plots more, and interact with other displays.
| act/plotting/skewtdisplay.py
<|code_start|>"""
Stores the class for SkewTDisplay.
"""
import warnings
# Import third party libraries
import matplotlib.pyplot as plt
import metpy
import metpy.calc as mpcalc
from metpy.plots import SkewT
from metpy.units import units
import numpy as np
import scipy
from copy import d... | act/plotting/skewtdisplay.py
<|code_start|>"""
Stores the class for SkewTDisplay.
"""
import warnings
# Import third party libraries
import metpy
import metpy.calc as mpcalc
from metpy.plots import SkewT, Hodograph
from metpy.units import units
import matplotlib.pyplot as plt
import numpy as np
import scipy
from co... |
Setting y-range for groupby causes error
* ACT version: 1.4.2
* Python version: 3.10.9
* Operating System: Mac Os
### Description
Trying to set the y-range for a groupby plot creates an error
### What I Did
```
files = glob.glob('./Data/sgpmetE13.b1/*2021*')
files.sort()
obj = act.io.armfiles.read_netc... | act/plotting/timeseriesdisplay.py
<|code_start|>"""
Stores the class for TimeSeriesDisplay.
"""
import datetime as dt
import textwrap
import warnings
from copy import deepcopy
from re import search, search as re_search
import matplotlib as mpl
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
import ... | act/plotting/timeseriesdisplay.py
<|code_start|>"""
Stores the class for TimeSeriesDisplay.
"""
import datetime as dt
import textwrap
import warnings
from copy import deepcopy
from re import search, search as re_search
import matplotlib as mpl
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
import ... |
Missing kwargs in plot_stacked_bar_graph
### Description
I just saw this in the code and wanted to report it. I think we need to pass in kawrgs to the below line in plot_stacked_bar_graph.
'''
my_hist, bins = np.histogram(xdata.values.flatten(), bins=bins, density=density)
'''
| act/plotting/histogramdisplay.py
<|code_start|>""" Module for Histogram Plotting. """
import matplotlib.pyplot as plt
import numpy as np
import xarray as xr
from ..utils import datetime_utils as dt_utils
from .plot import Display
class HistogramDisplay(Display):
"""
This class is used to make histogram plot... | act/plotting/histogramdisplay.py
<|code_start|>""" Module for Histogram Plotting. """
import matplotlib.pyplot as plt
import numpy as np
import xarray as xr
from ..utils import datetime_utils as dt_utils
from .plot import Display
class HistogramDisplay(Display):
"""
This class is used to make histogram plot... |
Example Incorrect
### Description
This example says it's for plotting sounding data but the example uses MET data. We should update this to be what it was originally intended.
https://arm-doe.github.io/ACT/source/auto_examples/plotting/plot_sonde.html
| examples/plotting/plot_sonde.py
<|code_start|>"""
Plot a timeseries of sounding data
----------------------------------------------------
This is a simple example for how to plot a timeseries of sounding
data from the ARM SGP site.
Author: Robert Jackson
"""
from matplotlib import pyplot as plt
import act
files = ... | examples/plotting/plot_sonde.py
<|code_start|>"""
Plot a timeseries of sounding data
----------------------------------------------------
This is a simple example for how to plot a timeseries of sounding
data from the ARM SGP site.
Author: Robert Jackson
"""
from matplotlib import pyplot as plt
import act
files = ... |
act.utils.decode_present_weather classification tables
* ACT version: 1.4.2
* Python version: 3.9.16
* Operating System: Windows 10
### Description
I was working on decoding the FD70 present weather codes for the ATMOS FD70. It appears the FD70 uses both the WMO 4680 and 4677 in the numeric code. For it's metar... | act/utils/inst_utils.py
<|code_start|>"""
Functions containing utilities for instruments.
"""
def decode_present_weather(ds, variable=None, decoded_name=None):
"""
This function is to decode codes reported from automatic weather stations suchas the PWD22.
This is based on WMO Table 4680.
Parameters
... | act/utils/inst_utils.py
<|code_start|>"""
Functions containing utilities for instruments.
"""
def decode_present_weather(ds, variable=None, decoded_name=None):
"""
This function is to decode codes reported from automatic weather stations such as the PWD22.
This is based on WMO Table 4680 as well as a sup... |
Feedstock failing due to pandas datetime
### Description
CI is failing due to datetime units not being set for csv reader
### What I Did
See the PR here that was failing
https://github.com/conda-forge/act-atmos-feedstock/pull/63
| act/io/csvfiles.py
<|code_start|>"""
This module contains I/O operations for loading csv files.
"""
import pathlib
import pandas as pd
from .armfiles import check_arm_standards
def read_csv(filename, sep=',', engine='python', column_names=None, skipfooter=0, ignore_index=True, **kwargs):
"""
Returns an `... | act/io/csvfiles.py
<|code_start|>"""
This module contains I/O operations for loading csv files.
"""
import pathlib
import pandas as pd
from .armfiles import check_arm_standards
def read_csv(filename, sep=',', engine='python', column_names=None, skipfooter=0, ignore_index=True, **kwargs):
"""
Returns an `... |
Ability to see DQR Report link with add_dqr_to_qc (or an additional class to the QC module)
Something along these lines, having the ability to get the DQR report for a datasteam of interest via python would cut down on some time. like somehow spit out a link after add_dqr_to_qc. Since sometimes datastreams have no d... | act/io/armfiles.py
<|code_start|>"""
This module contains I/O operations for loading files that were created for the
Atmospheric Radiation Measurement program supported by the Department of Energy
Office of Science.
"""
import copy
import glob
import json
import re
import urllib
import warnings
from pathlib import Pat... | act/io/armfiles.py
<|code_start|>"""
This module contains I/O operations for loading files that were created for the
Atmospheric Radiation Measurement program supported by the Department of Energy
Office of Science.
"""
import copy
import glob
import json
import re
import urllib
import warnings
from pathlib import Pat... |
Handling Incorrect ARM DQRs when applied with ACT function
We have implemented a function to query the ARM Data Quality Report database to return time periods when data is flagged. There are three levels of flagging within the DQRs, with two of them able to replace the variable values with NaN. ARM has a lot of DQRs wh... | act/qc/arm.py
<|code_start|>"""
Functions specifically for working with QC/DQRs from
the Atmospheric Radiation Measurement Program (ARM).
"""
import datetime as dt
import numpy as np
import requests
from act.config import DEFAULT_DATASTREAM_NAME
def add_dqr_to_qc(
ds,
variable=None,
assessment='incorre... | act/qc/arm.py
<|code_start|>"""
Functions specifically for working with QC/DQRs from
the Atmospheric Radiation Measurement Program (ARM).
"""
import datetime as dt
import numpy as np
import requests
from act.config import DEFAULT_DATASTREAM_NAME
def add_dqr_to_qc(
ds,
variable=None,
assessment='incorre... |
Histogram Display Examples
* ACT version: 1.4.5
* Python version: 3.10.8
* Operating System: macOS Ventura 13.3.1
### Description
Within the [histogram display](https://github.com/ARM-DOE/ACT/blob/main/act/plotting/histogramdisplay.py) there are two plotting functions that do not have associated examples within... | act/plotting/distributiondisplay.py
<|code_start|>""" Module for Distribution Plotting. """
import matplotlib.pyplot as plt
import numpy as np
import xarray as xr
from ..utils import datetime_utils as dt_utils
from .plot import Display
class DistributionDisplay(Display):
"""
This class is used to make dist... | act/plotting/distributiondisplay.py
<|code_start|>""" Module for Distribution Plotting. """
import matplotlib.pyplot as plt
import numpy as np
import xarray as xr
import pandas as pd
from ..utils import datetime_utils as dt_utils
from .plot import Display
class DistributionDisplay(Display):
"""
This class i... |
ADD: 'extract_arm_file_info' to harvest info from lists of ARM
filenames without loading the files, thereby saving header reading and processing times
<!-- Please remove check-list items that aren't relevant to your changes -->
- [ ] Documentation reflects changes
| act/utils/data_utils.py
<|code_start|>"""
Module containing utilities for the data.
"""
import importlib
import warnings
import metpy
import numpy as np
import pint
import scipy.stats as stats
import xarray as xr
spec = importlib.util.find_spec('pyart')
if spec is not None:
PYART_AVAILABLE = True
else:
PYAR... | act/utils/data_utils.py
<|code_start|>"""
Module containing utilities for the data.
"""
import importlib
import warnings
import metpy
import numpy as np
import pint
import scipy.stats as stats
import xarray as xr
from pathlib import Path
import re
spec = importlib.util.find_spec('pyart')
if spec is not None:
PY... |
New Example Template
### Description
For new contributors that might want to contribute an example, it would be beneficial for them to have a template that they could use to get started. Recommend that we add a "Template" section to the Examples area and include templates for Examples or even initial functions incl... | examples/templates/example_template.py
<|code_start|><|code_end|>
| examples/templates/example_template.py
<|code_start|># Place python module imports here, example:
import os
import matplotlib.pyplot as plt
import act
# Place arm username and token or example file if username and token
# aren't set, example:
username = os.getenv('ARM_USERNAME')
token = os.getenv('ARM_PASSWORD')
# Do... |
Sunset Stamen maps in GeoDisplay and potentially replace
Stamen is transitioning their maps to stadia at the end of October 2023. ACT will need to deprecate that feature in GeoDisplay and potentially look for replacements.
https://github.com/SciTools/cartopy/pull/2266
| act/plotting/geodisplay.py
<|code_start|>"""
Stores the class for GeographicPlotDisplay.
"""
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from .plot import Display
try:
import cartopy.crs as ccrs
import cartopy.feature as cfeature
from cartopy.io.img_tiles imp... | act/plotting/geodisplay.py
<|code_start|>"""
Stores the class for GeographicPlotDisplay.
"""
import warnings
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from .plot import Display
try:
import cartopy.crs as ccrs
import cartopy.feature as cfeature
from cartopy... |
Change default behavior of datafilter
Currently the default behavior of act.qc.qcfilter.datafilter is to delete the qc_variable after applying QC but that could delete some valuable information if a user is exploring the data. Recommend that we change the default to False.
| act/qc/qcfilter.py
<|code_start|>"""
Functions and methods for creating ancillary quality control variables
and filters (masks) which can be used with various corrections
routines in ACT.
"""
import dask
import numpy as np
import xarray as xr
from act.qc import comparison_tests, qctests, bsrn_tests
@xr.register_da... | act/qc/qcfilter.py
<|code_start|>"""
Functions and methods for creating ancillary quality control variables
and filters (masks) which can be used with various corrections
routines in ACT.
"""
import dask
import numpy as np
import xarray as xr
from act.qc import comparison_tests, qctests, bsrn_tests
@xr.register_da... |
Update ARM DQR webservice
### Description
The ARM DQR web-service is changing. Current system uses https://adc.arm.gov/dqrws/ and it is changing to new service https://dqr-web-service.svcs.arm.gov/docs
### What I Did
I have done nothing yet, but I will update the code to use the new web-service.
```
Paste... | act/qc/arm.py
<|code_start|>"""
Functions specifically for working with QC/DQRs from
the Atmospheric Radiation Measurement Program (ARM).
"""
import datetime as dt
import numpy as np
import requests
from act.config import DEFAULT_DATASTREAM_NAME
def add_dqr_to_qc(
ds,
variable=None,
assessment='incorre... | act/qc/arm.py
<|code_start|>"""
Functions specifically for working with QC/DQRs from
the Atmospheric Radiation Measurement Program (ARM).
"""
import datetime as dt
import numpy as np
import requests
import json
from act.config import DEFAULT_DATASTREAM_NAME
def add_dqr_to_qc(
ds,
variable=None,
assessm... |
setup.cfg excluding armfiles.py
I just noticed in the setup.cfg script, we are excluding act.io.armfiles.py (soon to be arm.py). We need to figure out if that's still necessary.
| act/io/armfiles.py
<|code_start|>"""
This module contains I/O operations for loading files that were created for the
Atmospheric Radiation Measurement program supported by the Department of Energy
Office of Science.
"""
import copy
import glob
import json
import re
import urllib
import warnings
from pathlib import Pat... | act/io/armfiles.py
<|code_start|>"""
This module contains I/O operations for loading files that were created for the
Atmospheric Radiation Measurement program supported by the Department of Energy
Office of Science.
"""
import copy
import datetime as dt
import glob
import json
import re
import tarfile
import tempfile
... |
Error while using add_dqr_to_qc: flag_values and flag_masks not set as expected
* ACT version: 1.5.3
* Python version: 3.11.4
* Operating System: windows
Trying to add DQRs into QC variable for 'lv_e' (latent flux) within the 30ecor datastream from SGP.
fluxdata = act.io.armfiles.read_netcdf('sgp30ecorE2.b1.200... | act/qc/clean.py
<|code_start|>"""
Class definitions for cleaning up QC variables to standard
cf-compliance.
"""
import copy
import re
import numpy as np
import xarray as xr
from act.qc.qcfilter import parse_bit
@xr.register_dataset_accessor('clean')
class CleanDataset:
"""
Class for cleaning up QC variabl... | act/qc/clean.py
<|code_start|>"""
Class definitions for cleaning up QC variables to standard
cf-compliance.
"""
import copy
import re
import numpy as np
import xarray as xr
from act.qc.qcfilter import parse_bit
@xr.register_dataset_accessor('clean')
class CleanDataset:
"""
Class for cleaning up QC variabl... |
Sunset Stamen maps in GeoDisplay and potentially replace
Stamen is transitioning their maps to stadia at the end of October 2023. ACT will need to deprecate that feature in GeoDisplay and potentially look for replacements.
https://github.com/SciTools/cartopy/pull/2266
| act/plotting/geodisplay.py
<|code_start|>"""
Stores the class for GeographicPlotDisplay.
"""
import warnings
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from .plot import Display
try:
import cartopy.crs as ccrs
import cartopy.feature as cfeature
from cartopy... | act/plotting/geodisplay.py
<|code_start|>"""
Stores the class for GeographicPlotDisplay.
"""
import warnings
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from .plot import Display
try:
import cartopy.crs as ccrs
import cartopy.feature as cfeature
from cartopy... |
Streaking with missing data in 2D plots
### Description
There is a new issue with pcolormesh() causing streaking when there is larger data gaps between data periods. If you look closely at the plot there is a part with some structure at the start and end of the plotted periods. That is the actual data. The extended ... | act/utils/data_utils.py
<|code_start|>"""
Module containing utilities for the data.
"""
import importlib
import warnings
import json
import metpy
import numpy as np
import pint
import scipy.stats as stats
import xarray as xr
from pathlib import Path
import re
import requests
spec = importlib.util.find_spec('pyart')... | act/utils/data_utils.py
<|code_start|>"""
Module containing utilities for the data.
"""
import importlib
import warnings
import json
import metpy
import numpy as np
import pint
import scipy.stats as stats
import xarray as xr
from pathlib import Path
import re
import requests
spec = importlib.util.find_spec('pyart')... |
Adding plotting options to Skew-T
Currently the skew-t plotting method has options to include surface-based parcel trace and shading for CAPE and CIN values. MetPy has some additional skew-T plotting features that might be useful:
- `plot_dry_adiabats` - Plots dry adiabat/theta lines
- `plot_mixing_lines` - Plots m... | act/plotting/skewtdisplay.py
<|code_start|>"""
Stores the class for SkewTDisplay.
"""
import warnings
from copy import deepcopy
import matplotlib.pyplot as plt
# Import third party libraries
import metpy
import metpy.calc as mpcalc
import numpy as np
import scipy
from metpy.plots import Hodograph, SkewT
from metpy.... | act/plotting/skewtdisplay.py
<|code_start|>"""
Stores the class for SkewTDisplay.
"""
import warnings
from copy import deepcopy
import matplotlib.pyplot as plt
# Import third party libraries
import metpy
import metpy.calc as mpcalc
import numpy as np
import scipy
from metpy.plots import Hodograph, SkewT
from metpy.... |
Function to create movies
The DQ Office creates many movies from static plots. Another researcher is working on a project that would benefit from a simple way to create moves from plots. We should create a function to make movies from a list of images. Finding a mostly Python way to do this would be best.
| act/utils/__init__.py
<|code_start|>"""
This module contains the common procedures used by all modules of the ARM
Community Toolkit.
"""
import lazy_loader as lazy
__getattr__, __dir__, __all__ = lazy.attach(
__name__,
submodules=['data_utils', 'datetime_utils', 'geo_utils', 'inst_utils', 'io_utils', 'qc_util... | act/utils/__init__.py
<|code_start|>"""
This module contains the common procedures used by all modules of the ARM
Community Toolkit.
"""
import lazy_loader as lazy
__getattr__, __dir__, __all__ = lazy.attach(
__name__,
submodules=['data_utils', 'datetime_utils', 'geo_utils', 'inst_utils', 'io_utils', 'qc_util... |
Add Hysplit data support
As first documented in #702 , there was interest at the 2023 PI meeting in the ability to read in and work with Hysplit data. We discussed this again on the ACT call and there was interest in this as well from others. It is proposed that we create a simple reader that could read in a file or ... | act/io/__init__.py
<|code_start|>"""
This module contains procedures for reading and writing various ARM datasets.
"""
import lazy_loader as lazy
__getattr__, __dir__, __all__ = lazy.attach(
__name__,
submodules=['arm', 'text', 'icartt', 'mpl', 'neon', 'noaagml', 'noaapsl', 'pysp2'],
submod_attrs={
... | act/io/__init__.py
<|code_start|>"""
This module contains procedures for reading and writing various ARM datasets.
"""
import lazy_loader as lazy
__getattr__, __dir__, __all__ = lazy.attach(
__name__,
submodules=['arm', 'text', 'icartt', 'mpl', 'neon', 'noaagml', 'noaapsl', 'pysp2', 'hysplit'],
submod_at... |
Add warning to change units when fails
Need to add warning to change units method to indicate when a problem occurs, but don't raise an error as many string units are not correct or udunits compliant.
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.... | act/io/hysplit.py
<|code_start|>import os
import xarray as xr
import numpy as np
import pandas as pd
from datetime import datetime
from .text import read_csv
def read_hysplit(filename, base_year=2000):
"""
Reads an input HYSPLIT trajectory for plotting in ACT.
Parameters
----------
filename: str... | act/io/hysplit.py
<|code_start|>import os
import xarray as xr
import numpy as np
import pandas as pd
from datetime import datetime
from .text import read_csv
def read_hysplit(filename, base_year=2000):
"""
Reads an input HYSPLIT trajectory for plotting in ACT.
Parameters
----------
filename: str... |
Bug in xsection plot map code
* ACT version: Current Version
* Python version: All
* Operating System: All
### Description
xsection plot map is generating images with duplicate axes, see image below. I believe this is probably the cause to our baseline image failure.
:
"""
This class i... | act/plotting/distributiondisplay.py
<|code_start|>""" Module for Distribution Plotting. """
import matplotlib.pyplot as plt
import numpy as np
import xarray as xr
import pandas as pd
from ..utils import datetime_utils as dt_utils, calculate_percentages
from .plot import Display
class DistributionDisplay(Display):
... |
GeographicPlotDisplay documentation missing description of return value
* ACT version: 2.1.1
* Python version: all
* Operating System: all
### Description
The GeographicPlotDisplay is missing a description of the returned matplotlib axes object. This proved to be a bit confusing on how to tell a student how to... | act/plotting/geodisplay.py
<|code_start|>"""
Stores the class for GeographicPlotDisplay.
"""
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from .plot import Display
try:
import cartopy.crs as ccrs
import cartopy.feature as cfeature
from cartopy.io import img_t... | act/plotting/geodisplay.py
<|code_start|>"""
Stores the class for GeographicPlotDisplay.
"""
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from .plot import Display
try:
import cartopy.crs as ccrs
import cartopy.feature as cfeature
from cartopy.io import img_t... |
AmeriFlux Documentation is not showing up in the API
The new act.io.ameriflux code is not showing up in the documentation.
| act/io/__init__.py
<|code_start|>"""
This module contains procedures for reading and writing various ARM datasets.
"""
import lazy_loader as lazy
__getattr__, __dir__, __all__ = lazy.attach(
__name__,
submodules=[
'arm',
'ameriflux',
'text',
'icartt',
'mpl',
'n... | act/io/__init__.py
<|code_start|>"""
This module contains procedures for reading and writing various ARM datasets.
"""
import lazy_loader as lazy
__getattr__, __dir__, __all__ = lazy.attach(
__name__,
submodules=[
'arm',
'ameriflux',
'text',
'icartt',
'mpl',
'n... |
Fix faces using GFPGAN + high batch count tends to fail 6GB VRAM
6GB is already on a knife's edge, and this seems to push it over. However it doesn't do it every single time, and I have not seen it happen when using batch count 1, even when hitting submit repeatedly.
RuntimeError: CUDA out of memory. Tried to alloca... | webui.py
<|code_start|>import argparse, os, sys, glob
from collections import namedtuple
import torch
import torch.nn as nn
import numpy as np
import gradio as gr
from omegaconf import OmegaConf
from PIL import Image, ImageFont, ImageDraw, PngImagePlugin
from itertools import islice
from einops import rearrange, repea... | webui.py
<|code_start|>import argparse, os, sys, glob
from collections import namedtuple
import torch
import torch.nn as nn
import numpy as np
import gradio as gr
from omegaconf import OmegaConf
from PIL import Image, ImageFont, ImageDraw, PngImagePlugin
from itertools import islice
from einops import rearrange, repea... |
FileNotFoundError after new update
Getting a FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\admin\\stable-diffusion-webui\\scripts' after the new update.
Not exactly good at all the coding stuff, using it just fine yesterday but I downloaded the repo instead of git clone, for... | modules/scripts.py
<|code_start|>import os
import sys
import traceback
import modules.ui as ui
import gradio as gr
from modules.processing import StableDiffusionProcessing
class Script:
filename = None
args_from = None
args_to = None
def title(self):
raise NotImplementedError()
def ui(s... | modules/scripts.py
<|code_start|>import os
import sys
import traceback
import modules.ui as ui
import gradio as gr
from modules.processing import StableDiffusionProcessing
class Script:
filename = None
args_from = None
args_to = None
def title(self):
raise NotImplementedError()
def ui(s... |
Error in extras tab when resizing images
**Describe the bug**
Get error "AttributeError: 'int' object has no attribute 'encode'" on trying to upscale an image in the "extras" tab.
**To Reproduce**
1. Go to 'extras
2. Click on lanczos, upload image, and press generate
3. See error on the right
**Expected beha... | modules/images.py
<|code_start|>import datetime
import math
import os
from collections import namedtuple
import re
import numpy as np
from PIL import Image, ImageFont, ImageDraw, PngImagePlugin
from fonts.ttf import Roboto
import string
import modules.shared
from modules import sd_samplers, shared
from modules.shared... | modules/images.py
<|code_start|>import datetime
import math
import os
from collections import namedtuple
import re
import numpy as np
from PIL import Image, ImageFont, ImageDraw, PngImagePlugin
from fonts.ttf import Roboto
import string
import modules.shared
from modules import sd_samplers, shared
from modules.shared... |
New VRAM Monitoring throws errors on an AMD powered install
As the title says, after updating to the latest branch, stable diffusion stopped worked. After some debugging and rudimentary coding around, removing any references to the Memmon.py allows for the webui to work as usual again.
Perhaps an option to outright ... | modules/memmon.py
<|code_start|>import threading
import time
from collections import defaultdict
import torch
class MemUsageMonitor(threading.Thread):
run_flag = None
device = None
disabled = False
opts = None
data = None
def __init__(self, name, device, opts):
threading.Thread.__ini... | modules/memmon.py
<|code_start|>import threading
import time
from collections import defaultdict
import torch
class MemUsageMonitor(threading.Thread):
run_flag = None
device = None
disabled = False
opts = None
data = None
def __init__(self, name, device, opts):
threading.Thread.__ini... |
[Feature Request] Automatic link opening
A parameter that allows you to automatically open a UI link in the browser would be very convenient!
| modules/shared.py
<|code_start|>import sys
import argparse
import json
import os
import gradio as gr
import torch
import tqdm
import modules.artists
from modules.paths import script_path, sd_path
from modules.devices import get_optimal_device
import modules.styles
import modules.interrogate
import modules.memmon
impo... | modules/shared.py
<|code_start|>import sys
import argparse
import json
import os
import gradio as gr
import torch
import tqdm
import modules.artists
from modules.paths import script_path, sd_path
from modules.devices import get_optimal_device
import modules.styles
import modules.interrogate
import modules.memmon
impo... |
GFPGAN restore faces error
Using GFPGAN restore faces gives following error
Traceback (most recent call last):
File "/home/x/stable-diff/stable-diffusion-webui/modules/ui.py", line 128, in f
res = list(func(*args, **kwargs))
File "/home/x/stable-diff/stable-diffusion-webui/webui.py", line 55, in f
re... | launch.py
<|code_start|># this scripts installs necessary requirements and launches main program in webui.py
import subprocess
import os
import sys
import importlib.util
import shlex
dir_repos = "repositories"
dir_tmp = "tmp"
python = sys.executable
git = os.environ.get('GIT', "git")
torch_command = os.environ.get('... | launch.py
<|code_start|># this scripts installs necessary requirements and launches main program in webui.py
import subprocess
import os
import sys
import importlib.util
import shlex
dir_repos = "repositories"
dir_tmp = "tmp"
python = sys.executable
git = os.environ.get('GIT', "git")
torch_command = os.environ.get('... |
Images being cleared on dragover
With 9035afb, dragging over an image will trigger the reset of that image. I don't find that a logical UI behaviour from a UX point of view. I might accidentally drag something over the browser window and involuntarily lose the current image.
@trufty, would you mind explaining why t... | modules/ui.py
<|code_start|>import base64
import html
import io
import json
import math
import mimetypes
import os
import random
import sys
import time
import traceback
import numpy as np
import torch
from PIL import Image
import gradio as gr
import gradio.utils
import gradio.routes
from modules.paths import script_... | modules/ui.py
<|code_start|>import base64
import html
import io
import json
import math
import mimetypes
import os
import random
import sys
import time
import traceback
import numpy as np
import torch
from PIL import Image
import gradio as gr
import gradio.utils
import gradio.routes
from modules.paths import script_... |
Generate button doesn't change to Interrupt button when "show progressbar" is disabled in settings.
**Describe the bug**
With "show progressbar" off in settings, the Generate button doesn't change when generation begins and interrupt doesn't work.
With "show progressbar" on in settings, the Generate button changes ... | modules/ui.py
<|code_start|>import base64
import html
import io
import json
import math
import mimetypes
import os
import random
import sys
import time
import traceback
import numpy as np
import torch
from PIL import Image
import gradio as gr
import gradio.utils
import gradio.routes
from modules.paths import script_... | modules/ui.py
<|code_start|>import base64
import html
import io
import json
import math
import mimetypes
import os
import random
import sys
import time
import traceback
import numpy as np
import torch
from PIL import Image
import gradio as gr
import gradio.utils
import gradio.routes
from modules.paths import script_... |
Request: something akin to a batch ID for folder name pattern
**Is your feature request related to a problem? Please describe.**
I've been experimenting with the wildcards script linked in the wiki lately.
It's wonderful but unfortunately, it's wreaking havoc on the folder structure in my outputs/txt2img-images folde... | modules/images.py
<|code_start|>import datetime
import math
import os
from collections import namedtuple
import re
import numpy as np
import piexif
import piexif.helper
from PIL import Image, ImageFont, ImageDraw, PngImagePlugin
from fonts.ttf import Roboto
import string
import modules.shared
from modules import sd_s... | modules/images.py
<|code_start|>import datetime
import math
import os
from collections import namedtuple
import re
import numpy as np
import piexif
import piexif.helper
from PIL import Image, ImageFont, ImageDraw, PngImagePlugin
from fonts.ttf import Roboto
import string
import modules.shared
from modules import sd_s... |
Img2Img alt should divide by sigma[-1], not std
https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/53651696dc1492f3b7cc009d64a55532bc787aa7/scripts/img2imgalt.py#L59
While the noise used in stable diffusion is generated from a normal distribution, that doesn't mean that it is always perfectly normal. Norma... | scripts/img2imgalt.py
<|code_start|>from collections import namedtuple
import numpy as np
from tqdm import trange
import modules.scripts as scripts
import gradio as gr
from modules import processing, shared, sd_samplers, prompt_parser
from modules.processing import Processed
from modules.sd_samplers import samplers
... | scripts/img2imgalt.py
<|code_start|>from collections import namedtuple
import numpy as np
from tqdm import trange
import modules.scripts as scripts
import gradio as gr
from modules import processing, shared, sd_samplers, prompt_parser
from modules.processing import Processed
from modules.sd_samplers import samplers
... |
Option for sound effect/notification upon job completion
Problem:
I often alt-tab and work on other things while the images are generating. Then it's usually half an hour passed when I realize that the job is done.
Solution request:
Option for sound effect/notification upon job completion.
| modules/ui.py
<|code_start|>import base64
import html
import io
import json
import math
import mimetypes
import os
import random
import sys
import time
import traceback
import numpy as np
import torch
from PIL import Image
import gradio as gr
import gradio.utils
import gradio.routes
from modules.paths import script_... | modules/ui.py
<|code_start|>import base64
import html
import io
import json
import math
import mimetypes
import os
import random
import sys
import time
import traceback
import numpy as np
import torch
from PIL import Image
import gradio as gr
import gradio.utils
import gradio.routes
from modules.paths import script_... |
Checkpoint Merger - FileNotFoundError: [Errno 2] No such file or directory:
When using custom model folder: COMMANDLINE_ARGS=--ckpt-dir "d:\external\models\" the checkpoint merger can't find the models
FileNotFoundError: [Errno 2] No such file or directory: 'models/wd-v1-2-full-ema.ckpt'
**To Reproduce**
Steps t... | modules/ui.py
<|code_start|>import base64
import html
import io
import json
import math
import mimetypes
import os
import random
import sys
import time
import traceback
import numpy as np
import torch
from PIL import Image, PngImagePlugin
import gradio as gr
import gradio.utils
import gradio.routes
from modules.path... | modules/ui.py
<|code_start|>import base64
import html
import io
import json
import math
import mimetypes
import os
import random
import sys
import time
import traceback
import numpy as np
import torch
from PIL import Image, PngImagePlugin
import gradio as gr
import gradio.utils
import gradio.routes
from modules.path... |
X/Y plot does not switch between models whose names starts with the same phrase
**Describe the bug**
X/Y plot does not switch between models whose names starts with the same phrase.
I have 3 models named:
model-wd.ckpt
model-wd-pruned.ckpt
model-wd-pruned-model-cn-poster-merged.ckpt
I can manually swi... | modules/sd_models.py
<|code_start|>import glob
import os.path
import sys
from collections import namedtuple
import torch
from omegaconf import OmegaConf
from ldm.util import instantiate_from_config
from modules import shared
CheckpointInfo = namedtuple("CheckpointInfo", ['filename', 'title', 'hash', 'model_name'])
... | modules/sd_models.py
<|code_start|>import glob
import os.path
import sys
from collections import namedtuple
import torch
from omegaconf import OmegaConf
from ldm.util import instantiate_from_config
from modules import shared
CheckpointInfo = namedtuple("CheckpointInfo", ['filename', 'title', 'hash', 'model_name'])
... |
"Save" button always saves to .png, ignoring settings
**Describe the bug**
When you press "Save", the image outputted to /log/ is always in png format, no matter what output format is selected in settings. The outputted images are properly saved to jpg, though. But in order for the "save" button to be useful, it shoul... | modules/ui.py
<|code_start|>import base64
import html
import io
import json
import math
import mimetypes
import os
import random
import sys
import time
import traceback
import numpy as np
import torch
from PIL import Image, PngImagePlugin
import gradio as gr
import gradio.utils
import gradio.routes
from modules.path... | modules/ui.py
<|code_start|>import base64
import html
import io
import json
import math
import mimetypes
import os
import random
import sys
import time
import traceback
import numpy as np
import torch
from PIL import Image, PngImagePlugin
import piexif
import gradio as gr
import gradio.utils
import gradio.routes
fro... |
New samplers are not showing up
I just updated my version to try out the new samplers but they are not showing up. I deleted repositories/k-diffusion as a test but they still dont show up.
Someone on reddit mentioned to do "source venv/bin/activate/" and then to do a pip uninstall k-diffusion, but I have no idea wha... | modules/sd_samplers.py
<|code_start|>from collections import namedtuple
import numpy as np
import torch
import tqdm
from PIL import Image
import inspect
import k_diffusion.sampling
import ldm.models.diffusion.ddim
import ldm.models.diffusion.plms
from modules import prompt_parser
from modules.shared import opts, cmd_... | modules/sd_samplers.py
<|code_start|>from collections import namedtuple
import numpy as np
import torch
import tqdm
from PIL import Image
import inspect
from modules.paths import paths
sys.path.insert(0, paths["k_diffusion"])
import k_diffusion.sampling
import ldm.models.diffusion.ddim
import ldm.models.diffusion.plms
... |
Script reload without restart
I write my own scripts and its getting quite complex. I have to change settings and values quite often, and when I do, I need to restart with the webui-user to be able to see the changes.
I am not an experienced python coder, and using gradio for this is too difficult for me.
Is ther... | modules/scripts.py
<|code_start|>import os
import sys
import traceback
import modules.ui as ui
import gradio as gr
from modules.processing import StableDiffusionProcessing
from modules import shared
class Script:
filename = None
args_from = None
args_to = None
# The title of the script. This is what... | modules/scripts.py
<|code_start|>import os
import sys
import traceback
import modules.ui as ui
import gradio as gr
from modules.processing import StableDiffusionProcessing
from modules import shared
class Script:
filename = None
args_from = None
args_to = None
# The title of the script. This is what... |
Display time taken in minutes when over 60 seconds
**Is your feature request related to a problem? Please describe.**
I am always investigating how my parameters relate to the performance for a run so I can time things better. If I'm stepping off the computer for 15 minutes, it's useful for me to be better understandi... | modules/ui.py
<|code_start|>import base64
import html
import io
import json
import math
import mimetypes
import os
import random
import sys
import time
import traceback
import platform
import subprocess as sp
from functools import reduce
import numpy as np
import torch
from PIL import Image, PngImagePlugin
import piex... | modules/ui.py
<|code_start|>import base64
import html
import io
import json
import math
import mimetypes
import os
import random
import sys
import time
import traceback
import platform
import subprocess as sp
from functools import reduce
import numpy as np
import torch
from PIL import Image, PngImagePlugin
import piex... |
Keep -1 for seeds on X/Y plot checkbox isn't respected.
**Describe the bug**
Keep -1 for seeds on X/Y plot checkbox isn't respected
**To Reproduce**
Steps to reproduce the behavior:
1. txt2img
2. use Script, X/Y Plot, enter values, check "Keep -1 for seeds on X/Y plot"
3. Generate
4. See that all the seeds are... | scripts/xy_grid.py
<|code_start|>from collections import namedtuple
from copy import copy
from itertools import permutations, chain
import random
import csv
from io import StringIO
from PIL import Image
import numpy as np
import modules.scripts as scripts
import gradio as gr
from modules import images
from modules.pr... | scripts/xy_grid.py
<|code_start|>from collections import namedtuple
from copy import copy
from itertools import permutations, chain
import random
import csv
from io import StringIO
from PIL import Image
import numpy as np
import modules.scripts as scripts
import gradio as gr
from modules import images
from modules.pr... |
(Feature Request) Add model/vae/hypernetwork file name to be saved in image info
Add selected model / vae / hypernetwork file name to be saved in image info too.
Maybe make it optional.
I do not know what i change in settings tab, but now i can't recreate same image again.
I have few models and hypernetworks f... | modules/processing.py
<|code_start|>import json
import math
import os
import sys
import torch
import numpy as np
from PIL import Image, ImageFilter, ImageOps
import random
import cv2
from skimage import exposure
import modules.sd_hijack
from modules import devices, prompt_parser, masking, sd_samplers, lowvram
from mo... | modules/processing.py
<|code_start|>import json
import math
import os
import sys
import torch
import numpy as np
from PIL import Image, ImageFilter, ImageOps
import random
import cv2
from skimage import exposure
import modules.sd_hijack
from modules import devices, prompt_parser, masking, sd_samplers, lowvram
from mo... |
Uncapped token limit does not work past the ~85th token
**Describe the bug**
Tokens past ~85 do not really affect the prompt in a expected or consistant way. Tokens past ~90 do not do anything (except provide noise). It would be nice if someone could try on NovelAI (as they have a cap of ~200) if the behavior is the s... | modules/sd_hijack.py
<|code_start|>import math
import os
import sys
import traceback
import torch
import numpy as np
from torch import einsum
from torch.nn.functional import silu
import modules.textual_inversion.textual_inversion
from modules import prompt_parser, devices, sd_hijack_optimizations, shared, hypernetwork... | modules/sd_hijack.py
<|code_start|>import math
import os
import sys
import traceback
import torch
import numpy as np
from torch import einsum
from torch.nn.functional import silu
import modules.textual_inversion.textual_inversion
from modules import prompt_parser, devices, sd_hijack_optimizations, shared, hypernetwork... |
Error if more than 75 tokens used
**Describe the bug**
When typing the prompt (txt2img) the number of tokens increases from 75 to 150, but then it errors when I try to generate images. It will run if the number of tokens are below 75.
> Traceback (most recent call last):
> File "F:\stable-diffusion-webui\modules... | modules/sd_hijack.py
<|code_start|>import math
import os
import sys
import traceback
import torch
import numpy as np
from torch import einsum
from torch.nn.functional import silu
import modules.textual_inversion.textual_inversion
from modules import prompt_parser, devices, sd_hijack_optimizations, shared
from modules.... | modules/sd_hijack.py
<|code_start|>import math
import os
import sys
import traceback
import torch
import numpy as np
from torch import einsum
from torch.nn.functional import silu
import modules.textual_inversion.textual_inversion
from modules import prompt_parser, devices, sd_hijack_optimizations, shared
from modules.... |
Save feature fails until output directories created manually
**Describe the bug**
Save feature of txt2img panel does not work until output directories are created manually
**To Reproduce**
Steps to reproduce the behavior:
1. Check out a clean copy of the project add the model file and launch it via `webui.bat`, w... | modules/ui.py
<|code_start|>import base64
import html
import io
import json
import math
import mimetypes
import os
import random
import sys
import time
import traceback
import platform
import subprocess as sp
from functools import reduce
import numpy as np
import torch
from PIL import Image, PngImagePlugin
import piex... | modules/ui.py
<|code_start|>import base64
import html
import io
import json
import math
import mimetypes
import os
import random
import sys
import time
import traceback
import platform
import subprocess as sp
from functools import reduce
import numpy as np
import torch
from PIL import Image, PngImagePlugin
import piex... |
Progress bar percentage is broken
**Describe the bug**
Progress bar finishes on 65-80%, image processing bar and total progress bar are have different steps amount.
I've already seen this issue https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/3093, I think it's related to this, but it covers a slightly... | modules/sd_samplers.py
<|code_start|>from collections import namedtuple
import numpy as np
import torch
import tqdm
from PIL import Image
import inspect
import k_diffusion.sampling
import ldm.models.diffusion.ddim
import ldm.models.diffusion.plms
from modules import prompt_parser, devices, processing
from modules.shar... | modules/sd_samplers.py
<|code_start|>from collections import namedtuple
import numpy as np
import torch
import tqdm
from PIL import Image
import inspect
import k_diffusion.sampling
import ldm.models.diffusion.ddim
import ldm.models.diffusion.plms
from modules import prompt_parser, devices, processing
from modules.shar... |
[Bug]: TypeError: 'NoneType' object is not subscriptable when using img2img alternative test
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
Webui fails to generate an image if using the img2img alternative test since the run... | scripts/img2imgalt.py
<|code_start|>from collections import namedtuple
import numpy as np
from tqdm import trange
import modules.scripts as scripts
import gradio as gr
from modules import processing, shared, sd_samplers, prompt_parser
from modules.processing import Processed
from modules.shared import opts, cmd_opts... | scripts/img2imgalt.py
<|code_start|>from collections import namedtuple
import numpy as np
from tqdm import trange
import modules.scripts as scripts
import gradio as gr
from modules import processing, shared, sd_samplers, prompt_parser
from modules.processing import Processed
from modules.shared import opts, cmd_opts... |
Deepdanbooru breaks cuda on image generation after running.
**Describe the bug**
After running deepdanbooru on an image, new images can't be generated anymore due to a cuda error.
**To Reproduce**
Steps to reproduce the behavior:
1. Enable deepdanbooru
2. Generate or upload an image to img2img
3. Click "Interro... | launch.py
<|code_start|># this scripts installs necessary requirements and launches main program in webui.py
import subprocess
import os
import sys
import importlib.util
import shlex
import platform
dir_repos = "repositories"
python = sys.executable
git = os.environ.get('GIT', "git")
index_url = os.environ.get('INDEX_... | launch.py
<|code_start|># this scripts installs necessary requirements and launches main program in webui.py
import subprocess
import os
import sys
import importlib.util
import shlex
import platform
dir_repos = "repositories"
python = sys.executable
git = os.environ.get('GIT', "git")
index_url = os.environ.get('INDEX_... |
Portrait mode images generates in landscape mode in img2img [Bug]:
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
Image in portrait mode shows up fine in the preview, but when the alternative image is generated it is rotate... | modules/img2img.py
<|code_start|>import math
import os
import sys
import traceback
import numpy as np
from PIL import Image, ImageOps, ImageChops
from modules import devices
from modules.processing import Processed, StableDiffusionProcessingImg2Img, process_images
from modules.shared import opts, state
import modules... | modules/img2img.py
<|code_start|>import math
import os
import sys
import traceback
import numpy as np
from PIL import Image, ImageOps, ImageChops
from modules import devices
from modules.processing import Processed, StableDiffusionProcessingImg2Img, process_images
from modules.shared import opts, state
import modules... |
Long txt2img prompts cause a crash due to file name length
**Describe the bug**
```
Arguments: ('ornate intricate filigree framed, elf wearing ornate intricate detailed carved stained glass (((armor))), determined face, ((perfect face)), heavy makeup, led runes, inky swirling mist, gemstones, ((magic mist backgroun... | modules/images.py
<|code_start|>import datetime
import sys
import traceback
import pytz
import io
import math
import os
from collections import namedtuple
import re
import numpy as np
import piexif
import piexif.helper
from PIL import Image, ImageFont, ImageDraw, PngImagePlugin
from fonts.ttf import Roboto
import str... | modules/images.py
<|code_start|>import datetime
import sys
import traceback
import pytz
import io
import math
import os
from collections import namedtuple
import re
import numpy as np
import piexif
import piexif.helper
from PIL import Image, ImageFont, ImageDraw, PngImagePlugin
from fonts.ttf import Roboto
import str... |
[Bug]: loss is logged after 1 step, and logging (all) is off by 1 step
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
1. Logging is off by 1 step, for the loss CSV, model, and previews
I put a counter which incremen... | modules/hypernetworks/hypernetwork.py
<|code_start|>import csv
import datetime
import glob
import html
import os
import sys
import traceback
import inspect
import modules.textual_inversion.dataset
import torch
import tqdm
from einops import rearrange, repeat
from ldm.util import default
from modules import devices, pr... | modules/hypernetworks/hypernetwork.py
<|code_start|>import csv
import datetime
import glob
import html
import os
import sys
import traceback
import inspect
import modules.textual_inversion.dataset
import torch
import tqdm
from einops import rearrange, repeat
from ldm.util import default
from modules import devices, pr... |
[Bug]: Error when generating with 'Highres. fix' and 'Upscale latent space image when doing hires. fix'
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
Attempting to use 'Highres. fix' with 'Upscale latent space image w... | modules/masking.py
<|code_start|>from PIL import Image, ImageFilter, ImageOps
def get_crop_region(mask, pad=0):
"""finds a rectangular region that contains all masked ares in an image. Returns (x1, y1, x2, y2) coordinates of the rectangle.
For example, if a user has painted the top-right part of a 512x512 ima... | modules/masking.py
<|code_start|>from PIL import Image, ImageFilter, ImageOps
def get_crop_region(mask, pad=0):
"""finds a rectangular region that contains all masked ares in an image. Returns (x1, y1, x2, y2) coordinates of the rectangle.
For example, if a user has painted the top-right part of a 512x512 ima... |
[Bug]: "1" checkpoint caching is useless
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
"1" checkpoint caching is useless. When you set the webui to keep n caches, only n-1 is actually useful. This happens because mode... | modules/sd_models.py
<|code_start|>import collections
import os.path
import sys
import gc
from collections import namedtuple
import torch
import re
from omegaconf import OmegaConf
from ldm.util import instantiate_from_config
from modules import shared, modelloader, devices, script_callbacks, sd_vae
from modules.paths... | modules/sd_models.py
<|code_start|>import collections
import os.path
import sys
import gc
from collections import namedtuple
import torch
import re
from omegaconf import OmegaConf
from ldm.util import instantiate_from_config
from modules import shared, modelloader, devices, script_callbacks, sd_vae
from modules.paths... |
[Bug]: Cannot disable writing of PNG Info
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
Unchecking this setting (and applying)
Save text information about generation parameters as chunks to png files
No longer prevents... | modules/images.py
<|code_start|>import datetime
import sys
import traceback
import pytz
import io
import math
import os
from collections import namedtuple
import re
import numpy as np
import piexif
import piexif.helper
from PIL import Image, ImageFont, ImageDraw, PngImagePlugin
from fonts.ttf import Roboto
import str... | modules/images.py
<|code_start|>import datetime
import sys
import traceback
import pytz
import io
import math
import os
from collections import namedtuple
import re
import numpy as np
import piexif
import piexif.helper
from PIL import Image, ImageFont, ImageDraw, PngImagePlugin
from fonts.ttf import Roboto
import str... |
[Bug]: Torch.cuda error during Textual Inversion training
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
Something is not 100% for me either, because when I copy a previous step back and then resume the training, I get... | modules/hypernetworks/hypernetwork.py
<|code_start|>import csv
import datetime
import glob
import html
import os
import sys
import traceback
import inspect
import modules.textual_inversion.dataset
import torch
import tqdm
from einops import rearrange, repeat
from ldm.util import default
from modules import devices, pr... | modules/hypernetworks/hypernetwork.py
<|code_start|>import csv
import datetime
import glob
import html
import os
import sys
import traceback
import inspect
import modules.textual_inversion.dataset
import torch
import tqdm
from einops import rearrange, repeat
from ldm.util import default
from modules import devices, pr... |
[Feature Request]: Add newest DPM-Solver++
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What would your feature do ?
Support the newest DPM-Solver++, the state-of-the-art fast sampler for guided sampling by diffusion models.
DPM... | launch.py
<|code_start|># this scripts installs necessary requirements and launches main program in webui.py
import subprocess
import os
import sys
import importlib.util
import shlex
import platform
dir_repos = "repositories"
dir_extensions = "extensions"
python = sys.executable
git = os.environ.get('GIT', "git")
inde... | launch.py
<|code_start|># this scripts installs necessary requirements and launches main program in webui.py
import subprocess
import os
import sys
import importlib.util
import shlex
import platform
dir_repos = "repositories"
dir_extensions = "extensions"
python = sys.executable
git = os.environ.get('GIT', "git")
inde... |
https (ssl) support
**Is your feature request related to a problem? Please describe.**
ability to start it in https (ssl crypted) mode, specifying the cert+key+servername on the cli.
**Describe the solution you'd like**
gradio already implemented it, just pass the ssl_keyfile and ssl_certfile parameters to launch(... | modules/shared.py
<|code_start|>import argparse
import datetime
import json
import os
import sys
from collections import OrderedDict
import time
import gradio as gr
import tqdm
import modules.artists
import modules.interrogate
import modules.memmon
import modules.sd_models
import modules.styles
import modules.devices... | modules/shared.py
<|code_start|>import argparse
import datetime
import json
import os
import sys
from collections import OrderedDict
import time
import gradio as gr
import tqdm
import modules.artists
import modules.interrogate
import modules.memmon
import modules.sd_models
import modules.styles
import modules.devices... |
[Bug]: X/Y plot ignores file format settings for grids
### Is there an existing issue for this?
- [x] I have searched the existing issues and checked the recent builds/commits
### What happened?
Files are saved in PNG format.
### Steps to reproduce the problem
1. Set File format for grids to jpg
2. Generate grid ... | scripts/prompt_matrix.py
<|code_start|>import math
from collections import namedtuple
from copy import copy
import random
import modules.scripts as scripts
import gradio as gr
from modules import images
from modules.processing import process_images, Processed
from modules.shared import opts, cmd_opts, state
import mo... | scripts/prompt_matrix.py
<|code_start|>import math
from collections import namedtuple
from copy import copy
import random
import modules.scripts as scripts
import gradio as gr
from modules import images
from modules.processing import process_images, Processed
from modules.shared import opts, cmd_opts, state
import mo... |
Problems with LDSR upscaling
When using the new LDSR upscaling feature, be it via SD upscaling in img2img or directly in "Extras", black rectangles appear in the outputs on the right and at the bottom when upscaling a 230x219 photo.

### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
Using x/y plot with multiple checkp... | modules/sd_models.py
<|code_start|>import collections
import os.path
import sys
import gc
from collections import namedtuple
import torch
import re
from omegaconf import OmegaConf
from ldm.util import instantiate_from_config
from modules import shared, modelloader, devices, script_callbacks, sd_vae
from modules.paths... | modules/sd_models.py
<|code_start|>import collections
import os.path
import sys
import gc
from collections import namedtuple
import torch
import re
from omegaconf import OmegaConf
from ldm.util import instantiate_from_config
from modules import shared, modelloader, devices, script_callbacks, sd_vae
from modules.paths... |
[Bug]: Cannot switch checkpoints
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
I cannot change the checkpoint in the WebUI anymore since updating today. This is the error message I get:
LatentDiffusion: Running in ... | modules/sd_models.py
<|code_start|>import collections
import os.path
import sys
import gc
from collections import namedtuple
import torch
import re
from omegaconf import OmegaConf
from ldm.util import instantiate_from_config
from modules import shared, modelloader, devices, script_callbacks, sd_vae
from modules.paths... | modules/sd_models.py
<|code_start|>import collections
import os.path
import sys
import gc
from collections import namedtuple
import torch
import re
from omegaconf import OmegaConf
from ldm.util import instantiate_from_config
from modules import shared, modelloader, devices, script_callbacks, sd_vae
from modules.paths... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.