experimaestro 1.4.0__py3-none-any.whl → 1.4.2__py3-none-any.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 experimaestro might be problematic. Click here for more details.

experimaestro/__init__.py CHANGED
@@ -27,7 +27,7 @@ from .annotations import (
27
27
  # Method
28
28
  config_only,
29
29
  )
30
- from .core.serialization import load, save, state_dict, from_state_dict
30
+ from .core.serialization import load, save, state_dict, from_state_dict, from_task_dir
31
31
  from .core.arguments import (
32
32
  # Types
33
33
  Param,
@@ -76,6 +76,9 @@ class Identifier:
76
76
 
77
77
  return Identifier(bytes.fromhex(data["main"]))
78
78
 
79
+ def __repr__(self):
80
+ return self.main.hex()
81
+
79
82
 
80
83
  def is_ignored(value):
81
84
  """Returns True if the value should be ignored by itself"""
@@ -112,3 +112,17 @@ def load(
112
112
  with data_loader("definition.json").open("rt") as fh:
113
113
  content = json.load(fh)
114
114
  return from_state_dict(content, as_instance=as_instance)
115
+
116
+
117
+ def from_task_dir(
118
+ path: Union[str, Path, SerializedPathLoader],
119
+ as_instance: bool = False,
120
+ ):
121
+ """Loads a task object"""
122
+ data_loader = get_data_loader(path)
123
+ with data_loader("params.json").open("rt") as fh:
124
+ content = json.load(fh)
125
+
126
+ content["data"] = {"type": "python", "value": content["objects"][-1]["id"]}
127
+
128
+ return from_state_dict(content, as_instance=as_instance)
@@ -10,7 +10,7 @@ class TaskSequence(Task):
10
10
 
11
11
  @property
12
12
  def __identifier__(self):
13
- return self.tasks[-1].__identifier__
13
+ return self.tasks[-1].__identifier__()
14
14
 
15
15
  def execute(self):
16
16
  self.tasks[-1].__tags__ = self.__tags__
@@ -33,6 +33,17 @@ class ExperimentHelper:
33
33
  assert len(args) == 0
34
34
  self.callable(self, configuration)
35
35
 
36
+ @classmethod
37
+ def decorator(cls, *args, **kwargs):
38
+ """Decorator for the run(helper, configuration) method"""
39
+ if len(args) == 1 and len(kwargs) == 0 and inspect.isfunction(args[0]):
40
+ return cls(callable)
41
+
42
+ def wrapper(callable):
43
+ return cls(callable)
44
+
45
+ return wrapper
46
+
36
47
 
37
48
  class ExperimentCallable(Protocol):
38
49
  """Protocol for the run function"""
@@ -28,5 +28,5 @@ class ConfigurationBase:
28
28
  file: str = "experiment"
29
29
  """qualified name (relative to the module) for the file containing a run function"""
30
30
 
31
- parent: Optional[str]
31
+ parent: Optional[str] = None
32
32
  """Relative path of a YAML file that should be merged"""
@@ -953,7 +953,6 @@ class experiment:
953
953
  """Adds a service (e.g. tensorboard viewer) to the experiment
954
954
 
955
955
  :param service: A service instance
956
- :type service: Service
957
956
  :return: The same service instance
958
957
  """
959
958
  self.services[service.id] = service
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: experimaestro
3
- Version: 1.4.0
3
+ Version: 1.4.2
4
4
  Summary: "Experimaestro is a computer science experiment manager"
5
5
  Home-page: https://github.com/experimaestro/experimaestro-python
6
6
  License: GPL-3
@@ -53,16 +53,19 @@ Project-URL: Repository, https://github.com/experimaestro/experimaestro-python
53
53
  Description-Content-Type: text/markdown
54
54
 
55
55
  [![PyPI version](https://badge.fury.io/py/experimaestro.svg)](https://badge.fury.io/py/experimaestro)
56
+ [![RTD](https://readthedocs.org/projects/experimaestro-python/badge/?version=latest)](https://experimaestro-python.readthedocs.io)
56
57
 
57
- Experimaestro is a computer science experiment manager whose goals are:
58
+ Experimaestro helps in designing and managing complex workflows. It allows for the definition of tasks and their dependencies, ensuring that each step in a workflow is executed in the correct order. Some key aspects of Experimaestro are:
58
59
 
59
- - To decompose experiments into a set of parameterizable tasks
60
- - Schedule tasks and handle dependencies between tasks
61
- - Avoids to re-run the same task two times by computing unique task IDs dependending on the parameters
62
- - Handle experimental parameters through tags
60
+ - **Task Automation**: The tool automates repetitive tasks, making it easier to run large-scale experiments. It's particularly useful in scenarios where experiments need to be repeated with different parameters or datasets.
61
+ - **Resource Management**: It efficiently manages computational resources, which is critical when dealing with data-intensive tasks or when running multiple experiments in parallel.
62
+ - **Extensibility**: Experimaestro is designed to be flexible and extensible, allowing users to integrate it with various programming languages and tools commonly used in data science and research.
63
+ - **Reproducibility**: By keeping a detailed record of experiments, including parameters and environments, it aids in ensuring the reproducibility of scientific experiments, which is a fundamental requirement in research.
64
+ - **User Interface**: While primarily a back-end tool, Experimaestro also offers a user interface to help in managing and visualizing workflows.
63
65
 
64
66
  The full documentation can be read by going to the following URL: [https://experimaestro-python.readthedocs.io](https://experimaestro-python.readthedocs.io)
65
67
 
68
+
66
69
  # Install
67
70
 
68
71
  ## With pip
@@ -1,4 +1,4 @@
1
- experimaestro/__init__.py,sha256=TURptLVx9XunBd01lO4TYZACrP5rnMRnh_XE0T0_MwQ,1533
1
+ experimaestro/__init__.py,sha256=5T8NC2WvqlCRXV4qSW4-_V42owXQs_YpXbEP6vLZN7E,1548
2
2
  experimaestro/__main__.py,sha256=iRi6yRJVcthXRTVnHQB0TNOKTRmKjdnX6yIQaf-z79o,13528
3
3
  experimaestro/annotations.py,sha256=dcpFmo01T12S_y5nIBIQjiXsGsq5S80ZB-58o8tW9wA,8450
4
4
  experimaestro/checkers.py,sha256=ZCMbnE_GFC5compWjt-fuHhPImi9fCPjImF8Ow9NqK8,696
@@ -11,15 +11,15 @@ experimaestro/connectors/ssh.py,sha256=A6qObY_phynZVQFdAsyymP9c0fiUHwn04nShROzMr
11
11
  experimaestro/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  experimaestro/core/arguments.py,sha256=dW32opqNEsULYr6nR7Zk8PqHsSCbLPclfXofw27GTpI,5620
13
13
  experimaestro/core/context.py,sha256=Q8_ngiHRBZ0laavXRJNiDvdCprrnROVTWaHfrwMdlG4,2638
14
- experimaestro/core/objects.py,sha256=AuviYnITYuoKkj2MR6ovyU7cMl8BgJfXp5yAKaunlJo,62571
14
+ experimaestro/core/objects.py,sha256=UeQJmJ4597T89mjxNauGbnnfeiPkG4ifmoZuKDoi2Ds,62627
15
15
  experimaestro/core/objects.pyi,sha256=D8-kd-NU-pRl9-_ktXUne_k1YH6TG3VGqRaKV8mrZwk,7003
16
- experimaestro/core/serialization.py,sha256=nLlSSqerH9lqiWvqkCxz0YRRW8M1y56ainZ9_GVgTMk,3432
16
+ experimaestro/core/serialization.py,sha256=9tg5ebLF3YeZ_zG9DiTHPLthppvo7io710ohD_dcLTo,3836
17
17
  experimaestro/core/serializers.py,sha256=R_CAMyjjfU1oi-eHU6VlEUixJpFayGqEPaYu7VsD9xA,1197
18
18
  experimaestro/core/types.py,sha256=jQGlyC1xnsZ5NKct3FELIcXcXQMvNQvauCEuumyfBz8,19253
19
- experimaestro/core/utils.py,sha256=jKmZqovj5BhmWQ0rXd3YFToSbIFTylC48NhCwxo3QfU,493
19
+ experimaestro/core/utils.py,sha256=JfC3qGUS9b6FUHc2VxIYUI9ysNpXSQ1LjOBkjfZ8n7o,495
20
20
  experimaestro/experiments/__init__.py,sha256=GcpDUIbCvhnv6rxFdAp4wTffCVNTv-InY6fbQAlTy-o,159
21
- experimaestro/experiments/cli.py,sha256=QJ04wB0O3O0X0SEHM-Y8peA74lE1WIDesbk9_RsghL0,6216
22
- experimaestro/experiments/configuration.py,sha256=bwoszuFWFT2fmaL7RNefNschBGpydDQkSgcSmLJ8gek,787
21
+ experimaestro/experiments/cli.py,sha256=ftAo8Km0WM_CuooBvFMZXhNgTtisGkLajEPDWlTF3cg,6543
22
+ experimaestro/experiments/configuration.py,sha256=xdDzoLSN3m2bOdvYuWisLzOi_Bno4zGOQydi5q3IcHk,794
23
23
  experimaestro/filter.py,sha256=DN1PrmS9yXoOa5Xnv001zbxzpdzvcVZFI9xZFKZ1-6g,5794
24
24
  experimaestro/generators.py,sha256=9NQ_TfDfASkArLnO4PF7s5Yoo9KWjlna2DCPzk5gJOI,1230
25
25
  experimaestro/huggingface.py,sha256=gnVlr6SZnbutYz4PLH0Q77n1TRF-uk-dR-3UFzFqAY0,2956
@@ -48,7 +48,7 @@ experimaestro/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
48
  experimaestro/rpyc.py,sha256=ZRKol-3tVoeoUITLNFenLF4dhWBLW_FvSV_GvsypmeI,3605
49
49
  experimaestro/run.py,sha256=tH9oG7o8_c7cp0cyBLIzWN7CVYjtz72SChz2X-FjYhs,4455
50
50
  experimaestro/scheduler/__init__.py,sha256=ERmmOxz_9mUkIuccNbzUa5Y6gVLLVDdyc4cCxbCCUbY,20
51
- experimaestro/scheduler/base.py,sha256=B4L3E-TnNjt0kutaEVrnA3-rTpoCfuXZO9rzH28phNI,30945
51
+ experimaestro/scheduler/base.py,sha256=l-DPZJQMNHr-pbUwfLJbGS7Wp9jX1m9I9cLwdS5xbZ8,30914
52
52
  experimaestro/scheduler/dependencies.py,sha256=n9XegwrmjayOIxt3xhuTEBVEBGSq4oeVdzz-FviDGXo,1994
53
53
  experimaestro/scheduler/environment.py,sha256=ZaSHSgAcZBmIj7b_eS1OvNQOuVLFvuw-qvqtYrc3Vms,2393
54
54
  experimaestro/scheduler/services.py,sha256=aCKkNZMULlceabqf-kOs_-C7KPINnjU3Q-I00o5x6iY,2189
@@ -140,8 +140,8 @@ experimaestro/utils/resources.py,sha256=gDjkrRjo7GULWyXmNXm_u1uqzEIAoAvJydICk56n
140
140
  experimaestro/utils/settings.py,sha256=jpFMqF0DLL4_P1xGal0zVR5cOrdD8O0Y2IOYvnRgN3k,793
141
141
  experimaestro/utils/yaml.py,sha256=jEjqXqUtJ333wNUdIc0o3LGvdsTQ9AKW9a9CCd-bmGU,6766
142
142
  experimaestro/xpmutils.py,sha256=S21eMbDYsHfvmZ1HmKpq5Pz5O-1HnCLYxKbyTBbASyQ,638
143
- experimaestro-1.4.0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
144
- experimaestro-1.4.0.dist-info/METADATA,sha256=XWQCmuYMI4mGENdtGlEA7p0D4enym4BV3laNFmW8Kc0,5336
145
- experimaestro-1.4.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
146
- experimaestro-1.4.0.dist-info/entry_points.txt,sha256=PhaEili_fDgn5q7rBJGip_uhGkRBq5l3Yuhg91zkcbk,574
147
- experimaestro-1.4.0.dist-info/RECORD,,
143
+ experimaestro-1.4.2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
144
+ experimaestro-1.4.2.dist-info/METADATA,sha256=zETYgTyjliPNfJlhX6yDfX0y9cldKWZyREc6kJcslxM,6338
145
+ experimaestro-1.4.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
146
+ experimaestro-1.4.2.dist-info/entry_points.txt,sha256=PhaEili_fDgn5q7rBJGip_uhGkRBq5l3Yuhg91zkcbk,574
147
+ experimaestro-1.4.2.dist-info/RECORD,,