Skip to content

Commit 0853542

Browse files
committed
WIP
1 parent 7c010ca commit 0853542

File tree

4 files changed

+190
-829
lines changed

4 files changed

+190
-829
lines changed

python/morpheus/morpheus/_lib/common/__init__.pyi

+71-202
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
:toctree: _generate
66
"""
77
from __future__ import annotations
8-
9-
import os
10-
import typing
11-
128
import morpheus._lib.common
9+
import typing
10+
import os
1311

1412
__all__ = [
1513
"FiberQueue",
@@ -20,6 +18,7 @@ __all__ = [
2018
"Tensor",
2119
"TypeId",
2220
"determine_file_type",
21+
"load_cudf_helper",
2322
"read_file_to_df",
2423
"typeid_is_fully_supported",
2524
"typeid_to_numpy_str",
@@ -28,31 +27,14 @@ __all__ = [
2827

2928

3029
class FiberQueue():
31-
32-
def __enter__(self) -> FiberQueue:
33-
...
34-
35-
def __exit__(self, arg0: object, arg1: object, arg2: object) -> None:
36-
...
37-
38-
def __init__(self, max_size: int) -> None:
39-
...
40-
41-
def close(self) -> None:
42-
...
43-
44-
def get(self, block: bool = True, timeout: float = 0.0) -> object:
45-
...
46-
47-
def is_closed(self) -> bool:
48-
...
49-
50-
def put(self, item: object, block: bool = True, timeout: float = 0.0) -> None:
51-
...
52-
30+
def __enter__(self) -> FiberQueue: ...
31+
def __exit__(self, arg0: object, arg1: object, arg2: object) -> None: ...
32+
def __init__(self, max_size: int) -> None: ...
33+
def close(self) -> None: ...
34+
def get(self, block: bool = True, timeout: float = 0.0) -> object: ...
35+
def is_closed(self) -> bool: ...
36+
def put(self, item: object, block: bool = True, timeout: float = 0.0) -> None: ...
5337
pass
54-
55-
5638
class FileTypes():
5739
"""
5840
The type of files that the `FileSourceStage` can read and `WriteToFileStage` can write. Use 'auto' to determine from the file extension.
@@ -67,54 +49,31 @@ class FileTypes():
6749
6850
PARQUET
6951
"""
70-
71-
def __eq__(self, other: object) -> bool:
72-
...
73-
74-
def __getstate__(self) -> int:
75-
...
76-
77-
def __hash__(self) -> int:
78-
...
79-
80-
def __index__(self) -> int:
81-
...
82-
83-
def __init__(self, value: int) -> None:
84-
...
85-
86-
def __int__(self) -> int:
87-
...
88-
89-
def __ne__(self, other: object) -> bool:
90-
...
91-
92-
def __repr__(self) -> str:
93-
...
94-
95-
def __setstate__(self, state: int) -> None:
96-
...
97-
52+
def __eq__(self, other: object) -> bool: ...
53+
def __getstate__(self) -> int: ...
54+
def __hash__(self) -> int: ...
55+
def __index__(self) -> int: ...
56+
def __init__(self, value: int) -> None: ...
57+
def __int__(self) -> int: ...
58+
def __ne__(self, other: object) -> bool: ...
59+
def __repr__(self) -> str: ...
60+
def __setstate__(self, state: int) -> None: ...
9861
@property
9962
def name(self) -> str:
10063
"""
10164
:type: str
10265
"""
103-
10466
@property
10567
def value(self) -> int:
10668
"""
10769
:type: int
10870
"""
109-
110-
Auto: morpheus._lib.common.FileTypes # value = <FileTypes.Auto: 0>
111-
CSV: morpheus._lib.common.FileTypes # value = <FileTypes.CSV: 2>
112-
JSON: morpheus._lib.common.FileTypes # value = <FileTypes.JSON: 1>
113-
PARQUET: morpheus._lib.common.FileTypes # value = <FileTypes.PARQUET: 3>
114-
__members__: dict # value = {'Auto': <FileTypes.Auto: 0>, 'JSON': <FileTypes.JSON: 1>, 'CSV': <FileTypes.CSV: 2>, 'PARQUET': <FileTypes.PARQUET: 3>}
71+
Auto: morpheus._lib.common.FileTypes # value = <FileTypes.Auto: 0>
72+
CSV: morpheus._lib.common.FileTypes # value = <FileTypes.CSV: 2>
73+
JSON: morpheus._lib.common.FileTypes # value = <FileTypes.JSON: 1>
74+
PARQUET: morpheus._lib.common.FileTypes # value = <FileTypes.PARQUET: 3>
75+
__members__: dict # value = {'Auto': <FileTypes.Auto: 0>, 'JSON': <FileTypes.JSON: 1>, 'CSV': <FileTypes.CSV: 2>, 'PARQUET': <FileTypes.PARQUET: 3>}
11576
pass
116-
117-
11877
class FilterSource():
11978
"""
12079
Enum to indicate which source the FilterDetectionsStage should operate on.
@@ -127,108 +86,51 @@ class FilterSource():
12786
12887
DATAFRAME
12988
"""
130-
131-
def __eq__(self, other: object) -> bool:
132-
...
133-
134-
def __getstate__(self) -> int:
135-
...
136-
137-
def __hash__(self) -> int:
138-
...
139-
140-
def __index__(self) -> int:
141-
...
142-
143-
def __init__(self, value: int) -> None:
144-
...
145-
146-
def __int__(self) -> int:
147-
...
148-
149-
def __ne__(self, other: object) -> bool:
150-
...
151-
152-
def __repr__(self) -> str:
153-
...
154-
155-
def __setstate__(self, state: int) -> None:
156-
...
157-
89+
def __eq__(self, other: object) -> bool: ...
90+
def __getstate__(self) -> int: ...
91+
def __hash__(self) -> int: ...
92+
def __index__(self) -> int: ...
93+
def __init__(self, value: int) -> None: ...
94+
def __int__(self) -> int: ...
95+
def __ne__(self, other: object) -> bool: ...
96+
def __repr__(self) -> str: ...
97+
def __setstate__(self, state: int) -> None: ...
15898
@property
15999
def name(self) -> str:
160100
"""
161101
:type: str
162102
"""
163-
164103
@property
165104
def value(self) -> int:
166105
"""
167106
:type: int
168107
"""
169-
170-
Auto: morpheus._lib.common.FilterSource # value = <FilterSource.Auto: 0>
171-
DATAFRAME: morpheus._lib.common.FilterSource # value = <FilterSource.DATAFRAME: 2>
172-
TENSOR: morpheus._lib.common.FilterSource # value = <FilterSource.TENSOR: 1>
173-
__members__: dict # value = {'Auto': <FilterSource.Auto: 0>, 'TENSOR': <FilterSource.TENSOR: 1>, 'DATAFRAME': <FilterSource.DATAFRAME: 2>}
108+
Auto: morpheus._lib.common.FilterSource # value = <FilterSource.Auto: 0>
109+
DATAFRAME: morpheus._lib.common.FilterSource # value = <FilterSource.DATAFRAME: 2>
110+
TENSOR: morpheus._lib.common.FilterSource # value = <FilterSource.TENSOR: 1>
111+
__members__: dict # value = {'Auto': <FilterSource.Auto: 0>, 'TENSOR': <FilterSource.TENSOR: 1>, 'DATAFRAME': <FilterSource.DATAFRAME: 2>}
174112
pass
175-
176-
177113
class HttpEndpoint():
178-
179-
def __init__(self, py_parse_fn: function, url: str, method: str) -> None:
180-
...
181-
114+
def __init__(self, py_parse_fn: function, url: str, method: str) -> None: ...
182115
pass
183-
184-
185116
class HttpServer():
186-
187-
def __enter__(self) -> HttpServer:
188-
...
189-
190-
def __exit__(self, arg0: object, arg1: object, arg2: object) -> None:
191-
...
192-
193-
def __init__(self,
194-
endpoints: typing.List[HttpEndpoint],
195-
bind_address: str = '127.0.0.1',
196-
port: int = 8080,
197-
num_threads: int = 1,
198-
max_payload_size: int = 10485760,
199-
request_timeout: int = 30) -> None:
200-
...
201-
202-
def is_running(self) -> bool:
203-
...
204-
205-
def start(self) -> None:
206-
...
207-
208-
def stop(self) -> None:
209-
...
210-
117+
def __enter__(self) -> HttpServer: ...
118+
def __exit__(self, arg0: object, arg1: object, arg2: object) -> None: ...
119+
def __init__(self, endpoints: typing.List[HttpEndpoint], bind_address: str = '127.0.0.1', port: int = 8080, num_threads: int = 1, max_payload_size: int = 10485760, request_timeout: int = 30) -> None: ...
120+
def is_running(self) -> bool: ...
121+
def start(self) -> None: ...
122+
def stop(self) -> None: ...
211123
pass
212-
213-
214124
class Tensor():
215-
216125
@staticmethod
217-
def from_cupy(arg0: object) -> Tensor:
218-
...
219-
220-
def to_cupy(self) -> object:
221-
...
222-
126+
def from_cupy(arg0: object) -> Tensor: ...
127+
def to_cupy(self) -> object: ...
223128
@property
224129
def __cuda_array_interface__(self) -> dict:
225130
"""
226131
:type: dict
227132
"""
228-
229133
pass
230-
231-
232134
class TypeId():
233135
"""
234136
Supported Morpheus types
@@ -261,87 +163,54 @@ class TypeId():
261163
262164
STRING
263165
"""
264-
265-
def __eq__(self, other: object) -> bool:
266-
...
267-
268-
def __getstate__(self) -> int:
269-
...
270-
271-
def __hash__(self) -> int:
272-
...
273-
274-
def __index__(self) -> int:
275-
...
276-
277-
def __init__(self, value: int) -> None:
278-
...
279-
280-
def __int__(self) -> int:
281-
...
282-
283-
def __ne__(self, other: object) -> bool:
284-
...
285-
286-
def __repr__(self) -> str:
287-
...
288-
289-
def __setstate__(self, state: int) -> None:
290-
...
291-
166+
def __eq__(self, other: object) -> bool: ...
167+
def __getstate__(self) -> int: ...
168+
def __hash__(self) -> int: ...
169+
def __index__(self) -> int: ...
170+
def __init__(self, value: int) -> None: ...
171+
def __int__(self) -> int: ...
172+
def __ne__(self, other: object) -> bool: ...
173+
def __repr__(self) -> str: ...
174+
def __setstate__(self, state: int) -> None: ...
292175
@property
293176
def name(self) -> str:
294177
"""
295178
:type: str
296179
"""
297-
298180
@property
299181
def value(self) -> int:
300182
"""
301183
:type: int
302184
"""
303-
304-
BOOL8: morpheus._lib.common.TypeId # value = <TypeId.BOOL8: 11>
305-
EMPTY: morpheus._lib.common.TypeId # value = <TypeId.EMPTY: 0>
306-
FLOAT32: morpheus._lib.common.TypeId # value = <TypeId.FLOAT32: 9>
307-
FLOAT64: morpheus._lib.common.TypeId # value = <TypeId.FLOAT64: 10>
308-
INT16: morpheus._lib.common.TypeId # value = <TypeId.INT16: 2>
309-
INT32: morpheus._lib.common.TypeId # value = <TypeId.INT32: 3>
310-
INT64: morpheus._lib.common.TypeId # value = <TypeId.INT64: 4>
311-
INT8: morpheus._lib.common.TypeId # value = <TypeId.INT8: 1>
312-
STRING: morpheus._lib.common.TypeId # value = <TypeId.STRING: 12>
313-
UINT16: morpheus._lib.common.TypeId # value = <TypeId.UINT16: 6>
314-
UINT32: morpheus._lib.common.TypeId # value = <TypeId.UINT32: 7>
315-
UINT64: morpheus._lib.common.TypeId # value = <TypeId.UINT64: 8>
316-
UINT8: morpheus._lib.common.TypeId # value = <TypeId.UINT8: 5>
317-
__members__: dict # value = {'EMPTY': <TypeId.EMPTY: 0>, 'INT8': <TypeId.INT8: 1>, 'INT16': <TypeId.INT16: 2>, 'INT32': <TypeId.INT32: 3>, 'INT64': <TypeId.INT64: 4>, 'UINT8': <TypeId.UINT8: 5>, 'UINT16': <TypeId.UINT16: 6>, 'UINT32': <TypeId.UINT32: 7>, 'UINT64': <TypeId.UINT64: 8>, 'FLOAT32': <TypeId.FLOAT32: 9>, 'FLOAT64': <TypeId.FLOAT64: 10>, 'BOOL8': <TypeId.BOOL8: 11>, 'STRING': <TypeId.STRING: 12>}
185+
BOOL8: morpheus._lib.common.TypeId # value = <TypeId.BOOL8: 11>
186+
EMPTY: morpheus._lib.common.TypeId # value = <TypeId.EMPTY: 0>
187+
FLOAT32: morpheus._lib.common.TypeId # value = <TypeId.FLOAT32: 9>
188+
FLOAT64: morpheus._lib.common.TypeId # value = <TypeId.FLOAT64: 10>
189+
INT16: morpheus._lib.common.TypeId # value = <TypeId.INT16: 2>
190+
INT32: morpheus._lib.common.TypeId # value = <TypeId.INT32: 3>
191+
INT64: morpheus._lib.common.TypeId # value = <TypeId.INT64: 4>
192+
INT8: morpheus._lib.common.TypeId # value = <TypeId.INT8: 1>
193+
STRING: morpheus._lib.common.TypeId # value = <TypeId.STRING: 12>
194+
UINT16: morpheus._lib.common.TypeId # value = <TypeId.UINT16: 6>
195+
UINT32: morpheus._lib.common.TypeId # value = <TypeId.UINT32: 7>
196+
UINT64: morpheus._lib.common.TypeId # value = <TypeId.UINT64: 8>
197+
UINT8: morpheus._lib.common.TypeId # value = <TypeId.UINT8: 5>
198+
__members__: dict # value = {'EMPTY': <TypeId.EMPTY: 0>, 'INT8': <TypeId.INT8: 1>, 'INT16': <TypeId.INT16: 2>, 'INT32': <TypeId.INT32: 3>, 'INT64': <TypeId.INT64: 4>, 'UINT8': <TypeId.UINT8: 5>, 'UINT16': <TypeId.UINT16: 6>, 'UINT32': <TypeId.UINT32: 7>, 'UINT64': <TypeId.UINT64: 8>, 'FLOAT32': <TypeId.FLOAT32: 9>, 'FLOAT64': <TypeId.FLOAT64: 10>, 'BOOL8': <TypeId.BOOL8: 11>, 'STRING': <TypeId.STRING: 12>}
318199
pass
319-
320-
321200
@typing.overload
322201
def determine_file_type(filename: os.PathLike) -> FileTypes:
323202
pass
324-
325-
326203
@typing.overload
327204
def determine_file_type(filename: str) -> FileTypes:
328205
pass
329-
330-
206+
def load_cudf_helper() -> None:
207+
pass
331208
def read_file_to_df(filename: str, file_type: FileTypes = FileTypes.Auto) -> object:
332209
pass
333-
334-
335210
def typeid_is_fully_supported(arg0: TypeId) -> bool:
336211
pass
337-
338-
339212
def typeid_to_numpy_str(arg0: TypeId) -> str:
340213
pass
341-
342-
343214
def write_df_to_file(df: object, filename: str, file_type: FileTypes = FileTypes.Auto, **kwargs) -> None:
344215
pass
345-
346-
347216
__version__ = '24.10.0'

0 commit comments

Comments
 (0)