language string | code-snippit string | instruction string | flaws list | flaw_count int64 |
|---|---|---|---|---|
python | dispatched_user_count,
len(dispatch_greenlets),
)
dispatch_greenlets.join()
logger.debug(
"Currently spawned users: %s" % _format_user_classes_count_for_log(self.reported_user_classes_count)
)
self.targ... | Review this code and list any quality issues. | [
{
"issue": "We might want to change this to gevent.sleep(0.01) or something, to prevent busy waiting. What do you think @mboutet ?",
"severity": "minor",
"line": 26
}
] | 1 |
python | r'self\.parent\.location=(["\'])(?P<url>.+?)\1',
provider_redirect_page,
'SAML Redirect URL', group='url')
saml_login_page = self._download_webpage(
saml_redirect_url, video_id,
'Downl... | Review this code and list any quality issues. | [
{
"issue": "r u sure there is no better way to do this?",
"severity": "minor",
"line": 26
}
] | 1 |
python | >>> y = [[1, 2, 3], [4, 5, 6]]
>>> da.asarray(y)
dask.array<array, shape=(2, 3), dtype=int64, chunksize=(2, 3), chunktype=numpy.ndarray>
.. warning::
`order` is ignored if `a` is an `Array`, has the attribute ``to_dask_array``,
or is a list or tuple of `Array`'s.
"""
if like is None... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n # Pass the dtype parameter to np.asarray, not to map_blocks\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'high',
'low',
'close',
'volume',
'date',
'dividend',
'split',
],
na_values=['NA'],
)
df['sid'] = sids[symbol]
return df
al... | Review this code and list any quality issues. | [] | 0 |
python | 'duration': 163072.0,
},
}, {
'url': 'https://www.wimbledon.com/en_GB/video/media/6308703111112.html',
'info_dict': {
'id': '6308703111112',
'ext': 'mp4',
'thumbnail': 'https://cf-images.eu-west-1.prod.boltdns.net/v1/jit/3506358525001/3144a401-e6b3-4d49-9d... | Review this code and list any quality issues. | [
{
"issue": "inline `account` too\r\n```suggestion\r\n metadata = self._download_json(\r\n f'https://www.wimbledon.com/relatedcontent/rest/v2/wim_v1/en/content/wim_v1_{video_id}_en', video_id)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'info_dict': {
'title': 'Season 2022',
'id': 'Mjc0OTIw',
},
'playlist_count': 256,
'params': {
'skip_download': True,
}
}]
def _entries(self, show, season, load_more_url):
skip_ids = []
has_more = True
base_url = f'htt... | Review this code and list any quality issues. | [
{
"issue": "- we can delegate the `urljoin`-ing to the `playlist_from_matches` getter\r\n- displaying episode count during API calls may be misleading since we don't know which order the episodes are in; counting pages with itertools seems more straightforward\r\n```suggestion\r\n def _entries(self, load_mor... | 1 |
python | quantum_dataset_id = extract_dataset_id_from_cognify(quantum_cognify_result)
# We can see here that user_1 can read his own dataset (AI dataset)
search_results = await cognee.search(
query_type=SearchType.GRAPH_COMPLETION,
query_text="What is in the document?",
user=user_1,
data... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n # user_1 currently also can't add a document to user_2's dataset (QUANTUM dataset)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | pass
@pytest.fixture
def cert_prefix():
cur_dir = os.path.dirname(os.path.abspath(__file__))
return f'{cur_dir}/../../../unit/serve/runtimes/gateway/grpc/cert/'
@pytest.fixture
def cert_pem(cert_prefix):
"""This is the cert entry of a self-signed local cert"""
return cert_prefix + '/server.crt'
@p... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n ['jinaai+sandbox://jina-ai/DummyHubExecutor'],\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | # batch_offsets_* = cu_seqlens * scale * 3
# if q, k is directly unbinded from qkv
cu_seqlens_qk = cu_seqlens * 3
cu_seqlens_v = cu_seqlens * 3
cu_seqlens_o = cu_seqlens
cu_seqlens_qk = self.add_padding_to_fi_seqlens(
cu_seqlens_qk, batch_size, cu_seqlens_qk[... | Review this code and list any quality issues. | [
{
"issue": "I prefer to move these methods inside `MMEncoderAttention` as classmethod somehow, then we can reuse it for other similar models:\n```python3\n@classmethod\ndef maybe_recompute_cu_seqlens(...)\n\n@classmethod\ndef maybe_recompute_max_seqlen(...)\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | else:
newe = e.subs(z, z + z0)
try:
coeff, ex = newe.leadterm(z, cdir=cdir)
except ValueError:
pass
else:
if ex > 0:
return S.Zero
elif ex == 0:
return coeff
... | Review this code and list any quality issues. | [
{
"issue": "SymPy generally follows [PEP 8](https://peps.python.org/pep-0008/) which says to put a space before and after an equals sign in an assignment but no spaces around a keyword argument.",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'author_id': author_id,
'author_thumbnail': author_thumbnail,
'author_is_uploader': author_is_uploader,
'parent': parent or 'root'
}
@dataclasses.dataclass
class _CommentTracker:
running_total: int = 0
est_total: int = 0
current_page_thread: i... | Review this code and list any quality issues. | [
{
"issue": "this was being repeated a lot. is there any better way?",
"severity": "minor",
"line": 26
}
] | 1 |
python | import json
import os
import subprocess
import sys
import time
from datetime import datetime
from pathlib import Path
from typing import Any, NamedTuple, Optional
import pytest
import yaml
from oumi.core.configs import TrainingConfig
from oumi.core.configs.params.training_params import TrainerType
from oumi.utils.io_... | Review this code and list any quality issues. | [
{
"issue": "You could use `shutil.rmtree` from stdlib",
"severity": "minor",
"line": 22
}
] | 1 |
python | self.project.app = save_app(self.project.args)
main_prompt = ask_for_main_app_definition(self.project)
high_level_messages = get_additional_info_from_openai(
self.project,
generate_messages_from_description(main_prompt, self.project.args['app_type'], self.project.args['name']))... | Review this code and list any quality issues. | [] | 0 |
python | if s['status'] == 'finished':
if self.params.get('noprogress'):
self.to_screen('[download] Download completed')
speed = try_call(lambda: s['total_bytes'] / s['elapsed'])
s.update({
'speed': speed,
'_speed_str': self.format_speed(speed).... | Review this code and list any quality issues. | [
{
"issue": "opted for this to simplify handling, and dedupe calculations. Will have to be implemented for postprocessor progress to be properly used",
"severity": "major",
"line": 26
}
] | 1 |
python | a = "this is some code"
b = 5 #fmt:skip
c = 9 #fmt: skip
d = "thisisasuperlongstringthisisasuperlongstringthisisasuperlongstringthisisasuperlongstring" #fmt:skip
# output
a = "this is some code"
b = 5 # fmt:skip
c = 9 # fmt: skip
d = "thisisasuperlongstringthisisasuperlongstringthisisasuperlongstring... | Review this code and list any quality issues. | [] | 0 |
python | 'duration': 3255,
'season': 'Season 1',
'title': 'Isabel - Episódio 1',
'thumbnail': 'https://www.iol.pt/multimedia/oratvi/multimedia/imagem/id/62beac200cf2f9a86eab856b/',
'season_number': 1,
}
}, {
'url': 'https://tviplayer.iol.pt/video/62c4131c0cf2f9... | Review this code and list any quality issues. | [
{
"issue": "Shouldn't this be in _real_initialize?",
"severity": "minor",
"line": 26
}
] | 1 |
python | }]
for data in datas:
temp = self._download_webpage(data['url'], msg_id)
for var in data['vars']:
val = self._search_regex(var['regex'], temp, msg_id)
if not val:
raise ExtractorError('%s not found' % var['variable'])
s... | Review this code and list any quality issues. | [
{
"issue": "we are using `'` everywhere else",
"severity": "minor",
"line": 26
}
] | 1 |
python | cam_idx = len(self._cameras)
camera = Camera(
self,
cam_idx,
model,
res,
pos,
lookat,
up,
fov,
aperture,
focus_dist,
GUI,
spp,
denoise,
env_idx=... | Review this code and list any quality issues. | [
{
"issue": "Are you sure that this is a good idea? Does it pop a warning for every single simulation now or only if the user is calling `add_light` ? In the latter case, what about raising an exception instead?",
"severity": "minor",
"line": 26
}
] | 1 |
python | *self._additional_context_managers,
self.rendering_type_predictor,
static_crawler.statistics,
playwright_crawler.statistics,
playwright_crawler._browser_pool, # noqa: SLF001 # Intentional access to private member.
]
# Sub crawler pipeline related
... | Review this code and list any quality issues. | [] | 0 |
python | setup_test_environment(debug=debug_mode)
db_aliases = used_aliases if used_aliases is not None else connections
for alias in db_aliases:
connection = connections[alias]
if is_spawn_or_forkserver:
# Restore initial settings in spawned processes.
connection.settings_dict.u... | Review this code and list any quality issues. | [
{
"issue": "Is the goal of this new method to avoid indenting the original `_init_worker` one level in to add the try-except there?\n\nAlso, question: what happens if we create a `multiprocessing.Pool` of `N` threads: `t1`, `t2`, ..., `tN`, and (for example) `t2` executes super fast and crashes inside `_init_wo... | 1 |
python | return formats
def _extract_performers(self, prog):
return traverse_obj(prog, (
'pfm/text()', ..., {lambda x: re.split(r'[//、 ,,]', x)}, ..., {str.strip})) or None
class RadikoIE(RadikoBaseIE):
_VALID_URL = r'https?://(?:www\.)?radiko\.jp/#!/ts/(?P<station>[A-Z0-9-]+)/(?P<timestring>\d+)'... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n station, timestring = self._match_valid_url(url).group('station', 'timestring')\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | )
return ParamDetails(type_annotation=type_annotation, depends=depends, field=field)
def add_param_to_fields(*, field: ModelField, dependant: Dependant) -> None:
field_info = field.field_info
field_info_in = getattr(field_info, "in_", None)
if field_info_in == params.ParamTypes.path:
dependan... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n if inspect.isclass(call):\r\n return False\r\n if isinstance(call, partial):\r\n return is_coroutine_callable(call.func)\r\n```\r\nWhy do we need to remove this condition (`isclass`)?\r\nI just tried running tests with these lines and it still works.\r\nI think ... | 1 |
python | from ..utils import ExtractorError, float_or_none, int_or_none, url_or_none, urlencode_postdata
from ..utils.traversal import traverse_obj
class IlPostExtractorIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?ilpost\.it/episodes/(?P<id>[^/?]+).*'
_TESTS = [{
'url': 'https://www.ilpost.it/episodes/... | Review this code and list any quality issues. | [
{
"issue": "`display_id` is the convention, shorter, and more distinct from `podcast_id`\r\n```suggestion\r\n display_id = self._match_id(url)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | base_edge_config.update(edge_config)
edge_config = base_edge_config
self._edge_config[(u, v)] = edge_config
edge_mobject = edge_type(
self[u].get_center(), self[v].get_center(), z_index=-1, **edge_config
)
self.edges[(u, v)] = edge_mobject
self.add(edge_mobj... | Review this code and list any quality issues. | [
{
"issue": "Same as above, I think it best rewording to not include \"A comma separated list\" to avoid confusion",
"severity": "minor",
"line": 26
}
] | 1 |
python | UsageCountColumn,
)
from wagtail.admin.utils import get_valid_next_url_from_request, set_query_params
from wagtail.admin.views import generic
from wagtail.images import get_image_model
from wagtail.images.exceptions import InvalidFilterSpecError
from wagtail.images.forms import URLGeneratorForm, get_image_form
from wag... | Review this code and list any quality issues. | [
{
"issue": "The range widget will add a dash `-` between the two inputs. Since we stack the inputs vertically, it looks a bit awkward. Maybe it's better to create a subclass of `SuffixedMultiWidget` and add placeholders to the inputs that indicate they are min/max inputs, similar to how we do it for date ranges... | 1 |
python | return trades_by_sid_to_dfs(
{
0: factory.create_trade_history(
0,
np.arange(10.0, 10.0 + len(days), 1.0),
[10000] * len(days),
timedelta(days=1),
cls.sim_params,
cls.tradi... | Review this code and list any quality issues. | [] | 0 |
python | "hint": "Ensure the request matches the API schema.",
}
content_json = json.dumps(response_content)
return fastapi.responses.Response(
content=content_json,
status_code=422,
media_type="application/json",
)
app.add_exception_handler(RequestValidationError, validation_error_ha... | Review this code and list any quality issues. | [] | 0 |
python | _VALID_URL = r'https?://weyyak\.com/(?P<lang>\w+)/player/(?P<type>episode|movie)/(?P<id>\d+)(?:/.+)?'
_TESTS = [
{
'url': 'https://weyyak.com/en/player/episode/1341952/Ribat-Al-Hob-Episode49',
'md5': '0caf55c1a615531c8fe60f146ae46849',
'info_dict': {
'id':... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n path = 'episode/' if _type == 'episode' else 'contents/moviedetails?contentkey='\r\n video_info = self._download_json(\r\n f'https://msapifo-prod-me.weyyak.z5.com/v1/{_lang}/{path}{_id}', _id,\r\n headers={'Content-Type': 'application/json'})\r\n... | 1 |
python | """先想,然后再做"""
await self._think()
logger.debug(f"{self._setting}: {self._rc.state=}, will do {self._rc.todo}")
return await self._act()
def recv(self, message: Message) -> None:
"""add message to history."""
# self._history += f"\n{message}"
# self._context = self._h... | Review this code and list any quality issues. | [
{
"issue": "do not need add `self.recv(message)`, because 224 line add it",
"severity": "minor",
"line": 26
}
] | 1 |
python | episode_id: Id of the video episode, as a unicode string.
The following fields should only be used when the media is a track or a part of
a music album:
track: Title of the track.
track_number: Number of the track within an album or a disc, as an integer.
track_id: Id of the t... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n composer: Deprecated; use \"composer_list\" instead.\r\n Composer(s) of the piece, comma-separated.\r\n artist: Deprecated; use \"artist_list\" instead.\r\n Artist(s) of the track, comma-separated.\r\n genre: Dep... | 1 |
python | """Implementing the Waterfurnace sensor."""
_attr_should_poll = False
_attr_has_entity_name = True
def __init__(
self, client: WaterFurnaceData, description: SensorEntityDescription
) -> None:
"""Initialize the sensor."""
self.client = client
self.entity_description = d... | Review this code and list any quality issues. | [
{
"issue": "Can this be set during initialisation?\nAlso, I suggest to set the name directly in the constructor\n```python\n self._attr_device_info = DeviceInfo(\n identifiers={(DOMAIN, self.client.unit)},\n manufacturer=\"WaterFurnace\",\n name = \"WaterFurnace System\",... | 1 |
python | if bool(args.priv_key) ^ bool(args.certificate):
fatal("Certificate and private key must be set together or both omitted.")
cbor_data = {1: args.lock}
if args.priv_key:
cbor_data[1] = args.lock
priv_key = get_private_key(args.priv_key.read())
if not isinstance(priv_key, ec.EllipticCurvePrivateKey)... | Review this code and list any quality issues. | [] | 0 |
python | # SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import subprocess
import sys
import regex as re
# --------------------------------------------------------------------------- #
# Regex: match `torch.cuda.xxx` but allow `torch.accelerator.xxx`
# ---------------... | Review this code and list any quality issues. | [
{
"issue": "The hook doesn't need to work out which files it should run on, pre-commit already does that for us. Please look at `tools/pre_commit/check_pickle_imports.py` to see how this should be done",
"severity": "minor",
"line": 1
}
] | 1 |
python | if not ctoken:
return
return cls._build_notification_continuation_query(ctoken)
@staticmethod
def _build_notification_continuation_query(ctoken):
query = {
'ctoken': ctoken
}
return query
def _notification_menu_entries(self, headers, max_requests):
... | Review this code and list any quality issues. | [
{
"issue": "generators are always iterable\r\n```suggestion\r\n for notification in self._extract_notification_menu(response, continuation_list):\r\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | async def test_none_map_select(
hass: HomeAssistant,
mock_roborock_entry: MockConfigEntry,
fake_vacuum: FakeDevice,
) -> None:
"""Test that the select entity correctly handles not having a current map."""
# Set map status to None so that current map is never set
fake_vacuum.v1_properties.home.cu... | Review this code and list any quality issues. | [] | 0 |
python | tx.vout = [output_p2sh_burn] * num_scripts
self.check_mempool_result(
result_expected=[{'txid': tx.rehash(), 'allowed': False, 'reject-reason': 'tx-size'}],
rawtxs=[tx.serialize().hex()],
)
tx = tx_from_hex(raw_tx_reference)
tx.vout[0] = output_p2sh_burn
t... | Review this code and list any quality issues. | [
{
"issue": "062fbe7f894136ee1f9d52c62d42bdf7b2cc1c0a: could comment here that both `MAX_SCRIPT_ELEMENT_SIZE` (520) and `MAX_SCRIPT_SIZE` (10,000) are only evaluated when spending an output, not when creating one. This is why 10K bytes fit here despite the 4 byte overhead from `OP_RETURN`, `OP_PUSHDATA2` and two... | 1 |
python | description, parameters = self.get_fn_description(block_fn, tool_name)
schema, filedata_positions = self.get_input_schema(tool_name, parameters)
if len(filedata_positions) > 0 and not file_data_present:
file_data_present = True
type_hints = utils.get_type_hints(block... | Review this code and list any quality issues. | [
{
"issue": "Should we just include this in the \"meta\" dict, less likely to break any downstream usage (I'm thinking of HF MCP in particular)",
"severity": "minor",
"line": 26
}
] | 1 |
python | from .common import InfoExtractor
from ..utils import (
ExtractorError,
get_element_by_id,
)
class MaveIE(InfoExtractor):
_VALID_URL = r'https?://(?P<channel_id>[a-z]+)\.mave\.digital/ep-(?P<short_id>[0-9]+)'
_TESTS = [
{
'url': 'https://ochenlichnoe.mave.digital/ep-25',
... | Review this code and list any quality issues. | [
{
"issue": "to go with the formatting suggestion above:\r\n```suggestion\r\n }, {\r\n```\r\nand so forth",
"severity": "minor",
"line": 26
}
] | 1 |
python | SAKTVIE,
VTXTVIE,
WalyTVIE,
ZattooIE,
ZattooLiveIE,
ZattooMoviesIE,
ZattooRecordingsIE,
)
from .zdf import ZDFIE, ZDFChannelIE
from .zee5 import (
Zee5IE,
Zee5SeriesIE,
)
from .zhihu import ZhihuIE
from .zingmp3 import (
ZingMp3IE,
ZingMp3AlbumIE,
ZingMp3ChartHomeIE,
Zing... | Review this code and list any quality issues. | [
{
"issue": "the imports are sorted alphabetically",
"severity": "minor",
"line": 26
}
] | 1 |
python | ) -> None:
# honor and set attributes if user has specified
if isinstance(attrs, dict):
_inject_attrs_to_op_ctx(attrs)
# experiment related attributes, pass from environment
env_tracing_ctx = os.environ.get(PF_TRACE_CONTEXT, None)
logger.debug("Read tracing context from environment: %s", en... | Review this code and list any quality issues. | [
{
"issue": "we don't have a pf service restart now..",
"severity": "minor",
"line": 26
}
] | 1 |
python | different criteria such as helpfulness, honesty, and safety.
"""
from oumi.judges.base_judge import (
BaseJudge,
BaseJudgeOutput,
)
from oumi.judges.judge_court import (
oumi_v1_xml_claude_sonnet_judge,
oumi_v1_xml_deepseek_r1_judge_hosted_by_deepseek,
oumi_v1_xml_deepseek_r1_judge_hosted_by_SambaN... | Review this code and list any quality issues. | [
{
"issue": "nit: for naming functions, let's use lowercase!",
"severity": "minor",
"line": 26
}
] | 1 |
python | history_messages = workflow_session.get_workflow_history_context(num_runs=num_history_runs)
if history_messages:
final_message = f"{history_messages}{message}"
response_stream = self.active_executor.run( # type: ignore[call-overload, ... | Review this code and list any quality issues. | [
{
"issue": "No, we yield it right below this",
"severity": "minor",
"line": 26
}
] | 1 |
python | # This file doesn't used any Python 3.9+ only grammars.
with \
make_context_manager1() as cm1, \
make_context_manager2() as cm2, \
make_context_manager3() as cm3, \
make_context_manager4() as cm4 \
:
pass
# output
# This file doesn't used any Python 3.9+ only grammars.
with make_context_ma... | Review this code and list any quality issues. | [
{
"issue": "Can you test that something like `with (a): pass` doesn't get autodetected as 3.9+?",
"severity": "minor",
"line": 1
}
] | 1 |
python | include_subdirectories: Whether to include files in subdirectories recursively.
Returns:
A list of resolved files and binary streams.
"""
# Ensure `data` is a list
if not isinstance(data, list):
data = [data]
resolved_data = []
s3_config = get_s3_config()
fs = None
if ... | Review this code and list any quality issues. | [] | 0 |
python | 'id': vod_id,
})
else:
if fetch_episode:
# From https://www3.nhk.or.jp/nhkworld/common/player/radio/inline/rod.html
audio_path = remove_end(episode['audio']['audio'], '.m4a')
info['formats'] = self._extract_m3u8_formats(
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n _VALID_URL = [\r\n rf'{NhkBaseIE._BASE_URL_REGEX}shows/(?:(?P<type>video)/)?(?P<id>\\d{{4}}[\\da-z]\\d+)/?(?:$|[?#])',\r\n rf'{NhkBaseIE._BASE_URL_REGEX}(?:ondemand|shows)/(?P<type>audio)/(?P<id>[^/?#]+?-\\d{{8}}-[\\da-z]+)',\r\n rf'{NhkBaseIE._BASE_URL_REGE... | 1 |
python | def merge_dicts_recursively(*dicts):
"""
Creates a dict whose keyset is the union of all the
input dictionaries. The value for each key is based
on the first dict in the list with that key.
dicts later in the list have higher priority
When values are dictionaries, it is applied recursively
... | Review this code and list any quality issues. | [
{
"issue": "The current code can error on `dicts[0]` if no dicts are passed; better to be explicit in the signature about how many arguments are needed imo. Also the for loop can just be replaced with a call to `dict.update` afaict\r\n```suggestion\r\ndef update_dict_recursively(current_dict, *others):\r\n u... | 1 |
python | if TYPE_CHECKING:
from types import TracebackType
from typing_extensions import Unpack
logger = getLogger(__name__)
@docs_group('Classes')
class LocalEventManager(EventManager):
"""Local event manager for emitting system info events."""
def __init__(
self,
system_info_interval: time... | Review this code and list any quality issues. | [
{
"issue": "Weird thing to say here - the constructor does not receive the `Configuration` object even if `from_config` is used.",
"severity": "minor",
"line": 26
}
] | 1 |
python | # ========================== Sensor Lifecycle ==========================
def build(self):
"""Initialize the rasterizer and register this camera."""
super().build()
scene = self._manager._sim.scene
if self._shared_metadata.sensors is None:
self._shared_metadata.sensors ... | Review this code and list any quality issues. | [
{
"issue": "We should support multiple OpenGL context in parallel. Here you are hiding a bug while complexifying the implementation.",
"severity": "critical",
"line": 26
}
] | 1 |
python | with open(path.join(source, "bat_options"), "r") as f:
return list(map(lambda x: x.rstrip(), f.readlines()))
def create_highlighted_versions(output_basepath):
root = os.path.dirname(os.path.abspath(__file__))
for source in glob.glob(path.join(root, "source", "*", "*")):
try:
env =... | Review this code and list any quality issues. | [
{
"issue": "For simple lists, you can also use `options = BAT_OPTIONS.copy()` without using a separate module.",
"severity": "minor",
"line": 26
}
] | 1 |
python | Grammar
reference := name [ ":" tag ] [ "@" digest ]
name := [domain '/'] path-component ['/' path-component]*
domain := domain-component ['.' domain-component]* [':' port-number]
domain-component := /([a-zA-Z0-9]|... | Review this code and list any quality issues. | [
{
"issue": "one big ugly regex, but I put some comments above on how I obtained this.",
"severity": "minor",
"line": 26
}
] | 1 |
python | # Here again.
elif type is None:
try:
if issubclass(dtype, np.ndarray):
output = np.ndarray.view(self, dtype)
else:
output = np.ndarray.view(self, dtype)
# OK, there's the change
except TypeError:
... | Review this code and list any quality issues. | [] | 0 |
python | )
_register_template(
name="zephyr",
format_user=StringFormatter(slots=["<|user|>\n{{content}}", {"eos_token"}, "<|assistant|>"]),
format_assistant=StringFormatter(slots=["\n{{content}}", {"eos_token"}]),
format_system=StringFormatter(slots=["<|system|>\n{{content}}", {"eos_token"}]),
default_syst... | Review this code and list any quality issues. | [
{
"issue": "add an empty line at the end of file",
"severity": "minor",
"line": 26
}
] | 1 |
python | yield '//dailymotion.com/playlist/%s' % p
class DailymotionSearchIE(DailymotionPlaylistBaseIE):
IE_NAME = 'dailymotion:search'
_VALID_URL = r'(?:https?://)?(?:www\.)?dailymotion\.[a-z]{2,3}/search/(?P<id>[^/]+)/videos'
_PAGE_SIZE = 20
_TESTS = [{
'url': 'http://www.dailymotion.com/search/king ... | Review this code and list any quality issues. | [
{
"issue": "Should be non-fatal:\r\n```suggestion\r\n response = self._call_search_api(term, page, f'Searching \"{term}\" page {page}')\r\n for edge in traverse_obj(response, ('videos', 'edges', lambda _, x: x['node']['xid'])) or []:\r\n xid = edge['node']['xid']\r\n yield se... | 1 |
python | class BaseGenerator(ABC):
@property
@abstractmethod
def tpl_file(self):
pass
@property
@abstractmethod
def entry_template_keys(self):
pass
def generate(self) -> str:
"""Generate content based on given template and actual value of template keys."""
with open(... | Review this code and list any quality issues. | [
{
"issue": "[nitpick] Consider refactoring the duplicated logic for determining the jinja2 environment and loading the template into a common helper function to reduce repetition.",
"severity": "major",
"line": 26
}
] | 1 |
python | model_request_parameters: ModelRequestParameters,
) -> AsyncStream[responses.ResponseStreamEvent]: ...
async def _responses_create(
self,
messages: list[ModelRequest | ModelResponse],
stream: bool,
model_settings: OpenAIResponsesModelSettings,
model_request_parameters: M... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n previous_response_id, messages = self._get_previous_response_id_and_new_messages(messages)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'id': 't-n-t-29-de-outubro',
'ext': 'mp3',
'title': 'T.N.T 29 de outubro',
'release_date': '20231029',
'thumbnail': r're:https://radiocomercial.pt/upload/[^.]+.jpg',
'season': 2023
}
}]
def _real_extract(self, url):
video_id, season = ... | Review this code and list any quality issues. | [
{
"issue": "same as above\r\n```suggestion\r\n _VALID_URL = r'https?://(?:www\\.)?radiocomercial\\.pt/podcasts/(?P<id>[\\w-]+)(?:/t?(?P<season>\\d+))?/?(?:$|[?#])'\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | result = SimplePipelineEngine(
loader,
dates,
finder,
).run_pipeline(p, dates[0], dates[-1])
assert_frame_equal(
result.sort_index(axis=1),
_utc_localize_index_level_0(expected.sort_index(axis=1)),
check_dtype=False,
)
... | Review this code and list any quality issues. | [
{
"issue": "Regarding comment below on ordering; maybe just scrap `add` and do `for column_name in expected.columns` instead?",
"severity": "minor",
"line": 26
}
] | 1 |
python | """
timestamp: datetime = field(default_factory=_now_utc)
"""The timestamp, when the retry was triggered."""
part_kind: Literal['retry-prompt'] = 'retry-prompt'
"""Part type identifier, this is available on all parts as a discriminator."""
def model_response(self) -> str:
"""Return a stri... | Review this code and list any quality issues. | [
{
"issue": "I like using `format_as_xml` as Samuel suggested",
"severity": "minor",
"line": 26
}
] | 1 |
python | params: typing.Optional[QueryParamTypes] = None,
headers: typing.Optional[HeaderTypes] = None,
cookies: typing.Optional[CookieTypes] = None,
auth: typing.Union[AuthTypes, UseClientDefault, None] = USE_CLIENT_DEFAULT,
follow_redirects: typing.Union[bool, UseClientDefault] = USE_CLIENT_DEF... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n if cookies is not None: # pragma: no cover\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | assert NumberPlane().dimension == 2
assert PolarPlane().dimension == 2
assert ComplexPlane().dimension == 2
assert ThreeDAxes().dimension == 3
def test_abstract_base_class():
"""Check that CoordinateSystem has some abstract methods."""
with pytest.raises(Exception):
CS().get_axes()
def t... | Review this code and list any quality issues. | [] | 0 |
python | logger.info("Input processor warmup completed in %.2fs", warmup_elapsed)
except Exception:
# Don't fail initialization if warmup fails - log warning and continue
logger.exception(
"Input processor warmup failed (non-fatal): %s. "
"First request may experie... | Review this code and list any quality issues. | [
{
"issue": "don't have a strong opinion on fallback to en, but I've seen cases where failing was the preferred policy as it would \"signal\" to provide language tag manually.\nWe can also address this in a separate PR.",
"severity": "critical",
"line": 26
}
] | 1 |
python | }
class PuhuTVSerieIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?puhutv\.com/(?P<id>[^/?#&]+)-detay'
IE_NAME = 'puhutv:serie'
_TESTS = [{
'url': 'https://puhutv.com/deniz-yildizi-detay',
'info_dict': {
'title': 'Deniz Yıldızı',
'id': 'deniz-yildizi',
... | Review this code and list any quality issues. | [
{
"issue": "if we're reverting the `_download_json` note, then we can inline this below again\r\n```suggestion\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | from aibrix.downloader.base import get_downloader
from aibrix.downloader.tos import TOSDownloaderV1
TOS_MODULE = "aibrix.downloader.tos.tos"
ENVS_MODULE = "aibrix.downloader.tos.envs"
ENVS_DOWNLOADER_TOS_VERSION = "aibrix.downloader.base.envs.DOWNLOADER_TOS_VERSION"
DOWNLOADER_TOS_VERSION = "v1"
def mock_not_exsit_t... | Review this code and list any quality issues. | [] | 0 |
python | g2 = (t1 + t2 + t3*t4) / denom - 3
return mu, mu2, g1, g2
johnsonsu = johnsonsu_gen(name='johnsonsu')
class landau_gen(rv_continuous):
r"""A Landau continuous random variable.
%(before_notes)s
Notes
-----
The probability density function for `landau` ([1]_, [2]_) is:
.. math::
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n location parameter :math:`\\mu` and scale parameter :math:`c`, the latter of\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | s2= s.copy()
s2.invert()
s2.shift(DOWN)
self.play(Write(s), Write(s2))
"""
if recursive:
for submob in self.submobjects:
submob.invert(recursive=True)
list.reverse(self.submobjects)
# Just here to keep f... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n s2.shift(DOWN)\r\n self.add(s,s2)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | model,
schema_editor.quote_name(self.name),
)
def check_supported(self, schema_editor):
if self.include and self.index_type.lower() == "hash":
raise NotSupportedError(
"Covering exclusion constraints using an Hash index "
"are not supported."
... | Review this code and list any quality issues. | [
{
"issue": "Why not do all of this validation up in `__init__` ? It seems weird to validate the type there, but then delay this extra validation until SQL creation.",
"severity": "minor",
"line": 26
}
] | 1 |
python | "wagtailadmin_pages:preview_on_edit", args=(self.event_page.id,)
)
response = self.client.post(
preview_url,
{
"carousel_items-TOTAL_FORMS": 0,
"carousel_items-INITIAL_FORMS": 0,
"speakers-TOTAL_FORMS": 0,
"speakers... | Review this code and list any quality issues. | [] | 0 |
python | "id": 1,
"struct": [
{"x": "text", "y": [0.0, nan]},
{"x": "text", "y": [0.0, nan]},
],
},
{
"id": 2,
"struct": [
{"x": "text", "y": [1]},
{"x": "text",... | Review this code and list any quality issues. | [] | 0 |
python | @isolate_apps("backends")
class SchemaTests(TransactionTestCase):
available_apps = ["backends"]
def test_autoincrement(self):
"""
auto_increment fields are created with the AUTOINCREMENT keyword
in order to be monotonically increasing (#10164).
"""
with connection.schema... | Review this code and list any quality issues. | [] | 0 |
python | text: str,
in_count: bool,
) -> None:
"""This method is drawing the text on the frame.
Args:
frame (np.ndarray): The image on which the text will be drawn.
line_counter (LineCounter): The line counter
that will be used to draw the line.
te... | Review this code and list any quality issues. | [
{
"issue": "Please remove the comments. I think we do not need it. :)",
"severity": "minor",
"line": 26
}
] | 1 |
python | generator: Callable,
features: Optional[Features] = None,
cache_dir: str = None,
keep_in_memory: bool = False,
streaming: bool = False,
gen_kwargs: Optional[dict] = None,
num_proc: Optional[int] = None,
split: NamedSplit = Split.TRAIN,
fingerprint: Optiona... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n config_id=\"default-fingerprint=\" + fingerprint if fingerprint else None,\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | """Check if the text contains an exact mention (not part of a larger word).
Args:
text: The text to check for mentions
mention: The mention to look for (e.g. "@openhands")
Returns:
bool: True if the exact mention is found, False otherwise
Example:
>>> has_exact_mention("He... | Review this code and list any quality issues. | [
{
"issue": "🟢 Nit: This wrapper function is mostly redundant since `has_exact_mention` already handles falsy text values. Consider either:\n\n1. Removing it and calling `has_exact_mention` directly, or\n2. Adding more GitHub-specific logic (like checking for bot mentions to exclude)\n\nCurrent implementation i... | 1 |
python | from model_training.custom_datasets.rank_datasets import AnthropicRLHF, HFDataset
def load_anthroopic_rlhf():
train = AnthropicRLHF(split="train")
validation = AnthropicRLHF(split="test")
print(f"AnthropicRLHF extra dataset size: {len(train)}, {len(validation)}")
return train, validation
def load_... | Review this code and list any quality issues. | [
{
"issue": "typo:\r\n```suggestion\r\ndef load_anthropic_rlhf():\r\n```",
"severity": "minor",
"line": 4
}
] | 1 |
python | async def move(
self,
*,
beginning: Optional[bool] = None,
end: Optional[bool] = None,
above: Optional[Role] = None,
below: Optional[Role] = None,
offset: int = 0,
reason: Optional[str] = None,
):
"""|coro|
A rich interface to help mov... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n end: :class:`bool`\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES... | Review this code and list any quality issues. | [
{
"issue": "not need to export them here since you import BitNetDeserialize directly from `integrations.bitnet`",
"severity": "minor",
"line": 26
}
] | 1 |
python | # Get all credentials fields from input schema
credentials_fields = block.input_schema.get_credentials_fields()
if not credentials_fields:
logger.debug(
f"Block {block_cls.__name__} has no credentials fields - Treating as valid"
)
return True
# Check required credentials... | Review this code and list any quality issues. | [
{
"issue": "In what case can `provider_name` be `None` or `\"\"` here?",
"severity": "minor",
"line": 26
}
] | 1 |
python | >>> binary_search_std_lib([0, 5, 7, 10, 15], 15)
4
>>> binary_search_std_lib([0, 5, 7, 10, 15], 5)
1
>>> binary_search_std_lib([0, 5, 7, 10, 15], 6)
-1
"""
if list(sorted_collection) != sorted(sorted_collection):
raise ValueError("sorted_collection must be sorted in ascending order")... | Review this code and list any quality issues. | [
{
"issue": "The docstring states \"it returns an empty list\" but uses lowercase for \"it\". For consistency with the existing codebase style (see lines 253-254 which use \"this function returns\"), consider rephrasing to maintain a consistent voice throughout the docstring.\n```suggestion\n this function re... | 1 |
python | )
obj.refresh_from_db()
self.assertEqual(obj.value, {"key": "replaced"})
def test_key_transform_exact_filter(self):
obj = NullableJSONModel.objects.create(value={"key": None})
self.assertSequenceEqual(
NullableJSONModel.objects.filter(value__key=JSONNull()),
... | Review this code and list any quality issues. | [
{
"issue": "Do we want to show here that `=None` behaves the same?",
"severity": "minor",
"line": 26
}
] | 1 |
python | # and then specify shape .reshape([x, y, z])
flat_array = array.flatten()
for e in flat_array:
if isinstance(e, str):
tensor.string_data.append(e.encode("utf-8"))
elif isinstance(e, bytes):
tensor.string_data.append(e)
else:
... | Review this code and list any quality issues. | [
{
"issue": "I wonder if generalizing the logic into\r\n\r\ntobytes_little_endian(array) -> bytes\r\n\r\nwould make this more consistent? We can expose this in numpy helper",
"severity": "major",
"line": 26
}
] | 1 |
python | 'info_dict': {
'id': 'BV1GJ411x7h7',
'title': '【官方 MV】Never Gonna Give You Up - Rick Astley',
'ext': 'mp4',
},
'skip': 'geo-restricted',
}, {
'note': 'has - in the last path segment of the url',
'url': 'https://www.bilibili.com/festival/bh3-7th?bvi... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n if self._search_json(r'\\bwindow\\._riskdata_\\s*=', webpage, 'risk', video_id, default={}).get('v_voucher'):\r\n raise ExtractorError('You have exceeded the rate limit. Try again later', expected=True)\r\n```",
"severity": "major",
"line": 26
}
... | 1 |
python | 'creator': 'Virginie Vota',
'release_year': 2018,
'upload_date': '20230318',
'uploader': 'admin@altcensored.com',
'description': 'md5:0b38a8fc04103579d5c1db10a247dc30',
'timestamp': 1679161343,
'track': 'k0srjLSkga8',
'duration': 926.09... | Review this code and list any quality issues. | [
{
"issue": "We can directly return res instead of creating a single use variable. We should also use the proper variable names for the info dict.\r\n```suggestion\r\n return self.url_result(f'https://archive.org/details/youtube-{video_id}', ArchiveOrgIE, url_transparent=True,\r\n ... | 1 |
python | ###################
# Scheduler side APIs
####################
@_lmcache_nvtx_annotate
def get_num_new_matched_tokens(
self,
request: "Request",
num_computed_tokens: int,
) -> int:
"""
Check for external KV cache hit.
Args:
request (Reque... | Review this code and list any quality issues. | [
{
"issue": "Directly change `token_ids` instead of deepcopying `request`",
"severity": "minor",
"line": 26
}
] | 1 |
python | deps = replace(deps, state=state)
elif raw_state:
raise UserError(
f'AG-UI state is provided but `deps` of type `{type(deps).__name__}` does not implement the `StateHandler` protocol: it needs to be a dataclass with a non-optional `state` field.'
)
else:
... | Review this code and list any quality issues. | [
{
"issue": "@DouweM not sure this is what you meant...\r\n\r\n```py\r\nif _utils.is_async_callable(on_complete):\r\n await on_complete(run)\r\n ``` \r\n \r\n >\"None\" is not awaitable\r\n \"None\" is incompatible with protocol \"Awaitable[_T_co@Awaitable]\"\r\n \"__await__\" is not present\r\n \r\n ... | 1 |
python | 'ext': 'mp4',
'upload_date': '20250809',
'thumbnail': 'https://cdn.cms.mtv.hu/wp-content/uploads/sites/4/2025/08/Idojaras-jelentes-35-1.jpg',
},
}, {
# hirado - subcategory
'url': 'https://hirado.hu/belfold/video/2025/08/09/nyitott-porta-napok-2025/',
'info_di... | Review this code and list any quality issues. | [
{
"issue": "can we do this instead:\r\n```py\r\n webpage = self._download_webpage(url, display_id)\r\n\r\n player_data = self._search_json(\r\n r'loadPlayer\\((?:\\s*[\"\\'][^\"\\']+[\"\\']\\s*,)?', webpage, 'player data', mobj)\r\n video_id = str(player_data['contentId'])\r\n```... | 1 |
python | u_range: Sequence[float] = (0, TAU),
v_range: Sequence[float] = (0, PI),
**kwargs: Any,
) -> None:
if config.renderer == RendererType.OPENGL:
res_value = (101, 51)
elif config.renderer == RendererType.CAIRO:
res_value = (24, 12)
else:
raise... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n def func(self, u: float, v: float) -> Point3D:\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | if leaf.type == token.DOUBLESTAR:
break
else:
raise CannotTransform("No doublestar token was found in the line.")
def is_simple_lookup(index: int, kind: Literal[1, -1]) -> bool:
# Brackets and parentheses indicate calls, subscripts, etc. ...
# basically stuff that doesn't co... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n # kind is always one as bases with a preceding unary op will be checked\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | """
out = self._raw_table_dtypes[table_name]
if convert_dates:
out = out.copy()
for date_column in self._datetime_int_cols[table_name]:
out[date_column] = datetime64ns_dtype
return out
class SQLiteAdjustmentWriter(object):
"""
Writer for data to ... | Review this code and list any quality issues. | [
{
"issue": "linter expects an extra blank line below.",
"severity": "minor",
"line": 26
}
] | 1 |
python | df_factory.start_all(instances)
nodes = [(await create_node_info(instance)) for instance in instances]
nodes[0].slots = [(0, 16383)]
nodes[1].slots = []
await push_config(json.dumps(generate_config(nodes)), [node.admin_client for node in nodes])
keys = 800000
await nodes[0].client.execute_com... | Review this code and list any quality issues. | [
{
"issue": "Please add some traffic and consistency checks",
"severity": "minor",
"line": 26
}
] | 1 |
python | if "choices" not in kwargs:
raise ParameterException("A choices iterable must be specified")
self._choices = set(kwargs.pop("choices"))
self._var_type = var_type
assert all(type(choice) is self._var_type for choice in self._choices), "Invalid type in choices"
super(ChoicePara... | Review this code and list any quality issues. | [
{
"issue": "This is fine with me with one exception. If this class is intended to be a multi-select of `ChoiceParameter`, it's counter to object-oriented for it to not inherit from `ChoiceParameter` (or a common Choice-based parent) such for them to maintain alignment of their choice parsing and validation.\r\n... | 1 |
python | """Recursively replace any callables c in expr (including inside lists) with c(ctx)."""
while callable(expr):
expr = expr(ctx)
if isinstance(expr, list):
expr = [deep_eval(ctx, x) for x in expr]
return expr
# Data type to represent fully-evaluated expressions in a context dict (so we can av... | Review this code and list any quality issues. | [
{
"issue": "nit: no need to special-case when `kwargs` is empty since `ctx == {**ctx, **{}}`.\r\n```suggestion\r\n return lambda ctx: get({**ctx, **kwargs}, name)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'duration': 2640.0,
'tags': ['True Crime', 'Murder'],
},
'params': {'skip_download': 'm3u8'},
}, {
'url': 'https://www.magellantv.com/watch/celebration-nation?type=s',
'info_dict': {
'id': 'celebration-nation',
'ext': 'mp4',
'tags': ['A... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n for m3u8_url in set(traverse_obj(data, ((('manifests', ..., 'hls'), 'jwp_video_url'), {url_or_none}))):\r\n fmts, subs = self._extract_m3u8_formats_and_subtitles(\r\n m3u8_url, video_id, 'mp4', m3u8_id='hls', fatal=False)\r\n```",
"severity": "m... | 1 |
python | a sample must implement the sibling extractor, StaticFeatureExtractor.
Features are grouped mainly into threads that alongside their meta-features are also grouped into
processes (that also have their own features). Other scopes (such as function and file) may also apply
for a specific sandbox.
This c... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n extractor = CapeFeatureExtractor.from_report(json.loads(buf))\r\n for feature, addr in extractor.get_global_features():\r\n print(addr, feature)\r\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | async def litellm_completion(args, image_url=None):
# Your existing code for litellm_completion goes here
try:
if image_url:
messages = [
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": ... | Review this code and list any quality issues. | [
{
"issue": "just to confirm: is it documented anywhere that when this function returns it means first token is ready?",
"severity": "minor",
"line": 26
}
] | 1 |
python | async def async_migrate_entry(hass: HomeAssistant, entry: PortainerConfigEntry) -> bool:
"""Migrate old entry."""
if entry.version < 2:
data = dict(entry.data)
data[CONF_URL] = data.pop(CONF_HOST)
data[CONF_API_TOKEN] = data.pop(CONF_API_KEY)
hass.config_entries.async_update_ent... | Review this code and list any quality issues. | [
{
"issue": "the identifiers is not 100% sure to have the first one as the one for the integration",
"severity": "minor",
"line": 26
}
] | 1 |
python | await check("py1.5")
await check("2")
await check("2.7")
await check("py2.7")
await check("2.8")
await check("py2.8")
await check("3.0")
await check("pypy3.0")
await check("jython3.4")
@unittest_run_loop
async def test_blackd_pyi(self) -> None:
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n source, _ = read_data(\"miscellaneous\", \"blackd_diff\")\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | return val
except ValueError:
return val
# remove git version suffixes if present
lhs = lhs.split("+", 1)[0]
rhs = rhs.split("+", 1)[0]
# parse the version strings in this basic way without `packaging` package
lhs_ = map(_try_cast, lhs.split("."))
rhs_ = map(_try_cast, rhs.... | Review this code and list any quality issues. | [
{
"issue": "Please change the code like this, and remove the import above and try to use `pkging.version` below.\r\n```suggestion\r\n pkging, has_ver = optional_import(\"packaging\")\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | x, y = batch
x = x.view(x.size(0), -1)
if dp:
with torch.no_grad():
output = trained_model(batch, 0)
acc = output['val_acc']
acc = torch.mean(acc).item()
else:
with torch.no_grad():
y_hat = trained_model(x)
y_hat = y_hat.cpu()
# ... | Review this code and list any quality issues. | [
{
"issue": "I am still not very convinced about this wrapping, I see the beauty but it is not trivial for new users...",
"severity": "minor",
"line": 26
}
] | 1 |
python | def _log_dataset(self, sample_dict: dict[str, Any], context: str = "nontrain") -> None:
if not self.cur_run:
raise ValueError("Current Run is not Active to log the dataset")
# Need to update the self.cur_run to sync the dataset log, otherwise the `inputs` info will be out-of-date.
s... | Review this code and list any quality issues. | [
{
"issue": "I am concerned about whether we need to support this new feature for now. Seems this feature is still experimental and may change or be removed in a future release without warning, then we will be easily influenced by their release. Or maybe we should fix the version of mlflow to 2.4.0?\r\nhttps://m... | 1 |
python | # 3. State Space Model sequence transformation
# 3.a. Selection: [batch, seq_len, self.time_step_rank + self.ssm_state_size * 2]
ssm_parameters = self.x_proj(hidden_states.transpose(1, 2))
time_step, B, C = torch.split(
ssm_parameters, [self.time_step_rank, self.ssm_state_size, self... | Review this code and list any quality issues. | [
{
"issue": "We have an `is_tracing` helper - let's use that one as it's broader",
"severity": "major",
"line": 26
}
] | 1 |
python | self.thickness: float = thickness
self.color: Color = color
self.text_thickness: float = text_thickness
self.text_color: Color = text_color
self.text_scale: float = text_scale
self.text_offset: float = text_offset
self.text_padding: int = text_padding
self.custom_... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n is_in_count (bool): Whether to display the in count or out count.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.