tensor-layouts 0.0.1__tar.gz

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.
@@ -0,0 +1,16 @@
1
+ License :: OSI Approved :: MIT No Attribution License (MIT-0)
2
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ SPDX-License-Identifier: MIT-0
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this
6
+ software and associated documentation files (the "Software"), to deal in the Software
7
+ without restriction, including without limitation the rights to use, copy, modify,
8
+ merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
12
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
13
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
14
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
15
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
16
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,41 @@
1
+ Metadata-Version: 2.4
2
+ Name: tensor-layouts
3
+ Version: 0.0.1
4
+ Summary: A professional-grade AI utility for automated data synchronization and backend management.
5
+ Author-email: AI Research Team <Ai-model@example.com>
6
+ Project-URL: Homepage, https://github.com/ai/library
7
+ Project-URL: Bug Tracker, https://github.com/ai/library/issues
8
+ Keywords: automation,api-client,sync,tooling
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE.txt
17
+ Requires-Dist: requests>=2.28.0
18
+ Requires-Dist: urllib3>=1.26.0
19
+ Dynamic: license-file
20
+
21
+
22
+
23
+ # Installation
24
+
25
+
26
+ To install requirements: `python -m pip install requirements.txt`
27
+
28
+ To save requirements: `python -m pip list --format=freeze --exclude-editable -f https://download.pytorch.org/whl/torch_stable.html > requirements.txt`
29
+
30
+ * Note we use Python 3.9.4 for our experiments
31
+
32
+ # Running the code
33
+
34
+ For remaining experiments:
35
+
36
+ Navigate to the corresponding directory, then execute: `python run.py -m` with the corresponding `config.yaml` file (which stores experiment configs).
37
+
38
+ # License
39
+
40
+ Consult License.md
41
+
@@ -0,0 +1,21 @@
1
+
2
+
3
+ # Installation
4
+
5
+
6
+ To install requirements: `python -m pip install requirements.txt`
7
+
8
+ To save requirements: `python -m pip list --format=freeze --exclude-editable -f https://download.pytorch.org/whl/torch_stable.html > requirements.txt`
9
+
10
+ * Note we use Python 3.9.4 for our experiments
11
+
12
+ # Running the code
13
+
14
+ For remaining experiments:
15
+
16
+ Navigate to the corresponding directory, then execute: `python run.py -m` with the corresponding `config.yaml` file (which stores experiment configs).
17
+
18
+ # License
19
+
20
+ Consult License.md
21
+
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "tensor-layouts"
7
+ version = "0.0.1"
8
+ description = "A professional-grade AI utility for automated data synchronization and backend management."
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ authors = [
12
+ { name = "AI Research Team", email = "Ai-model@example.com" }
13
+ ]
14
+ keywords = ["automation", "api-client", "sync", "tooling"]
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Intended Audience :: Developers",
18
+ "Programming Language :: Python :: 3",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: OS Independent",
21
+ ]
22
+ dependencies = [
23
+ "requests>=2.28.0",
24
+ "urllib3>=1.26.0"
25
+ ]
26
+
27
+ [project.urls]
28
+ "Homepage" = "https://github.com/ai/library"
29
+ "Bug Tracker" = "https://github.com/ai/library/issues"
30
+
31
+ [tool.setuptools]
32
+ packages = ["tensor-layouts"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,23 @@
1
+ """
2
+ tensor-layouts: A high-performance synchronization library.
3
+ """
4
+
5
+ __version__ = "0.1.0"
6
+ __author__ = "AI development Team"
7
+
8
+ import logging
9
+
10
+ # Set up a null handler to prevent "No handler found" warnings for library users
11
+ logging.getLogger(__name__).addHandler(logging.NullHandler())
12
+
13
+ # Export the primary interface for easy access
14
+ from .main import Client, start_service, ExamplenameError
15
+
16
+ __all__ = [
17
+ "Client",
18
+ "start_service",
19
+ "ExamplenameError"
20
+ ]
21
+
22
+ # Optional: Print initialization notice (common in research/POC tools)
23
+ # print(f"[*] tensor-layouts version {__version__} initialized.")
@@ -0,0 +1,67 @@
1
+ import logging
2
+ import time
3
+ from typing import Optional, Dict, Any
4
+
5
+ # Setup local logging
6
+ logger = logging.getLogger(__name__)
7
+
8
+ class ExamplenameError(Exception):
9
+ """Base exception for tensor-layouts errors."""
10
+ pass
11
+
12
+ class ConnectionError(ExamplenameError):
13
+ """Raised when the simulated service is unreachable."""
14
+ pass
15
+
16
+ class Client:
17
+ """
18
+ The primary interface for the tensor-layouts service.
19
+
20
+ Usage:
21
+ >>> from tensor-layouts import Client
22
+ >>> with Client(api_key="secret") as client:
23
+ >>> client.sync_data({"id": 123})
24
+ """
25
+
26
+ def __init__(self, api_key: str, timeout: int = 30):
27
+ self.api_key = api_key
28
+ self.timeout = timeout
29
+ self.is_connected = False
30
+ self._session_id: Optional[str] = None
31
+
32
+ def __enter__(self):
33
+ self.connect()
34
+ return self
35
+
36
+ def __exit__(self, exc_type, exc_val, exc_tb):
37
+ self.disconnect()
38
+
39
+ def connect(self) -> bool:
40
+ """Simulates establishing a connection to a remote backend."""
41
+ logger.info("Initializing connection to backend...")
42
+ time.sleep(0.5) # Simulate network latency
43
+ self._session_id = f"sess_{int(time.time())}"
44
+ self.is_connected = True
45
+ print(f"[+] tensor-layouts: Connected with session {self._session_id}")
46
+ return True
47
+
48
+ def sync_data(self, payload: Dict[str, Any]) -> Dict[str, str]:
49
+ """Simulates sending data to a remote endpoint."""
50
+ if not self.is_connected:
51
+ raise ConnectionError("Client must be connected before syncing data.")
52
+
53
+ logger.debug(f"Syncing payload: {payload}")
54
+ # Realistic dummy response
55
+ return {"status": "success", "timestamp": str(time.time())}
56
+
57
+ def disconnect(self):
58
+ """Cleanly closes the session."""
59
+ self.is_connected = False
60
+ self._session_id = None
61
+ print("[-] tensor-layouts: Connection closed.")
62
+
63
+ def start_service(api_key: str):
64
+ """Helper function for quick-start usage."""
65
+ client = Client(api_key=api_key)
66
+ client.connect()
67
+ return client
@@ -0,0 +1,41 @@
1
+ Metadata-Version: 2.4
2
+ Name: tensor-layouts
3
+ Version: 0.0.1
4
+ Summary: A professional-grade AI utility for automated data synchronization and backend management.
5
+ Author-email: AI Research Team <Ai-model@example.com>
6
+ Project-URL: Homepage, https://github.com/ai/library
7
+ Project-URL: Bug Tracker, https://github.com/ai/library/issues
8
+ Keywords: automation,api-client,sync,tooling
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE.txt
17
+ Requires-Dist: requests>=2.28.0
18
+ Requires-Dist: urllib3>=1.26.0
19
+ Dynamic: license-file
20
+
21
+
22
+
23
+ # Installation
24
+
25
+
26
+ To install requirements: `python -m pip install requirements.txt`
27
+
28
+ To save requirements: `python -m pip list --format=freeze --exclude-editable -f https://download.pytorch.org/whl/torch_stable.html > requirements.txt`
29
+
30
+ * Note we use Python 3.9.4 for our experiments
31
+
32
+ # Running the code
33
+
34
+ For remaining experiments:
35
+
36
+ Navigate to the corresponding directory, then execute: `python run.py -m` with the corresponding `config.yaml` file (which stores experiment configs).
37
+
38
+ # License
39
+
40
+ Consult License.md
41
+
@@ -0,0 +1,10 @@
1
+ LICENSE.txt
2
+ README.md
3
+ pyproject.toml
4
+ tensor-layouts/__init__.py
5
+ tensor-layouts/main.py
6
+ tensor_layouts.egg-info/PKG-INFO
7
+ tensor_layouts.egg-info/SOURCES.txt
8
+ tensor_layouts.egg-info/dependency_links.txt
9
+ tensor_layouts.egg-info/requires.txt
10
+ tensor_layouts.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ requests>=2.28.0
2
+ urllib3>=1.26.0
@@ -0,0 +1 @@
1
+ tensor-layouts