maxframe 1.0.0rc2__cp37-cp37m-win_amd64.whl → 1.0.0rc3__cp37-cp37m-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of maxframe might be problematic. Click here for more details.

Files changed (105) hide show
  1. maxframe/_utils.cp37-win_amd64.pyd +0 -0
  2. maxframe/codegen.py +3 -2
  3. maxframe/config/config.py +16 -9
  4. maxframe/config/validators.py +42 -12
  5. maxframe/conftest.py +13 -2
  6. maxframe/core/__init__.py +2 -13
  7. maxframe/core/entity/__init__.py +0 -4
  8. maxframe/core/entity/objects.py +45 -2
  9. maxframe/core/entity/output_types.py +0 -3
  10. maxframe/core/entity/tests/test_objects.py +43 -0
  11. maxframe/core/entity/tileables.py +5 -78
  12. maxframe/core/graph/__init__.py +2 -2
  13. maxframe/core/graph/builder/__init__.py +0 -1
  14. maxframe/core/graph/builder/base.py +5 -4
  15. maxframe/core/graph/builder/tileable.py +4 -4
  16. maxframe/core/graph/builder/utils.py +4 -8
  17. maxframe/core/graph/core.cp37-win_amd64.pyd +0 -0
  18. maxframe/core/graph/entity.py +9 -33
  19. maxframe/core/operator/__init__.py +2 -9
  20. maxframe/core/operator/base.py +3 -5
  21. maxframe/core/operator/objects.py +0 -9
  22. maxframe/core/operator/utils.py +55 -0
  23. maxframe/dataframe/datasource/read_odps_query.py +1 -1
  24. maxframe/dataframe/datasource/read_odps_table.py +1 -1
  25. maxframe/dataframe/datastore/to_odps.py +1 -1
  26. maxframe/dataframe/operators.py +1 -17
  27. maxframe/dataframe/reduction/core.py +2 -2
  28. maxframe/io/objects/__init__.py +24 -0
  29. maxframe/io/objects/core.py +140 -0
  30. maxframe/io/objects/tensor.py +76 -0
  31. maxframe/io/objects/tests/__init__.py +13 -0
  32. maxframe/io/objects/tests/test_object_io.py +97 -0
  33. maxframe/{odpsio → io/odpsio}/__init__.py +2 -0
  34. maxframe/{odpsio → io/odpsio}/arrow.py +4 -4
  35. maxframe/{odpsio → io/odpsio}/schema.py +5 -5
  36. maxframe/{odpsio → io/odpsio}/tableio.py +10 -4
  37. maxframe/io/odpsio/tests/__init__.py +13 -0
  38. maxframe/{odpsio → io/odpsio}/tests/test_schema.py +3 -3
  39. maxframe/{odpsio → io/odpsio}/tests/test_tableio.py +3 -3
  40. maxframe/{odpsio → io/odpsio}/tests/test_volumeio.py +4 -6
  41. maxframe/io/odpsio/volumeio.py +57 -0
  42. maxframe/learn/contrib/xgboost/classifier.py +26 -2
  43. maxframe/learn/contrib/xgboost/core.py +87 -2
  44. maxframe/learn/contrib/xgboost/dmatrix.py +1 -4
  45. maxframe/learn/contrib/xgboost/predict.py +19 -5
  46. maxframe/learn/contrib/xgboost/regressor.py +3 -10
  47. maxframe/learn/contrib/xgboost/train.py +25 -15
  48. maxframe/{core/operator/fuse.py → learn/core.py} +7 -10
  49. maxframe/lib/mmh3.cp37-win_amd64.pyd +0 -0
  50. maxframe/protocol.py +1 -15
  51. maxframe/remote/core.py +4 -8
  52. maxframe/serialization/__init__.py +1 -0
  53. maxframe/serialization/core.cp37-win_amd64.pyd +0 -0
  54. maxframe/tensor/__init__.py +10 -2
  55. maxframe/tensor/arithmetic/isclose.py +1 -0
  56. maxframe/tensor/arithmetic/tests/test_arithmetic.py +21 -17
  57. maxframe/tensor/core.py +5 -136
  58. maxframe/tensor/datasource/array.py +3 -0
  59. maxframe/tensor/datasource/full.py +1 -1
  60. maxframe/tensor/datasource/tests/test_datasource.py +1 -1
  61. maxframe/tensor/indexing/flatnonzero.py +1 -1
  62. maxframe/tensor/merge/__init__.py +2 -0
  63. maxframe/tensor/merge/concatenate.py +98 -0
  64. maxframe/tensor/merge/tests/test_merge.py +30 -1
  65. maxframe/tensor/merge/vstack.py +70 -0
  66. maxframe/tensor/{base → misc}/__init__.py +2 -0
  67. maxframe/tensor/{base → misc}/atleast_1d.py +0 -2
  68. maxframe/tensor/misc/atleast_2d.py +70 -0
  69. maxframe/tensor/misc/atleast_3d.py +85 -0
  70. maxframe/tensor/misc/tests/__init__.py +13 -0
  71. maxframe/tensor/{base → misc}/transpose.py +22 -18
  72. maxframe/tensor/operators.py +1 -7
  73. maxframe/tensor/random/core.py +1 -1
  74. maxframe/tensor/reduction/count_nonzero.py +1 -0
  75. maxframe/tensor/reduction/mean.py +1 -0
  76. maxframe/tensor/reduction/nanmean.py +1 -0
  77. maxframe/tensor/reduction/nanvar.py +2 -0
  78. maxframe/tensor/reduction/tests/test_reduction.py +12 -1
  79. maxframe/tensor/reduction/var.py +2 -0
  80. maxframe/tensor/utils.py +2 -22
  81. maxframe/typing_.py +4 -1
  82. maxframe/udf.py +8 -9
  83. maxframe/utils.py +15 -61
  84. {maxframe-1.0.0rc2.dist-info → maxframe-1.0.0rc3.dist-info}/METADATA +2 -75
  85. {maxframe-1.0.0rc2.dist-info → maxframe-1.0.0rc3.dist-info}/RECORD +101 -91
  86. maxframe_client/fetcher.py +23 -42
  87. maxframe_client/session/graph.py +8 -2
  88. maxframe_client/session/odps.py +54 -18
  89. maxframe_client/tests/test_fetcher.py +1 -1
  90. maxframe_client/tests/test_session.py +14 -2
  91. maxframe/core/entity/chunks.py +0 -68
  92. maxframe/core/entity/fuse.py +0 -73
  93. maxframe/core/graph/builder/chunk.py +0 -430
  94. maxframe/odpsio/volumeio.py +0 -95
  95. /maxframe/{odpsio → core/entity}/tests/__init__.py +0 -0
  96. /maxframe/{tensor/base/tests → io}/__init__.py +0 -0
  97. /maxframe/{odpsio → io/odpsio}/tests/test_arrow.py +0 -0
  98. /maxframe/tensor/{base → misc}/astype.py +0 -0
  99. /maxframe/tensor/{base → misc}/broadcast_to.py +0 -0
  100. /maxframe/tensor/{base → misc}/ravel.py +0 -0
  101. /maxframe/tensor/{base/tests/test_base.py → misc/tests/test_misc.py} +0 -0
  102. /maxframe/tensor/{base → misc}/unique.py +0 -0
  103. /maxframe/tensor/{base → misc}/where.py +0 -0
  104. {maxframe-1.0.0rc2.dist-info → maxframe-1.0.0rc3.dist-info}/WHEEL +0 -0
  105. {maxframe-1.0.0rc2.dist-info → maxframe-1.0.0rc3.dist-info}/top_level.txt +0 -0
@@ -1,95 +0,0 @@
1
- # Copyright 1999-2024 Alibaba Group Holding Ltd.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- from typing import List, Optional
16
-
17
- from odps import ODPS
18
- from odps.models import ExternalVolume, PartedVolume
19
- from odps.tunnel.volumetunnel import VolumeTunnel
20
-
21
-
22
- class ODPSVolumeReader:
23
- def __init__(self, odps_entry: ODPS, volume_name: str, volume_dir: str):
24
- self._odps_entry = odps_entry
25
- self._volume = odps_entry.get_volume(volume_name)
26
- self._volume_dir = volume_dir
27
-
28
- def list_files(self) -> List[str]:
29
- def _get_file_name(vol_file):
30
- if hasattr(vol_file, "name"):
31
- return vol_file.name
32
- return vol_file.path.rsplit("/", 1)[-1]
33
-
34
- return [
35
- _get_file_name(f)
36
- for f in self._odps_entry.list_volume_files(
37
- f"/{self._volume.name}/{self._volume_dir}"
38
- )
39
- ]
40
-
41
- def read_file(self, file_name: str) -> bytes:
42
- if isinstance(self._volume, PartedVolume):
43
- vol_tunnel = VolumeTunnel(self._odps_entry)
44
- session = vol_tunnel.create_download_session(
45
- self._volume, self._volume_dir, file_name
46
- )
47
- with session.open() as reader:
48
- return reader.read()
49
- elif isinstance(self._volume, ExternalVolume):
50
- with self._volume.open_reader(self._volume_dir + "/" + file_name) as reader:
51
- return reader.read()
52
-
53
-
54
- class ODPSVolumeWriter:
55
- def __init__(self, odps_entry: ODPS, volume_name: str, volume_dir: str):
56
- self._odps_entry = odps_entry
57
- self._volume = odps_entry.get_volume(volume_name)
58
- self._volume_dir = volume_dir
59
- self._session_cache = None
60
-
61
- def create_write_session(self) -> Optional[str]:
62
- if not isinstance(self._volume, PartedVolume):
63
- return None
64
- vol_tunnel = VolumeTunnel(self._odps_entry)
65
- session = self._session_cache = vol_tunnel.create_upload_session(
66
- self._volume, self._volume_dir
67
- )
68
- return session.id
69
-
70
- def _get_existing_upload_session(self, write_session_id: Optional[str]):
71
- if self._session_cache is not None and (
72
- write_session_id is None or write_session_id == self._session_cache.id
73
- ):
74
- return self._session_cache
75
- vol_tunnel = VolumeTunnel(self._odps_entry)
76
- return vol_tunnel.create_upload_session(
77
- self._volume, self._volume_dir, write_session_id
78
- )
79
-
80
- def write_file(
81
- self, file_name: str, data: bytes, write_session_id: Optional[str] = None
82
- ):
83
- if isinstance(self._volume, PartedVolume):
84
- session = self._get_existing_upload_session(write_session_id)
85
- with session.open(file_name) as writer:
86
- writer.write(data)
87
- elif isinstance(self._volume, ExternalVolume):
88
- with self._volume.open_writer(self._volume_dir + "/" + file_name) as writer:
89
- writer.write(data)
90
-
91
- def commit(self, files: List[str], write_session_id: Optional[str] = None):
92
- if not isinstance(self._volume, PartedVolume):
93
- return None
94
- session = self._get_existing_upload_session(write_session_id)
95
- session.commit(files)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes