id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
327,400
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/extensions/slack/types.py
types.RichTextElement
from pydantic import BaseModel, Field class RichTextElement(BaseModel): type: str user_id: str | None = None text: str | None = None style: dict | None = None url: str | None = None channel_id: str | None = None
class RichTextElement(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
7
0
7
6
6
0
7
6
6
0
5
0
0
327,401
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/extensions/slack/types.py
types.RichTextSection
from pydantic import BaseModel, Field from typing import Literal class RichTextSection(BaseModel): type: Literal['rich_text_section', 'rich_text_list', 'rich_text_quote', 'rich_text_preformatted', 'text', 'channel', 'user', 'emoji', 'link'] elements: list[RichTextElement] style: dict | str | None = None
class RichTextSection(BaseModel): pass
1
0
0
0
0
0
0
0.25
1
0
0
0
0
0
0
82
4
0
4
2
3
1
4
2
3
0
5
0
0
327,402
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/extensions/slack/types.py
types.SlackEvent
from pydantic import BaseModel, Field class SlackEvent(BaseModel): user: str type: str ts: str client_msg_id: str | None = None text: str team: str | None = None blocks: list[Block] | None = None channel: str event_ts: str thread_ts: str | None = None
class SlackEvent(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
11
0
11
5
10
0
11
5
10
0
5
0
0
327,403
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/extensions/slack/types.py
types.SlackMessage
from pydantic import BaseModel, Field class SlackMessage(BaseModel): """Model for a message in a Slack conversation.""" user: str type: str ts: str client_msg_id: str | None = None text: str team: str | None = None blocks: list[Block] | None = None language: dict | None = None r...
class SlackMessage(BaseModel): '''Model for a message in a Slack conversation.''' pass
1
1
0
0
0
0
0
0.06
1
0
0
0
0
0
0
82
20
1
18
14
17
1
18
14
17
0
5
0
0
327,404
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/extensions/slack/types.py
types.SlackMessageReaction
from pydantic import BaseModel, Field class SlackMessageReaction(BaseModel): """Model for a reaction on a Slack message.""" name: str users: list[str] count: int
class SlackMessageReaction(BaseModel): '''Model for a reaction on a Slack message.''' pass
1
1
0
0
0
0
0
0.25
1
0
0
0
0
0
0
82
6
1
4
1
3
1
4
1
3
0
5
0
0
327,405
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/extensions/slack/types.py
types.SlackWebhookPayload
from pydantic import BaseModel, Field class SlackWebhookPayload(BaseModel): token: str | None = Field(None) team_id: str | None = Field(None) api_app_id: str | None = Field(None) event: SlackEvent | None = Field(None) type: str | None = Field(None) event_id: str | None = Field(None) event_t...
class SlackWebhookPayload(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
10
0
10
10
9
0
10
10
9
0
5
0
0
327,406
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/assignment.py
typescript.assignment.TSAssignment
from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from graph_sitter.core.assignment import Assignment from graph_sitter.core.expressions.multi_expression import MultiExpression from graph_sitter.core.autocommit import writer from graph_sitter.typescript.symbol import TSSymbol @ts_apidoc class TSAssig...
@ts_apidoc class TSAssignment(Assignment['TSAssignmentStatement | ExportStatement'], TSSymbol): '''A class representing TypeScript assignments, including variable declarations and property assignments. Handles various types of TypeScript assignments including variable declarators, assignment expressions, au...
9
3
16
3
6
7
2
1.08
2
6
2
0
1
0
3
51
64
14
24
16
16
26
20
13
16
2
4
1
5
327,407
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/class_definition.py
typescript.class_definition.TSClass
from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from graph_sitter.typescript.expressions.type import TSType from graph_sitter.core.class_definition import Class from graph_sitter.core.symbol_group import SymbolGroup from graph_sitter.core.expressions.generic_type import GenericType from graph_sitter...
@ts_apidoc class TSClass(Class[TSFunction, TSDecorator, 'TSCodeBlock', TSParameter, TSType], TSHasBlock, TSSymbol): '''A class representing a TypeScript/JavaScript class with enhanced functionality for class manipulation. The TSClass provides comprehensive functionality for working with TypeScript/JavaScript cl...
21
8
17
2
9
7
4
0.88
3
11
7
0
8
6
9
54
195
28
89
39
69
78
70
27
60
10
4
4
33
327,408
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/config_parser.py
typescript.config_parser.TSConfigParser
from pathlib import Path from graph_sitter.enums import NodeType from graph_sitter.typescript.ts_config import TSConfig from graph_sitter.codebase.config_parser import ConfigParser from functools import cache import os from graph_sitter.core.file import File class TSConfigParser(ConfigParser): config_files: dict[P...
class TSConfigParser(ConfigParser): def __init__(self, codebase_context: 'CodebaseContext', default_config_name: str='tsconfig.json'): pass def get_config(self, config_path: os.PathLike) -> TSConfig | None: pass def parse_configs(self): pass @cache def get_config_...
6
0
13
1
10
3
3
0.3
1
6
1
0
3
1
3
25
47
5
33
12
27
10
32
10
27
4
5
2
11
327,409
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/enum_definition.py
typescript.enum_definition.TSEnum
from graph_sitter.typescript.symbol import TSSymbol from typing import TYPE_CHECKING, Self, TypeVar, override from graph_sitter.typescript.interfaces.has_block import TSHasBlock from graph_sitter.core.dataclasses.usage import UsageKind from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from graph_sitte...
@ts_apidoc class TSEnum(TSHasBlock, TSSymbol, HasAttribute[TSAttribute]): '''Representation of an Enum in TypeScript. Attributes: symbol_type: The type of symbol, set to SymbolType.Enum. body: The expression representing the body of the enum. code_block: The code block associated with th...
21
3
6
1
4
2
1
0.41
3
5
2
0
6
0
7
23
71
13
41
22
15
17
23
10
15
2
3
1
8
327,410
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/enums.py
typescript.enums.TSFunctionTypeNames
from enum import StrEnum class TSFunctionTypeNames(StrEnum): FunctionExpression = 'function_expression' ArrowFunction = 'arrow_function' GeneratorFunctionDeclaration = 'generator_function_declaration' GeneratorFunction = 'generator_function' FunctionDeclaration = 'function_declaration' MethodDe...
class TSFunctionTypeNames(StrEnum): pass
1
0
0
0
0
0
0
2.38
1
0
0
0
0
0
0
68
33
6
8
8
7
19
8
8
7
0
3
0
0
327,411
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/export.py
typescript.export.TSExport
from graph_sitter.core.expressions.name import Name from graph_sitter.compiled.utils import cached_property from graph_sitter.typescript.interface import TSInterface from graph_sitter.typescript.namespace import TSNamespace from graph_sitter.typescript.function import TSFunction from graph_sitter.core.import_resolution...
@ts_apidoc class TSExport(Export['Collection[TSExport, ExportStatement[TSExport]]'], HasValue, Chainable): '''Represents a single exported symbol. There is a 1:M relationship between an ExportStatement and an Export Attributes: node_type: The type of the node, set to NodeType.EXPORT. ''' de...
71
20
20
3
10
7
4
0.6
3
29
18
0
26
5
28
37
634
101
335
135
247
201
246
84
217
14
2
8
121
327,412
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/export.py
typescript.export.WildcardExport
from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from typing import TYPE_CHECKING, Generic, Literal, Self, TypeVar, override from graph_sitter.core.interfaces.chainable import Chainable from graph_sitter.core.dataclasses.usage import UsageKind, UsageType from graph_sitter.core.autocommit import commi...
class WildcardExport(Chainable, Generic[TExport]): '''Class to represent one of many wildcard exports.''' def __init__(self, exp: TExport, symbol: Exportable): pass @reader @noapidoc @override def _resolved_types(self) -> Generator[ResolutionStack[Self], None, None]: '''Resolve...
9
2
3
0
2
0
1
0.13
2
2
1
0
3
0
3
10
21
4
15
6
6
2
10
4
6
1
2
0
3
327,413
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/file.py
typescript.file.TSFile
from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from graph_sitter.compiled.sort import sort_editables from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.core.interfaces.exportable import Exportable from graph_sitter.typescript.import_resolution import TS...
@ts_apidoc class TSFile(SourceFile[TSImport, TSFunction, TSClass, TSAssignment, TSInterface, TSCodeBlock], TSHasBlock, Exportable): '''Extends the SourceFile class to provide TypeScript-specific functionality. Attributes: programming_language: The programming language of the file. Set to ProgrammingLang...
56
23
15
3
5
7
2
1.04
3
14
8
0
22
0
23
43
415
90
159
78
104
166
120
56
96
12
3
4
54
327,414
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/function.py
typescript.function.TSFunction
from graph_sitter.typescript.interfaces.has_block import TSHasBlock from graph_sitter.typescript.enums import TSFunctionTypeNames from graph_sitter.typescript.placeholder.placeholder_return_type import TSReturnTypePlaceholder from graph_sitter.core.autocommit import commiter, reader, writer from graph_sitter.core.datac...
@ts_apidoc class TSFunction(Function[TSDecorator, 'TSCodeBlock', TSParameter, TSType], TSHasBlock, TSSymbol): '''Representation of a Function in JavaScript/TypeScript''' @noapidoc @commiter def parse(self, ctx: CodebaseContext) -> None: pass @property @reader def function_type(self) ...
57
18
18
2
8
7
4
0.68
3
15
5
0
17
3
20
66
414
69
205
79
149
140
158
50
137
11
3
3
71
327,415
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/import_resolution.py
typescript.import_resolution.TSImport
from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from graph_sitter.core.autocommit import reader from graph_sitter.core.expressions import Name from typing import TYPE_CHECKING, Self, override import os from graph_sitter.core.interfaces.exportable import Exportable from graph_sitter.enums import Impo...
@ts_apidoc class TSImport(Import['TSFile'], Exportable): '''Extends Import for TypeScript codebases.''' @reader def is_type_import(self) -> bool: '''Checks if an import is a type import. Determines whether an import statement is specifically for types. This includes explicit type imports ...
46
16
34
4
19
11
6
0.55
2
15
7
0
14
1
17
24
617
82
350
106
304
191
246
82
227
19
2
6
106
327,416
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/interface.py
typescript.interface.TSInterface
from graph_sitter.core.dataclasses.usage import UsageKind from graph_sitter.core.symbol_groups.parents import Parents from graph_sitter.typescript.function import TSFunction from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from graph_sitter.typescript.symbol import TSSymbol from graph_sitter.typescri...
@ts_apidoc class TSInterface(Interface[TSCodeBlock, TSAttribute, TSFunction, TSType], TSSymbol, TSHasBlock): '''Representation of an Interface in TypeScript Attributes: parent_interfaces: All the interfaces that this interface extends. code_block: The code block that contains the interface's bod...
15
2
10
1
6
2
2
0.44
3
5
3
0
4
2
5
27
69
13
39
22
18
17
25
11
18
2
3
1
9
327,417
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/namespace.py
typescript.namespace.TSNamespace
from graph_sitter.core.autocommit.decorators import writer from graph_sitter.compiled.resolution import ResolutionStack from graph_sitter.typescript.type_alias import TSTypeAlias from typing import TYPE_CHECKING, Self, override from graph_sitter.compiled.sort import sort_editables from graph_sitter.typescript.symbol im...
@ts_apidoc class TSNamespace(TSSymbol, TSHasBlock, Chainable, HasName, HasAttribute): '''Representation of a namespace module in TypeScript. Attributes: symbol_type: The type of the symbol, set to SymbolType.Namespace. code_block: The code block associated with this namespace. ''' def _...
46
24
13
2
6
5
3
0.76
5
16
6
0
24
0
24
45
371
66
173
83
122
132
140
63
115
11
3
5
67
327,418
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/statements/assignment_statement.py
typescript.statements.assignment_statement.TSAssignmentStatement
from graph_sitter.typescript.assignment import TSAssignment from graph_sitter.core.statements.assignment_statement import AssignmentStatement from graph_sitter.compiled.autocommit import reader from typing import TYPE_CHECKING, Self from collections import deque from graph_sitter.shared.decorators.docs import noapidoc,...
@ts_apidoc class TSAssignmentStatement(AssignmentStatement['TSCodeBlock', TSAssignment]): '''A class that represents a TypeScript assignment statement in a codebase, such as `const x = 1` or `const { a: b } = myFunc()`.''' @classmethod @reader @noapidoc def from_assignment(cls, ts_node: TSNode, file...
11
2
15
2
11
3
4
0.27
1
7
3
1
5
0
6
15
104
16
70
27
60
19
60
26
53
9
2
6
22
327,419
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/statements/attribute.py
typescript.statements.attribute.TSAttribute
from graph_sitter.typescript.statements.assignment_statement import TSAssignmentStatement from graph_sitter.typescript.detached_symbols.code_block import TSCodeBlock from graph_sitter.core.statements.attribute import Attribute from graph_sitter.shared.decorators.docs import ts_apidoc from graph_sitter._proxy import pro...
@ts_apidoc class TSAttribute(Attribute[TSCodeBlock, TSAssignment], TSAssignmentStatement): '''Typescript implementation of Attribute detached symbol.''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: CodebaseContext, parent: TSCodeBlock, pos: int) -> None: pass @reader def _get_...
12
5
10
2
4
5
2
0.89
2
7
2
0
5
1
5
32
64
13
27
17
16
24
22
12
16
4
3
3
9
327,420
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/statements/block_statement.py
typescript.statements.block_statement.TSBlockStatement
from graph_sitter.core.statements.block_statement import BlockStatement from graph_sitter.typescript.interfaces.has_block import TSHasBlock from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.shared.decorators.docs import apidoc @apidoc class TSBlockStatement(BlockStatement[Parent], TSHasBlock, Generi...
@apidoc class TSBlockStatement(BlockStatement[Parent], TSHasBlock, Generic[Parent]): '''Statement which contains a block.''' pass
2
1
0
0
0
0
0
1
3
0
0
4
0
0
0
48
2
0
1
1
0
1
1
1
0
0
5
0
0
327,421
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/statements/catch_statement.py
typescript.statements.catch_statement.TSCatchStatement
from graph_sitter.core.statements.catch_statement import CatchStatement from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.typescript.statements.block_statement import TSBlockStatement from graph_sitter.shared.decorators.docs import apidoc, noapidoc @apidoc class TSCatchStatement(CatchStatement[Paren...
@apidoc class TSCatchStatement(CatchStatement[Parent], TSBlockStatement, Generic[Parent]): '''Typescript catch clause. Attributes: code_block: The code block that may trigger an exception condition: The condition which triggers this clause ''' def __init__(self, ts_node: TSNode, file_no...
6
1
3
0
3
0
1
0.63
3
4
1
0
2
1
2
55
16
3
8
5
3
5
6
4
3
1
6
0
2
327,422
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/statements/comment.py
typescript.statements.comment.TSComment
from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from graph_sitter.core.statements.comment import Comment, lowest_indentation from graph_sitter.core.autocommit import commiter, reader @ts_apidoc class TSComment(Comment): """Abstract representation of typescript comments""" @property @re...
@ts_apidoc class TSComment(Comment): '''Abstract representation of typescript comments''' @property @reader def comment_type(self) -> TSCommentType: '''Determines the type of comment in a TypeScript source code. Parses the comment markers to determine if it's a single-line comment (//) o...
15
6
23
2
14
8
6
0.49
1
3
1
0
3
0
5
15
132
14
79
16
65
39
57
11
51
14
2
3
29
327,423
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/statements/comment.py
typescript.statements.comment.TSCommentType
from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from enum import StrEnum @ts_apidoc class TSCommentType(StrEnum): """An enumeration representing different types of comments in TypeScript. Represents the possible types of comments that can be used in TypeScript code, including double sl...
@ts_apidoc class TSCommentType(StrEnum): '''An enumeration representing different types of comments in TypeScript. Represents the possible types of comments that can be used in TypeScript code, including double slash comments (//), slash star comments (/* */), and unknown comment types. Attributes: ...
2
1
0
0
0
0
0
2.25
1
0
0
0
0
0
0
68
16
3
4
4
3
9
4
4
3
0
3
0
0
327,424
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/statements/for_loop_statement.py
typescript.statements.for_loop_statement.TSForLoopStatement
from graph_sitter.compiled.autocommit import commiter, reader from graph_sitter.core.statements.for_loop_statement import ForLoopStatement from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from graph_sitter.typescript.statements.block_statement import TSBlockStatement @ts_apidoc class TSForLoopStatem...
@ts_apidoc class TSForLoopStatement(ForLoopStatement['TSCodeBlock'], TSBlockStatement['TSCodeBlock']): '''Abstract representation of the for loop in TypeScript. Attributes: item: An item in the iterable object. Only applicable for `for...of` loops. iterable: The iterable that is being iterated o...
15
3
13
1
9
3
3
0.38
2
11
6
0
5
0
5
54
97
13
61
18
47
23
48
14
42
3
6
2
13
327,425
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/statements/if_block_statement.py
typescript.statements.if_block_statement.TSIfBlockStatement
from graph_sitter.core.statements.if_block_statement import IfBlockStatement from graph_sitter.core.autocommit import reader, writer from graph_sitter.core.statements.statement import StatementType from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.shared.decorators.docs import apidoc @apidoc class T...
@apidoc class TSIfBlockStatement(IfBlockStatement[Parent, 'TSIfBlockStatement'], Generic[Parent]): '''Typescript implementation of the if/elif/else statement block. For example, if there is a code block like: if (condition1) { block1 } else if (condition2) { block2 } else { b...
18
5
12
2
7
4
2
0.61
2
6
2
0
7
8
7
26
114
19
59
37
32
36
39
19
30
4
2
2
14
327,426
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/statements/import_statement.py
typescript.statements.import_statement.TSImportStatement
from graph_sitter.typescript.import_resolution import TSImport from graph_sitter.core.expressions.builtin import Builtin from graph_sitter.shared.decorators.docs import ts_apidoc from graph_sitter.core.symbol_groups.collection import Collection from graph_sitter.core.statements.import_statement import ImportStatement ...
@ts_apidoc class TSImportStatement(ImportStatement['TSFile', TSImport, 'TSCodeBlock'], Builtin): '''A class representing an import statement in TypeScript, managing both static and dynamic imports. This class handles various types of TypeScript imports including regular import statements, dynamic imports, a...
3
1
14
0
14
0
5
0.53
2
4
2
0
1
1
1
14
26
3
15
7
13
8
13
7
11
5
3
1
5
327,427
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/statements/labeled_statement.py
typescript.statements.labeled_statement.TSLabeledStatement
from graph_sitter.shared.decorators.docs import ts_apidoc from graph_sitter.core.interfaces.has_name import HasName from graph_sitter.core.statements.statement import Statement, StatementType from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.core.expressions import Expression, Name @ts_apidoc class ...
@ts_apidoc class TSLabeledStatement(Statement[Parent], HasName, Generic[Parent]): '''Statement with a named label. It resolves to various types of statements like loops, switch cases, etc. Examples: ``` outerLoop: for (let i = 0; i < 5; i++) { innerLoop: for (let j = 0; j < 5; j++) { if (i...
5
2
8
1
4
3
2
2.18
3
4
1
0
2
1
2
18
42
7
11
7
7
24
10
6
7
2
2
0
3
327,428
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/statements/switch_statement.py
typescript.statements.switch_statement.TSSwitchStatement
from graph_sitter.typescript.statements.switch_case import TSSwitchCase from graph_sitter.core.statements.switch_statement import SwitchStatement from graph_sitter.shared.decorators.docs import ts_apidoc @ts_apidoc class TSSwitchStatement(SwitchStatement['TSCodeBlock[Self]', 'TSCodeBlock', TSSwitchCase]): """Types...
@ts_apidoc class TSSwitchStatement(SwitchStatement['TSCodeBlock[Self]', 'TSCodeBlock', TSSwitchCase]): '''Typescript switch statement''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: CodebaseContext, parent: TSCodeBlock, pos: int | None=None) -> None: pass
3
1
7
0
7
0
2
0.13
1
5
3
0
1
2
1
15
10
1
8
6
6
1
8
6
6
2
3
1
2
327,429
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/statements/try_catch_statement.py
typescript.statements.try_catch_statement.TSTryCatchStatement
from typing import TYPE_CHECKING, Self, override from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from graph_sitter.core.statements.try_catch_statement import TryCatchStatement from graph_sitter.typescript.statements.catch_statement import TSCatchStatement from graph_sitter.compiled.autocommit import...
@ts_apidoc class TSTryCatchStatement(TryCatchStatement['TSCodeBlock'], TSBlockStatement): '''Abstract representation of the try/catch/finally block in TypeScript. Attributes: catch: The catch block. ''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: CodebaseContext, parent: TSCo...
19
3
9
1
6
2
3
0.29
2
11
7
0
6
1
6
61
78
12
51
19
33
15
39
12
32
3
6
1
17
327,430
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/statements/while_statement.py
typescript.statements.while_statement.TSWhileStatement
from graph_sitter.core.statements.while_statement import WhileStatement from graph_sitter.shared.decorators.docs import ts_apidoc from graph_sitter.typescript.interfaces.has_block import TSHasBlock @ts_apidoc class TSWhileStatement(WhileStatement['TSCodeBlock'], TSHasBlock): """A TypeScript while statement class t...
@ts_apidoc class TSWhileStatement(WhileStatement['TSCodeBlock'], TSHasBlock): '''A TypeScript while statement class that represents while loops and manages their condition and code block. This class provides functionality for handling while statements in TypeScript code, including managing the loop's condit...
3
1
4
0
4
0
2
1.4
2
4
2
0
1
1
1
49
15
3
5
4
3
7
5
4
3
2
5
0
2
327,431
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/symbol.py
typescript.symbol.TSSymbol
from graph_sitter.core.expressions import Value from typing import TYPE_CHECKING, Literal, Self, Unpack from graph_sitter.core.type_alias import TypeAlias from graph_sitter.core.symbol import Symbol from graph_sitter.core.detached_symbols.function_call import FunctionCall from graph_sitter.shared.decorators.docs import...
@ts_apidoc class TSSymbol(Symbol['TSHasBlock', 'TSCodeBlock'], Exportable): '''A TypeScript symbol representing a code element with advanced manipulation capabilities. This class extends Symbol and Exportable to provide TypeScript-specific functionality for managing code symbols. It offers methods for handl...
35
15
27
4
14
10
6
0.69
2
22
11
1
16
3
16
23
479
75
239
74
199
165
197
51
180
32
2
5
94
327,432
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/ts_config.py
typescript.ts_config.TSConfig
from functools import cache import os from graph_sitter.core.file import File import pyjson5 from pathlib import Path from graph_sitter.core.directory import Directory from graph_sitter.shared.decorators.docs import ts_apidoc @ts_apidoc class TSConfig: """TypeScript configuration file specified in tsconfig.json, u...
@ts_apidoc class TSConfig: '''TypeScript configuration file specified in tsconfig.json, used for import resolution and computing dependencies. Attributes: config_file: The configuration file object representing the tsconfig.json file. config_parser: The parser used to interpret the TypeScript co...
32
18
21
3
10
8
4
0.68
0
9
1
0
18
0
19
19
465
86
227
93
196
154
202
73
182
22
0
4
77
327,433
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/type_alias.py
typescript.type_alias.TSTypeAlias
from graph_sitter.core.dataclasses.usage import UsageKind from graph_sitter.enums import SymbolType from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from graph_sitter.typescript.statements.attribute import TSAttribute from graph_sitter.typescript.symbol import TSSymbol from graph_sitter.typescript.in...
@ts_apidoc class TSTypeAlias(TypeAlias[TSCodeBlock, TSAttribute], TSSymbol, TSHasBlock): '''Representation of an Interface in TypeScript. Attributes: symbol_type: The type of symbol, set to SymbolType.Type. ''' @noapidoc @commiter def _compute_dependencies(self, usage_type: UsageKind | N...
12
4
11
1
3
6
1
1.38
3
5
2
0
4
0
4
28
60
10
21
11
10
29
15
7
10
2
3
1
5
327,434
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/expressions/undefined_type.py
undefined_type.TSUndefinedType
from graph_sitter.codebase.resolution_stack import ResolutionStack from graph_sitter.compiled.autocommit import reader from graph_sitter.core.expressions.type import Type from graph_sitter.core.interfaces.importable import Importable from graph_sitter.core.dataclasses.usage import UsageKind from collections.abc import ...
@ts_apidoc class TSUndefinedType(Type[Parent], Generic[Parent]): '''Undefined type. Represents the undefined keyword Examples: undefined ''' @noapidoc def _compute_dependencies(self, usage_type: UsageKind, dest: Importable): pass @reader @noapidoc @override de...
8
1
2
0
2
0
1
0.44
2
3
2
0
2
0
2
33
15
2
9
5
2
4
5
3
2
1
5
0
2
327,435
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/python/expressions/union_type.py
union_type.PyUnionType
from typing import Generic, TypeVar from graph_sitter.core.expressions.union_type import UnionType from graph_sitter.shared.decorators.docs import py_apidoc @py_apidoc class PyUnionType(UnionType['PyType', Parent], Generic[Parent]): """Union type Examples: str | int """ pass
@py_apidoc class PyUnionType(UnionType['PyType', Parent], Generic[Parent]): '''Union type Examples: str | int ''' pass
2
1
0
0
0
0
0
2
2
0
0
0
0
0
0
109
8
2
2
1
1
4
2
1
1
0
9
0
0
327,436
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/expressions/union_type.py
union_type.TSUnionType
from graph_sitter.shared.decorators.docs import ts_apidoc from typing import Generic, TypeVar from graph_sitter.core.expressions.union_type import UnionType @ts_apidoc class TSUnionType(UnionType['TSType', Parent], Generic[Parent]): """Union type Examples: string | number """ pass
@ts_apidoc class TSUnionType(UnionType['TSType', Parent], Generic[Parent]): '''Union type Examples: string | number ''' pass
2
1
0
0
0
0
0
2
2
0
0
0
0
0
0
109
8
2
2
1
1
4
2
1
1
0
9
0
0
327,437
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/use_named_kwargs/use_named_kwargs.py
use_named_kwargs.UseNamedKwargs
from graph_sitter.python.class_definition import PyClass from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.core.codebase import Codebase from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.core.external_module import ExternalModule from tests.sha...
@skill(canonical=True, prompt='Generate a Python codemod that converts all function calls in a codebase to use named keyword arguments if they have two or more positional arguments.\nThe codemod should iterate through all files and functions, checking each function call to determine if it meets the criteria for convers...
5
1
29
5
16
8
9
0.58
2
3
3
0
1
0
1
32
38
8
19
8
16
11
18
7
16
9
5
4
9
327,438
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/examples/examples/sqlalchemy_type_annotations/input_repo/models/user.py
user.User
from .base import Base from sqlalchemy.orm import relationship from sqlalchemy import Column, Integer, String, ForeignKey, Boolean class User(Base): __tablename__ = 'users' id = Column(Integer, primary_key=True) email = Column(String(255), unique=True) username = Column(String(100)) is_active = Col...
class User(Base): pass
1
0
0
0
0
0
0
0.11
1
0
0
0
0
0
0
0
12
2
9
8
8
1
9
8
8
0
1
0
0
327,439
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/configs/user_config.py
user_config.UserConfig
import json from graph_sitter.configs.models.secrets import SecretsConfig from pydantic import Field from graph_sitter.configs.models.codebase import CodebaseConfig from pathlib import Path from graph_sitter.configs.models.repository import RepositoryConfig class UserConfig: env_filepath: Path repository: Repo...
class UserConfig: def __init__(self, env_filepath: Path) -> None: pass def save(self) -> None: '''Save configuration to the config file.''' pass def to_dict(self) -> dict: '''Return a dictionary representation of the config.''' pass def has_key(self, full_key...
8
6
7
0
5
1
2
0.22
0
7
3
0
7
0
7
7
59
9
41
16
31
9
38
17
29
4
0
1
12
327,440
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/output/utils.py
utils.DeterministicJSONEncoder
from decimal import Decimal import json class DeterministicJSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, float): return f'{obj:.10f}' if isinstance(obj, Decimal): return f'{obj:.10f}' if isinstance(obj, set): return sorted(lis...
class DeterministicJSONEncoder(json.JSONEncoder): def default(self, obj): pass
2
0
10
0
10
0
5
0
1
5
0
0
1
0
1
5
11
0
11
2
9
0
11
2
9
5
2
1
5
327,441
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/utils.py
utils.XMLUtils
from collections.abc import Iterable from xml.dom.minidom import parseString import dicttoxml import xmltodict import re class XMLUtils: @staticmethod def dict_to_xml(data: dict | list, format: bool=False, **kwargs) -> str: result = dicttoxml.dicttoxml(data, return_bytes=False, **kwargs) if no...
class XMLUtils: @staticmethod def dict_to_xml(data: dict | list, format: bool=False, **kwargs) -> str: pass @staticmethod def add_cdata_to_function_body(xml_string): pass @staticmethod def add_cdata_to_tags(xml_string: str, tags: Iterable[str]) -> str: pass @staticm...
17
0
6
0
5
0
2
0
0
6
0
0
0
0
8
8
60
9
51
32
34
0
41
24
32
3
0
1
13
327,442
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/cli/workspace/venv_manager.py
venv_manager.VenvManager
import os import subprocess from pathlib import Path class VenvManager: """Manages the virtual environment for codegen.""" def __init__(self, codegen_dir: Path): self.codegen_dir = codegen_dir self.venv_dir = self.codegen_dir / '.venv' def is_initialized(self) -> bool: """Check if...
class VenvManager: '''Manages the virtual environment for codegen.''' def __init__(self, codegen_dir: Path): pass def is_initialized(self) -> bool: '''Check if virtual environment exists.''' pass def create_venv(self, python_version: str='3.13'): '''Create a virtual e...
9
8
5
0
4
1
1
0.23
0
5
0
0
8
2
8
8
51
8
35
13
26
8
24
13
15
2
0
1
9
327,443
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/visualizations/visualization_manager.py
visualization_manager.VisualizationManager
from networkx import Graph import os from graph_sitter.visualizations.viz_utils import graph_to_json from graph_sitter.git.repo_operator.repo_operator import RepoOperator from graph_sitter.core.interfaces.editable import Editable import plotly.graph_objects as go class VisualizationManager: op: RepoOperator d...
class VisualizationManager: def __init__(self, op: RepoOperator) -> None: pass @property def viz_path(self) -> str: pass @property def viz_file_path(self) -> str: pass def clear_graphviz_data(self) -> None: pass def write_graphviz_data(self, G: Graph | go....
8
1
8
1
5
3
2
0.5
0
4
2
0
5
0
5
5
50
9
28
13
17
14
21
7
15
4
0
1
9
327,444
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/enums/warmup_state.py
warmup_state.WarmupState
from enum import StrEnum class WarmupState(StrEnum): PENDING = 'PENDING' COMPLETED = 'COMPLETED' FAILED = 'FAILED'
class WarmupState(StrEnum): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
68
4
0
4
4
3
0
4
4
3
0
3
0
0
327,445
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/wrap_with_component/wrap_with_component.py
wrap_with_component.WrapWithComponentCodemod
from graph_sitter.writer_decorators import canonical from codemods.codemod import Codemod from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.core.codebase import Codebase from tests.shared.skills.skill import Skil...
@skill(canonical=True, prompt='Generate a codemod in TypeScript that wraps all instances of the JSX element <Button /> with <Alert> in a codebase. The codemod should import the\nAlert component and ensure that the resulting structure is:<br/><Alert><Button /></Alert>. Iterate through all files and functions in the code...
5
1
19
2
9
8
6
1.33
2
1
1
0
1
0
1
32
35
7
12
8
9
16
11
7
9
6
5
5
6
327,446
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/wrap_with_statement/wrap_with_statement.py
wrap_with_statement.WrapWithStatement
from graph_sitter.writer_decorators import canonical from graph_sitter.core.codebase import Codebase from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from codemods.codemod import Codemod from tests.shared.skills.decorators import skill, skill_impl from tests.shared.skills.skill import Skil...
@skill(canonical=True, prompt="Generate a Python codemod that wraps the code blocks of all internally marked functions (those starting with an underscore) in a codebase with a\n'with' statement using 'before_execute() as before'. The codemod should iterate through all Python files in the codebase and apply the wrapping...
5
1
8
0
5
3
4
1.75
2
1
1
0
1
0
1
32
28
6
8
6
5
14
7
5
5
4
5
3
4
327,447
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/tracing.py
_support.tracing.BaseContext
from . import context from ..ops.base import OpDispatcher class BaseContext(OpDispatcher): __tk_context_idname__ = 'ExecutionContext' def __init__(self, *, eager: bool): self.eager = eager @staticmethod def current() -> 'BaseContext': return context.current(BaseContext) def __ent...
class BaseContext(OpDispatcher): def __init__(self, *, eager: bool): pass @staticmethod def current() -> 'BaseContext': pass def __enter__(self) -> 'BaseContext': pass def __exit__(self, exc_type, exc_val, exc_tb): pass
6
0
3
0
3
0
1
0
1
1
0
1
3
1
4
7
17
4
13
8
7
0
12
7
7
1
1
0
4
327,448
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/tracing.py
_support.tracing.CapturedTrace
import torch.fx as fx from typing import Callable, Dict, Optional, Type, TypeVar from .regions import RegionGraph, SubgraphTracer class CapturedTrace: def __init__(self, region_graph: RegionGraph, root_graph: str): self.region_graph = region_graph self.root_graph = root_graph self.region_g...
class CapturedTrace: def __init__(self, region_graph: RegionGraph, root_graph: str): pass def get_subgraph(self, name: str) -> fx.Graph: pass def add_subgraph(self, name: str, graph: fx.Graph): pass def get_root_graph(self) -> fx.Graph: pass def walk(self, filte...
6
0
4
0
4
0
2
0
0
4
1
0
5
2
5
5
25
4
21
12
15
0
21
12
15
4
0
3
10
327,449
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/tracing.py
_support.tracing.CompiledContext
from ..lang.grid import Grid from ..ops.wave_ops import CustomOp from .regions import RegionGraph, SubgraphTracer from typing import Callable, Dict, Optional, Type, TypeVar from .indexing import BoundedRelation, IndexingContext, IndexSymbol, backed_sym_index_type class CompiledContext(BaseContext): def __init__(s...
class CompiledContext(BaseContext): def __init__(self, region_graph: RegionGraph, *, grid_type: Type[Grid]): pass def register_custom_op(self, name: str, op: CustomOp): pass def handler(*args, **kwargs): pass
4
0
5
0
5
0
1
0
1
6
4
0
2
3
2
9
15
2
13
7
9
0
10
7
6
1
2
0
3
327,450
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/tracing.py
_support.tracing.KernelBufferProxy
import torch.fx as fx from .. import ops from ..lang.kernel_buffer import KernelBuffer, KernelBufferMeta from typing import Callable, Dict, Optional, Type, TypeVar class KernelBufferProxy(fx.Proxy): """Custom proxy for KernelBuffer so that we can override special methods.""" def __init__(self, node: fx.Node, ...
class KernelBufferProxy(fx.Proxy): '''Custom proxy for KernelBuffer so that we can override special methods.''' def __init__(self, node: fx.Node, tracer: 'KernelTracer', orig_type: Type[KernelBuffer]): pass def __getitem__(self, key): pass def __setitem__(self, key, item): pa...
4
1
5
0
5
0
1
0.13
1
2
1
0
3
3
3
3
20
3
15
12
6
2
10
7
6
1
1
0
3
327,451
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/tracing.py
_support.tracing.KernelRegionGraph
from typing import Callable, Dict, Optional, Type, TypeVar from .regions import RegionGraph, SubgraphTracer from .location_config import LocationCaptureConfig class KernelRegionGraph(RegionGraph): func: Optional[Callable] = None def __init__(self, location_capture_config: Optional[LocationCaptureConfig]=None,...
class KernelRegionGraph(RegionGraph): def __init__(self, location_capture_config: Optional[LocationCaptureConfig]=None, func: Optional[Callable]=None): pass def new_subtracer(self, region_graph: 'RegionGraph', parent: Optional['SubgraphTracer']=None) -> 'KernelTracer': pass
3
0
7
0
7
0
1
0
1
3
2
0
2
0
2
12
17
2
15
12
4
0
7
4
4
1
1
0
2
327,452
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/tracing.py
_support.tracing.KernelTracer
import inspect from .regions import RegionGraph, SubgraphTracer from typing import Callable, Dict, Optional, Type, TypeVar import torch.fx as fx from ..lang.wave_types import IndexMapping, SymbolBind from ..lang.kernel_buffer import KernelBuffer, KernelBufferMeta from .dtype import DataType from types import FunctionTy...
class KernelTracer(SubgraphTracer): '''Custom Tracer for generating a trace of a kernel computation.''' def __init__(self, region_graph: RegionGraph, parent: Optional['SubgraphTracer']=None, func: Optional[Callable]=None): pass def proxy(self, node: fx.Node) -> fx.Proxy: pass def cre...
4
1
18
0
16
2
5
0.2
1
9
8
0
3
0
3
9
66
6
50
13
40
10
41
8
36
7
2
2
15
327,453
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/tracing.py
_support.tracing.LaunchContext
from abc import ABC, abstractmethod import warnings from .indexing import BoundedRelation, IndexingContext, IndexSymbol, backed_sym_index_type from . import context from typing import Callable, Dict, Optional, Type, TypeVar class LaunchContext(ABC): __wave_context_idname__ = 'ExecutionContext' def __init__(se...
class LaunchContext(ABC): def __init__(self, constant_bindings: Dict[IndexSymbol, int | IndexSymbol]={}, **kwargs): pass @staticmethod def current() -> 'LaunchContext': pass def __enter__(self) -> 'LaunchContext': pass def __exit__(self, exc_type, exc_val, exc_tb): ...
8
0
6
0
5
1
1
0.25
1
4
2
0
4
2
5
25
40
5
28
15
19
7
22
11
16
2
4
1
7
327,454
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/tracing.py
_support.tracing.Launchable
from typing import Callable, Dict, Optional, Type, TypeVar from abc import ABC, abstractmethod class Launchable(ABC): """Base class for objects which behave like a kernel launch when called.""" def __init__(self, eager_function: Callable): self._eager_function = eager_function def __call__(self, ...
class Launchable(ABC): '''Base class for objects which behave like a kernel launch when called.''' def __init__(self, eager_function: Callable): pass def __call__(self, *args, **kwargs): pass
3
1
3
0
3
0
1
0.17
1
1
1
1
2
1
2
22
9
2
6
5
3
1
6
5
3
1
4
0
2
327,455
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/compiler/base.py
base.CodegenError
class CodegenError(Exception): ...
class CodegenError(Exception): pass
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
10
1
0
1
1
1
0
2
1
1
0
3
0
0
327,456
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/compiler/base.py
base.ValidationError
class ValidationError(CodegenError): ...
class ValidationError(CodegenError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
1
0
1
1
1
0
2
1
1
0
4
0
0
327,457
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/perf/benchmark_sdpa.py
benchmark_sdpa.SPDABenchmark
import argparse from wave_lang.kernel.wave.perf.utils import BaseBenchmark, benchmark_kernel class SPDABenchmark(BaseBenchmark): def __init__(self): usage = 'Example:\n WAVE_LOG_LEVEL=INFO \\\n python -u wave_lang/kernel/wave/perf/benchmark_sdpa.py \\\n --config wave_lang/kernel/wave/perf/benchmark_c...
class SPDABenchmark(BaseBenchmark): def __init__(self): pass
2
0
23
0
23
0
1
0
1
2
0
0
1
0
1
4
24
0
24
3
22
0
5
3
3
1
1
0
1
327,458
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/perf/benchmark_speculative_sampling.py
benchmark_speculative_sampling.SpecSamplingBenchmark
import argparse from wave_lang.kernel.wave.perf.utils import BaseBenchmark, benchmark_kernel class SpecSamplingBenchmark(BaseBenchmark): def __init__(self): usage = 'Example:\n WAVE_LOG_LEVEL=INFO \\\n python -u wave_lang/kernel/wave/perf/benchmark_speculative_sampling.py \\\n --config wave_lang/kern...
class SpecSamplingBenchmark(BaseBenchmark): def __init__(self): pass
2
0
21
0
21
0
1
0
1
3
0
0
1
0
1
4
22
0
22
3
20
0
5
3
3
1
1
0
1
327,459
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/compiler/builder.py
builder.IRProxyValue
from typing import Any, Optional from .base import NDEBUG, CodegenError from wave_lang.support.ir_imports import Attribute, Context, DenseElementsAttr, FloatAttr, IndexType, IntegerAttr, IntegerType, IrType, Location, Operation, SymbolTable, Value, VectorType, arith_d, builtin_d, math_d class IRProxyValue: """Wrap...
class IRProxyValue: '''Wrapper around an (ir.Value, py_value) for handling notionally python proxies that are associated with an IR Value. ''' def __init__(self, ir_value: Value, py_value: Any=None): pass def validate(self): pass def __repr__(self): pass
4
1
3
0
3
0
1
0.21
0
2
0
0
3
2
3
3
21
4
14
7
10
3
11
7
7
1
0
0
3
327,460
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/compiler/builder.py
builder.ModuleBuilder
from typing import Any, Optional from wave_lang.support.ir_imports import Attribute, Context, DenseElementsAttr, FloatAttr, IndexType, IntegerAttr, IntegerType, IrType, Location, Operation, SymbolTable, Value, VectorType, arith_d, builtin_d, math_d class ModuleBuilder: def __init__(self, *, context: Optional[Cont...
class ModuleBuilder: def __init__(self, *, context: Optional[Context]=None, module_op: Optional[Operation]=None): pass
2
0
17
0
17
0
3
0
0
0
0
0
1
5
1
1
18
0
18
12
11
0
12
7
10
3
0
2
3
327,461
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/compiler/builder.py
builder._ScalarBuilder
from wave_lang.support.ir_imports import Attribute, Context, DenseElementsAttr, FloatAttr, IndexType, IntegerAttr, IntegerType, IrType, Location, Operation, SymbolTable, Value, VectorType, arith_d, builtin_d, math_d from .base import NDEBUG, CodegenError class _ScalarBuilder: def is_floating_point_type(self, t: I...
class _ScalarBuilder: def is_floating_point_type(self, t: IrType) -> bool: pass def is_integer_type(self, t: IrType) -> bool: pass def is_index_type(self, t: IrType) -> bool: pass def get_typeclass(self, t: IrType, index_same_as_integer=False) -> str: pass def g...
31
0
6
0
6
0
2
0.08
0
8
2
0
30
0
30
30
223
38
171
75
132
14
145
67
114
6
0
2
53
327,462
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/utils/classes.py
classes.KernelLaunchInfo
from dataclasses import dataclass @dataclass class KernelLaunchInfo: grid: tuple[int] = None blocks: tuple[int] = None shared_memory_bytes: int = 0 func_name: str = '' grid_str: str = ''
@dataclass class KernelLaunchInfo: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
6
0
6
6
5
0
6
6
5
0
0
0
0
327,463
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/utils/classes.py
classes.ShuffleMode
from enum import Enum class ShuffleMode(Enum): XOR = 0 DOWN = 1 UP = 2 IDX = 3
class ShuffleMode(Enum): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
49
5
0
5
5
4
0
5
5
4
0
4
0
0
327,464
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/transforms/general/custom_op_expansion.py
custom_op_expansion.AOTKernelSelection
from wave_lang.support.conversions import MLIR_TYPE_ASM_TO_TORCH_DTYPE from wave_lang.dynamo.type_conversion import NativeTypeConverter from torch import Tensor from torch.fx.experimental.symbolic_shapes import ShapeEnv from typing import Callable, Optional import torch from wave_lang.runtime.op_reg.base import ALL_CUS...
class AOTKernelSelection(KernelSelection): '''Kernel selection specialized for AOT compilation where PyTorch graph has already been exported to MLIR.''' def __init__(self, op: CustomOp, operands: list[Value], results: list[Value], type_converter: NativeTypeConverter, shape_env: ShapeEnv): pass ...
14
1
13
0
12
1
2
0.08
1
18
7
0
12
5
12
48
168
16
141
70
120
11
103
56
89
5
5
3
23
327,465
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/transforms/general/custom_op_expansion.py
custom_op_expansion.ExpandCustomOpsPass
from wave_lang.support.ir_imports import Block, FloatAttr, InsertionPoint, IntegerAttr, IrType, Operation, OpResult, RankedTensorType, StringAttr, SymbolTable, Value from wave_lang.dynamo.type_conversion import NativeTypeConverter from torch.fx.experimental.symbolic_shapes import ShapeEnv from wave_lang.runtime.op_reg....
class ExpandCustomOpsPass(Pass): def __init__(self, root_op: Operation, reg: dict[str, CustomOp]=ALL_CUSTOM_OP_REGS): pass def delete_op(self, op): pass def run(self): pass def expand_func(self, func_op: Operation): '''Expands custom ops in a traced torch function. ...
6
1
13
1
10
1
2
0.13
1
8
4
0
5
6
5
11
69
9
53
26
45
7
39
24
33
6
1
5
12
327,466
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/transforms/general/custom_op_expansion.py
custom_op_expansion.InlineKernelBuilder
from wave_lang.dynamo.type_conversion import NativeTypeConverter from wave_lang.support.ir_imports import Block, FloatAttr, InsertionPoint, IntegerAttr, IrType, Operation, OpResult, RankedTensorType, StringAttr, SymbolTable, Value from wave_lang.runtime.op_reg.base import ALL_CUSTOM_OP_REGS, AttrArg, CustomOp, EmptyOpt...
class InlineKernelBuilder(KernelBuilder): def __init__(self, ksel: KernelSelection, torch_op: Operation, *, type_converter: NativeTypeConverter, module_body: Block, symbol_table: SymbolTable): pass def yield_results(self, *results: Value): '''Yields results of the kernel computation.''' ...
3
1
33
1
31
1
4
0.03
1
7
3
0
2
4
2
26
67
2
63
26
52
2
34
18
31
5
5
4
7
327,467
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/transforms/general/custom_op_expansion.py
custom_op_expansion.Pass
from wave_lang.support.ir_imports import Block, FloatAttr, InsertionPoint, IntegerAttr, IrType, Operation, OpResult, RankedTensorType, StringAttr, SymbolTable, Value class Pass: """Minimal Pass base class for custom op expansion.""" def __init__(self, root_op: Operation): self.root_op = root_op d...
class Pass: '''Minimal Pass base class for custom op expansion.''' def __init__(self, root_op: Operation): pass def run(self): pass @property def funcs(self): '''Get all func.func operations in the module.''' pass def erase_unused_op(self, op: Operation): ...
8
3
7
0
7
1
3
0.1
0
5
0
1
6
1
6
6
52
7
41
20
32
4
40
19
32
7
0
5
18
327,468
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/compiler/dispatch_codegen.py
dispatch_codegen.DispatchEntrypoint
from .kernel_codegen import BindingDesc, BindingType, BoundKernelSignature, KernelSignature from .._support.indexing import IndexExpr, IndexSymbol from typing import Any, Callable, Optional from wave_lang.support.ir_imports import Block, DictAttr, FunctionType, IndexType, InsertionPoint, IntegerAttr, IrType, Location, ...
class DispatchEntrypoint(BoundKernelSignature): def __init__(self, sig: KernelSignature, entry_block: Block, linear_bindings: list[BindingDesc], dynamic_symbols_mapping: dict[IndexSymbol, Value]): pass def get_dynamic_dims(self, binding: BindingDesc) -> list[Value]: ''' This function ...
4
1
20
1
16
3
3
0.16
1
11
4
0
3
2
3
26
62
5
49
19
39
8
27
13
23
4
5
2
8
327,469
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/compiler/dispatch_codegen.py
dispatch_codegen.StreamExecutable
from .._support.indexing import IndexExpr, IndexSymbol from .builder import ModuleBuilder from typing import Any, Callable, Optional from wave_lang.support.ir_imports import Block, DictAttr, FunctionType, IndexType, InsertionPoint, IntegerAttr, IrType, Location, StringAttr, Value, arith_d, func_d, iree_codegen_d, strea...
class StreamExecutable: '''Encapsulates a 'stream' compilable executable which can be dispatched to. This corresponds to a `stream.executable`, consisting of one or more exported dispatch functions. ''' def __init__(self, mb: ModuleBuilder, *, loc: Optional[Location]=None, name: str='__executable'...
5
2
49
6
37
6
3
0.19
0
14
7
0
2
6
2
2
206
28
149
55
128
29
69
40
63
8
0
4
13
327,470
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/compiler/dispatch_codegen.py
dispatch_codegen.WorkgroupBuilder
from typing import Any, Callable, Optional from wave_lang.support.ir_imports import Block, DictAttr, FunctionType, IndexType, InsertionPoint, IntegerAttr, IrType, Location, StringAttr, Value, arith_d, func_d, iree_codegen_d, stream_d class WorkgroupBuilder: """Builder for a workgroup calculation block.""" __sl...
class WorkgroupBuilder: '''Builder for a workgroup calculation block.''' def __init__(self, entry_block: Block, term_ctor: Callable[[list[Value]], None]): pass @property def location(self) -> Location: pass def terminate(self, returns: list[Value]): pass
5
1
3
0
3
0
1
0.06
0
1
0
0
3
3
3
3
22
4
17
10
12
1
12
9
8
1
0
1
3
327,471
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/dtype.py
dtype.DataType
class DataType: _name: str _ir_type_asm: str def __init__(self, name, ir_type_asm=None): self._name = name self._ir_type_asm = ir_type_asm if ir_type_asm else name self._symbolic_shape = () def ir_type_asm(self): return self._ir_type_asm def __str__(self): ...
class DataType: def __init__(self, name, ir_type_asm=None): pass def ir_type_asm(self): pass def __str__(self): pass def __repr__(self): pass def is_int_asm(self): pass def is_float_asm(self): pass def is_index_asm(self): pass ...
15
0
4
0
3
0
2
0.07
0
1
0
0
11
1
11
11
57
11
43
16
28
3
39
13
27
6
0
1
18
327,472
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/expansion/expansion.py
expansion.ExpansionContext
from ...ops.wave_ops import Allocate, Conditional, CustomOp, GetResult, IterArg, Iterate, MMA, MMABase, Output, ReduceOp, ScatterAdd, Reshape, SetSymbol, Write, get_custom class ExpansionContext: """ Context used to store information during expansion. """ def __init__(self): self.expansion_con...
class ExpansionContext: ''' Context used to store information during expansion. ''' def __init__(self): pass def __getitem__(self, key: ExpansionInfo): pass def __contains__(self, key: ExpansionInfo): pass def __setitem__(self, key: ExpansionInfo, value: CustomOp...
6
1
3
0
3
0
1
0.29
0
5
2
0
5
4
5
5
23
5
14
10
8
4
14
10
8
1
0
0
5
327,473
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/expansion/expansion.py
expansion.ExpansionInfo
from dataclasses import dataclass from ..._support.indexing import IndexingContext, IndexSymbol from ...ops.wave_ops import Allocate, Conditional, CustomOp, GetResult, IterArg, Iterate, MMA, MMABase, Output, ReduceOp, ScatterAdd, Reshape, SetSymbol, Write, get_custom @dataclass(frozen=True) class ExpansionInfo: ""...
@dataclass(frozen=True) class ExpansionInfo: ''' Key used to store and look up nodes during expansion. ''' def __repr__(self): pass
3
1
2
0
2
0
1
0.6
0
0
0
0
1
0
1
1
10
2
5
2
3
3
5
2
3
1
0
0
1
327,474
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/expansion/expansion.py
expansion.ItertionInfo
from ...ops.wave_ops import Allocate, Conditional, CustomOp, GetResult, IterArg, Iterate, MMA, MMABase, Output, ReduceOp, ScatterAdd, Reshape, SetSymbol, Write, get_custom class ItertionInfo: """ Contains fixup information for an Iterate node. """ def __init__(self, reduction: Iterate): self.r...
class ItertionInfo: ''' Contains fixup information for an Iterate node. ''' def __init__(self, reduction: Iterate): pass def __repr__(self): pass
3
1
7
0
7
0
1
0.21
0
3
1
0
2
4
2
2
19
2
14
8
11
3
9
8
6
1
0
0
2
327,475
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/expansion/expansion_utils.py
expansion_utils.ExpansionMetadata
from ..._support.indexing import IndexingContext, IndexSymbol class ExpansionMetadata: def __init__(self, dim_query: dict[IndexSymbol, int]=None): self.do_not_expand: bool = False self.dim_query = dim_query self.last_mma_node = False self.source_dim_query = None self.num_qu...
class ExpansionMetadata: def __init__(self, dim_query: dict[IndexSymbol, int]=None): pass def __str__(self): pass
3
0
5
0
5
0
1
0
0
4
0
0
2
6
2
2
11
1
10
9
7
0
10
9
7
1
0
0
2
327,476
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/analysis/index_sequence_analysis.py
index_sequence_analysis.ScalingType
from enum import Enum class ScalingType(Enum): MULTIPLY = 16 DIVIDE = 32
class ScalingType(Enum): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
49
3
0
3
3
2
0
3
3
2
0
4
0
0
327,477
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/indexing.py
indexing.BoundedRelation
from typing import Any, ClassVar, Optional, Type, TypeAlias, TypeVar, Union class BoundedRelation(IndexRelation): """An index assumption that can take any value in a range.""" __slots__ = ['lower_expr', 'lower_inclusive', 'upper_expr', 'upper_inclusive'] def __init__(self, lower_expr: Any, upper_expr: Any...
class BoundedRelation(IndexRelation): '''An index assumption that can take any value in a range.''' def __init__(self, lower_expr: Any, upper_expr: Any, *, lower_inclusive: bool=True, upper_inclusive: bool=True): pass def __eq__(self, other): pass def __repr__(self): pass
4
1
9
0
9
0
2
0.03
1
2
0
0
3
4
3
23
39
4
34
16
23
1
13
9
9
3
5
1
6
327,478
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/indexing.py
indexing.EqualRelation
class EqualRelation(IndexRelation): """An index assumption that can take a single symbolic value.""" __slots__ = ['eq_expr'] def __init__(self, eq_expr: IndexExpr): self.eq_expr = eq_expr def __eq__(self, other): if not isinstance(other, EqualRelation): return False ...
class EqualRelation(IndexRelation): '''An index assumption that can take a single symbolic value.''' def __init__(self, eq_expr: IndexExpr): pass def __eq__(self, other): pass def __repr__(self): pass
4
1
4
0
4
0
2
0.07
1
0
0
0
3
1
3
23
19
4
14
7
10
1
13
7
9
2
5
1
5
327,479
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/indexing.py
indexing.IndexRelation
from abc import ABC class IndexRelation(ABC): """ABC for assumptions that can be made about an index value.""" __slots__ = []
class IndexRelation(ABC): '''ABC for assumptions that can be made about an index value.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
2
0
0
0
20
4
1
2
2
1
1
2
2
1
0
4
0
0
327,480
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/indexing.py
indexing.IndexSequence
from dataclasses import dataclass from typing import Any, ClassVar, Optional, Type, TypeAlias, TypeVar, Union import sympy @dataclass class IndexSequence: start: IndexExpr | int size: IndexExpr | int stride: IndexExpr | int = 1 @staticmethod def _subs(value: int | IndexExpr, map: dict[IndexExpr, I...
@dataclass class IndexSequence: @staticmethod def _subs(value: int | IndexExpr, map: dict[IndexExpr, IndexExpr], simultaneous: bool=False) -> int | IndexExpr: pass def has(self, symbol: IndexSymbol) -> bool: pass def subs(self, map: dict[IndexExpr, IndexExpr], simultaneous: bool=False...
10
0
5
0
5
0
1
0.03
0
5
0
0
4
0
6
6
43
6
37
23
24
1
27
17
20
2
0
1
7
327,481
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/indexing.py
indexing.IndexingContext
from typing import Any, ClassVar, Optional, Type, TypeAlias, TypeVar, Union from . import context, dtype import sympy import copy from .shaped_type import ShapedType class IndexingContext: """The indexing context is responsible handling the binding of indexed symbols to concrete values. """ __slots__ =...
class IndexingContext: '''The indexing context is responsible handling the binding of indexed symbols to concrete values. ''' def __init__(self): pass def __str__(self): pass def set_subs(self, subs: dict[IndexSymbol, int | IndexSymbol]): pass def subs_expr(self,...
21
1
9
0
8
1
2
0.11
0
11
2
0
18
7
19
19
212
27
167
53
144
18
128
49
108
14
0
5
44
327,482
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/indexing.py
indexing.NotSetType
class NotSetType: ...
class NotSetType: pass
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
1
0
2
1
1
0
0
0
0
327,483
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/indexing.py
indexing.SymIndex
from typing import Any, ClassVar, Optional, Type, TypeAlias, TypeVar, Union class SymIndex(metaclass=_SymIndexMeta, assumption=None): """Symbolic index value defined for an assumption. The base type is unbacked (None assumption). """ __slots__ = ['symbol'] assumption: ClassVar[Optional[IndexRelati...
class SymIndex(metaclass=_SymIndexMeta, assumption=None): '''Symbolic index value defined for an assumption. The base type is unbacked (None assumption). ''' def __init__(self, symbol: IndexSymbol): pass def __repr__(self): pass def cast(self, cast: Type['SymIndex']) -> 'SymI...
4
2
3
0
2
1
1
0.55
2
0
0
1
3
1
3
18
24
7
11
6
7
6
9
6
5
1
3
0
3
327,484
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/indexing.py
indexing._IndexSymbolExpando
class _IndexSymbolExpando: def __getattr__(self, n) -> IndexSymbol: return index_symbol(n)
class _IndexSymbolExpando: def __getattr__(self, n) -> IndexSymbol: pass
2
0
2
0
2
0
1
0
0
0
0
0
1
0
1
1
3
0
3
2
1
0
3
2
1
1
0
0
1
327,485
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/indexing.py
indexing._ShapedBinding
from dataclasses import dataclass from .shaped_type import ShapedType from typing import Any, ClassVar, Optional, Type, TypeAlias, TypeVar, Union @dataclass(slots=True) class _ShapedBinding: instance: Any shaped_type: ShapedType symbolic_shape: list[IndexExpr] dims: Dims
@dataclass(slots=True) class _ShapedBinding: pass
2
0
0
0
0
0
0
1.4
0
0
0
0
0
0
0
0
15
3
5
1
4
7
5
1
4
0
0
0
0
327,486
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/indexing.py
indexing._SymIndexMeta
from typing import Any, ClassVar, Optional, Type, TypeAlias, TypeVar, Union class _SymIndexMeta(type): """Meta-class for a concrete symbolic index value.""" def __new__(mcls, name: str, bases, dct, *, assumption: Optional[IndexRelation]): new_class = type.__new__(mcls, name, bases, dct) new_cl...
class _SymIndexMeta(type): '''Meta-class for a concrete symbolic index value.''' def __new__(mcls, name: str, bases, dct, *, assumption: Optional[IndexRelation]): pass def __repr__(self): pass
3
1
9
0
9
0
2
0.06
1
2
1
1
2
0
2
15
21
2
18
11
8
1
10
4
7
2
2
1
3
327,487
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/indexing.py
indexing.xor
import sympy class xor(sympy.Function): pass
class xor(sympy.Function): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
1
0
0
327,488
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/aot/support/ir_utils.py
ir_utils.FunctionBuilder
from wave_lang.support.ir_imports import ArrayAttr, Attribute, BF16Type, Context, DenseElementsAttr, DenseResourceElementsAttr, DictAttr, F16Type, F32Type, F64Type, Float4E2M1FNType, Float6E2M3FNType, Float8E4M3FNType, Float8E4M3FNUZType, Float8E5M2FNUZType, Float8E5M2Type, Float8E8M0FNUType, FloatAttr, FunctionType, I...
class FunctionBuilder: '''Helpers for building function bodies.''' def __init__(self, *, module_builder: ModuleBuilder, func_op: func_d.FuncOp): pass def emit_return(self, *ir_values: Value): pass
3
1
19
0
18
1
3
0.04
0
3
1
1
2
6
2
2
50
3
45
18
37
2
26
12
23
4
0
3
5
327,489
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/aot/support/ir_utils.py
ir_utils.GlobalAttributes
import torch from typing import Callable, Dict, Optional, Tuple from ..tensor_traits import DeviceAffinity, DeviceTensorTrait, ExternalTensorTrait class GlobalAttributes: """Settings for how to initialize the global.""" __slots__ = ['external', 'external_scope', 'mutable', 'name_mapper', 'noinline', 'uninitial...
class GlobalAttributes: '''Settings for how to initialize the global.''' def __init__(self, mutable: bool=False, external: Optional[bool]=None, external_scope: Optional[str]=None, name_mapper: Optional[NameMapCallback]=None, noinline: bool=False, uninitialized: Optional[bool]=None): pass def map_...
4
2
18
0
17
1
4
0.07
0
6
1
0
3
6
3
3
69
5
60
28
45
4
32
17
28
5
0
2
11
327,490
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/aot/support/ir_utils.py
ir_utils.ModuleBuilder
from pathlib import Path import numpy as np from wave_lang.dynamo.type_conversion import NativeTypeConverter import tempfile from iree.compiler.extras.fx_importer import ContextCache, RefTracker from collections.abc import Sequence from wave_lang.support.logging import aot_logger as logger from typing import Callable, ...
class ModuleBuilder: '''Wrapper around module and IR accounting for a module being built.''' def __init__(self, module_op: Operation, *, options: Optional[ModuleBuilderOptions]=None): pass def unique_auto_symbol(self, requested_name: str) -> str: pass def handle_mlir_error(self, op: ...
10
1
25
0
21
4
4
0.18
0
15
4
0
9
12
9
9
248
13
204
76
168
37
122
48
112
10
0
3
34
327,491
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/aot/support/ir_utils.py
ir_utils.ModuleBuilderOptions
from dataclasses import dataclass @dataclass class ModuleBuilderOptions: import_symbolic_shape_expressions: bool = False
@dataclass class ModuleBuilderOptions: pass
2
0
0
0
0
0
0
0.5
0
0
0
0
0
0
0
0
3
0
2
2
1
1
2
2
1
0
0
0
0
327,492
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/compiler/kernel_codegen.py
kernel_codegen.BindingDesc
from typing import Any, Callable, Optional, Type from wave_lang.support.ir_imports import Block, FunctionType, IndexType, InsertionPoint, IrType, Location, Operation, Value, func_d from ..lang.kernel_buffer import KernelBuffer, KernelBufferUsage, is_kernel_buffer_meta_derived from wave_lang.kernel._support.dtype import...
@dataclass class BindingDesc: def as_mlir_type(self) -> IrType: pass def sym_to_dim_asm(s: IndexSymbol) -> str: pass
4
0
25
1
23
2
6
0.27
0
4
2
0
1
0
1
1
69
8
49
18
46
13
38
18
35
9
0
2
11
327,493
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/compiler/kernel_codegen.py
kernel_codegen.BindingType
from enum import Enum class BindingType(Enum): KERNEL_BUFFER = 0 INDEX_VALUE = 1 SYMBOL_VALUE = 2 SCALAR_VALUE = 3
class BindingType(Enum): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
49
5
0
5
5
4
0
5
5
4
0
4
0
0
327,494
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/compiler/kernel_codegen.py
kernel_codegen.BoundKernelSignature
from wave_lang.support.ir_imports import Block, FunctionType, IndexType, InsertionPoint, IrType, Location, Operation, Value, func_d from typing import Any, Callable, Optional, Type from abc import ABC, abstractmethod class BoundKernelSignature(ABC): """Represents a KernelSignature bound to a concrete IR structure....
class BoundKernelSignature(ABC): '''Represents a KernelSignature bound to a concrete IR structure.''' def __init__(self, sig: KernelSignature, entry_block: Block): pass def resolve_by_reference(self, reference: Any) -> Value: pass @abstractmethod def resolve_by_reference(self, referen...
5
2
7
0
6
1
1
0.26
1
5
2
2
3
3
3
23
28
4
19
10
14
5
14
9
10
2
4
1
4
327,495
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/compiler/kernel_codegen.py
kernel_codegen.FunctionalKernelSignature
from wave_lang.support.ir_imports import Block, FunctionType, IndexType, InsertionPoint, IrType, Location, Operation, Value, func_d from .builder import ModuleBuilder from .base import CodegenError from typing import Any, Callable, Optional, Type class FunctionalKernelSignature(BoundKernelSignature): """Simple Bou...
class FunctionalKernelSignature(BoundKernelSignature): '''Simple BoundKernelSignature which maps all bindings to function args. Arguments are represented in binding order. ''' def __init__(self, sig: KernelSignature, entry_block: Block): pass def resolve(self, binding: BindingDesc) -> Val...
5
2
10
0
10
0
2
0.13
1
12
4
0
2
1
3
26
39
4
31
15
24
4
20
12
16
2
5
1
5
327,496
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/compiler/kernel_codegen.py
kernel_codegen.KernelSignature
from ..lang.grid import Grid from ..ops.wave_ops import NestedRegionOp, Placeholder, Read, Write, get_custom from .._support.indexing import IndexingContext, IndexSymbol, index_symbol import torch.fx as fx from wave_lang.kernel._support.dtype import DataType from ..lang.wave_types import Memory, SymbolBind from typing ...
class KernelSignature: def __init__(self, device_constraints=None): pass @property def grid_bindings(self) -> list[BindingDesc]: '''Gets all grid axis bindings.''' pass @property def kernel_buffer_bindings(self) -> list[BindingDesc]: '''Gets all kernel buffer bindin...
25
8
14
1
12
1
3
0.11
0
10
7
0
13
1
13
13
210
24
168
48
144
18
87
41
70
8
0
3
40
327,497
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/location.py
location.FileLineColInfo
from iree.compiler.ir import Context, Location from dataclasses import dataclass import inspect from typing import List, Optional, Union import sys @dataclass class FileLineColInfo: """ Location information containing the filename, line and column. """ filename: str line: Union[int, tuple[int, int]...
@dataclass class FileLineColInfo: ''' Location information containing the filename, line and column. ''' def to_mlir(self): pass @staticmethod def capture_current_location(): pass @staticmethod def from_stack_frame(frame: inspect.FrameInfo): pass
7
1
11
1
9
1
4
0.15
0
2
0
0
1
0
3
3
45
7
33
13
27
5
27
11
23
6
0
2
12
327,498
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/location.py
location.StackTraceInfo
import inspect from typing import List, Optional, Union from dataclasses import dataclass from iree.compiler.ir import Context, Location @dataclass class StackTraceInfo: """ Locations of an entire stack trace, each with FileLineColInfo. """ frames: List[FileLineColInfo] def to_mlir(self) -> Locati...
@dataclass class StackTraceInfo: ''' Locations of an entire stack trace, each with FileLineColInfo. ''' def to_mlir(self) -> Location: pass @staticmethod def capture_current_location(*, preserve_system_frames=False) -> 'StackTraceInfo': pass
5
1
10
0
8
2
2
0.32
0
1
1
0
1
0
2
2
28
3
19
5
15
6
12
4
9
3
0
1
4
327,499
iree-org/wave
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/_support/location_config.py
location_config.LocationCaptureConfig
from dataclasses import dataclass @dataclass class LocationCaptureConfig: level: LocationCaptureLevel = LocationCaptureLevel.NONE
@dataclass class LocationCaptureConfig: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
2
1
0
2
2
1
0
0
0
0