experimaestro 0.22.0__zip → 0.24.0__zip
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-0.22.0 → experimaestro-0.24.0}/CHANGELOG.md +21 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/PKG-INFO +22 -1
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/experiments/task.md +45 -7
- {experimaestro-0.22.0 → experimaestro-0.24.0}/pyproject.toml +1 -1
- {experimaestro-0.22.0 → experimaestro-0.24.0}/requirements.txt +6 -3
- {experimaestro-0.22.0 → experimaestro-0.24.0}/setup.cfg +1 -1
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/__init__.py +7 -5
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/__main__.py +3 -3
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/commandline.py +0 -8
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/core/objects.py +218 -164
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/core/objects.pyi +25 -11
- experimaestro-0.24.0/src/experimaestro/core/serializers.py +52 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/core/types.py +44 -2
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/generators.py +7 -6
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/huggingface.py +2 -2
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/launchers/__init__.py +19 -7
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/scheduler/base.py +21 -3
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/server/__init__.py +10 -2
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_identifier.py +33 -6
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_instance.py +18 -15
- experimaestro-0.24.0/src/experimaestro/tests/test_outputs.py +50 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_progress.py +7 -9
- experimaestro-0.24.0/src/experimaestro/tests/test_serializers.py +54 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/utils/jobs.py +2 -2
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/version.py +2 -2
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/xpmutils.py +3 -3
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro.egg-info/PKG-INFO +22 -1
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro.egg-info/SOURCES.txt +2 -1
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro.egg-info/requires.txt +6 -2
- experimaestro-0.22.0/src/experimaestro/tests/test_outputs.py +0 -88
- experimaestro-0.22.0/src/experimaestro/tests/test_serialization.py +0 -45
- {experimaestro-0.22.0 → experimaestro-0.24.0}/.circleci/config.yml +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/.flake8 +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/.github/release.yaml +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/.github/workflows/pytest.yml +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/.github/workflows/python-publish.yml +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/.gitignore +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/.gitmodules +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/.pre-commit-config.yaml +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/.prettierignore +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/.readthedocs.yml +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/LICENSE +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/MANIFEST.in +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/README.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/.gitignore +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/.nolluprc.js +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/CHANGELOG.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/README.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/package-lock.json +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/package.json +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/postcss.config.js +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/public/favicon.ico +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/public/index.html +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/public/login.html +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/public/manifest.json +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/App.tsx +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/Experiments.tsx +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/Services.tsx +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/TaskDetail.tsx +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/TaskJobs.tsx +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/Tasks.tsx +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/client.ts +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/clipboard.ts +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/index.css +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/index.tsx +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/logo.png +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/logo.pxm +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/reducers.ts +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/store.ts +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/theme/_jobs.scss +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/theme/theme.scss +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/src/ui/messages.tsx +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/tsconfig.json +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/webpack.config.ts +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/app/xp/run.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/changelog.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/cli.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/concepts.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/configuration.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/connectors/index.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/documenting.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/experiments/config.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/experiments/overview.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/experiments/plan.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/faq.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/index.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/jupyter.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/launchers/index.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/requirements.txt +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/serialization.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/docs/tutorial.md +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/mkdocs.yml +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/pytest.ini +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/scripts/longtask.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/setup.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/annotations.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/checkers.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/click.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/compat.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/connectors/__init__.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/connectors/local.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/connectors/ssh.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/core/__init__.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/core/arguments.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/core/context.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/filter.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/ipc.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/launcherfinder/__init__.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/launcherfinder/base.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/launcherfinder/parser.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/launcherfinder/registry.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/launcherfinder/specs.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/launchers/direct.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/launchers/oar.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/launchers/slurm.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/locking.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/mkdocs/__init__.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/mkdocs/annotations.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/mkdocs/base.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/mkdocs/metaloader.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/mkdocs/style.css +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/mypy.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/notifications.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/rpyc.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/run.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/scheduler/__init__.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/scheduler/dependencies.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/scheduler/environment.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/scheduler/services.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/scheduler/workspace.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/scriptbuilder.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/settings.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/sphinx/__init__.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/sphinx/static/experimaestro.css +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/taskglobals.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/__init__.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/conftest.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/connectors/bin/executable.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/connectors/test_local.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/connectors/utils.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/definitions_types.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/launchers/__init__.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/launchers/bin/sacct +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/launchers/bin/sbatch +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/launchers/bin/test.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/launchers/common.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/launchers/config_slurm/__init__.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/launchers/config_slurm/launchers.yaml +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/launchers/test_local.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/launchers/test_slurm.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/restart.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/restart_main.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/scripts/notifyandwait.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/scripts/waitforfile.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/task_tokens.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/tasks/__init__.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/tasks/all.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/tasks/foreign.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/tasks/subparams.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_checkers.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_findlauncher.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_forward.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_objects.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_param.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_snippets.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_ssh.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_tags.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_tasks.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_tokens.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_types.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/test_validation.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/token_reschedule.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/utils.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tokens.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tools/__init__.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tools/diff.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tools/jobs.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/typingutils.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/utils/__init__.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/utils/asyncio.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/utils/jupyter.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/utils/resources.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/utils/settings.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/utils/yaml.py +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro.egg-info/dependency_links.txt +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro.egg-info/entry_points.txt +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro.egg-info/not-zip-safe +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro.egg-info/top_level.txt +0 -0
- {experimaestro-0.22.0 → experimaestro-0.24.0}/tox.ini +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
from experimaestro import Config, Task, Param, PathBasedSerializedConfig, copyconfig
|
|
2
|
+
from experimaestro.tests.utils import TemporaryExperiment
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class SubModel(Config):
|
|
6
|
+
pass
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Model(Config):
|
|
10
|
+
submodel: Param[SubModel]
|
|
11
|
+
|
|
12
|
+
def __post_init__(self):
|
|
13
|
+
self.initialized = False
|
|
14
|
+
self.submodel.initialized = False
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class SerializedModel(PathBasedSerializedConfig):
|
|
18
|
+
def initialize(self):
|
|
19
|
+
self.config.initialized = True
|
|
20
|
+
self.config.submodel.initialized = True
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Trainer(Task):
|
|
24
|
+
model: Param[Config]
|
|
25
|
+
|
|
26
|
+
def taskoutputs(self):
|
|
27
|
+
return SerializedModel(config=copyconfig(self.model))
|
|
28
|
+
|
|
29
|
+
def execute(self):
|
|
30
|
+
assert not self.model.initialized, "Model not initialized"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class Evaluate(Task):
|
|
34
|
+
model: Param[Config]
|
|
35
|
+
is_submodel: Param[bool] = False
|
|
36
|
+
|
|
37
|
+
def execute(self):
|
|
38
|
+
assert self.model.initialized, "Model not initialized"
|
|
39
|
+
if self.is_submodel:
|
|
40
|
+
assert isinstance(self.model, SubModel)
|
|
41
|
+
else:
|
|
42
|
+
assert isinstance(self.model, Model)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def test_serializers_xp():
|
|
46
|
+
with TemporaryExperiment("serializers", maxwait=10, port=0):
|
|
47
|
+
model = Model(submodel=SubModel())
|
|
48
|
+
trained_model: Model = Trainer(model=model).submit()
|
|
49
|
+
|
|
50
|
+
# Use the model itself
|
|
51
|
+
Evaluate(model=trained_model).submit()
|
|
52
|
+
|
|
53
|
+
# Use a submodel
|
|
54
|
+
Evaluate(model=trained_model.submodel, is_submodel=True).submit()
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import time
|
|
2
2
|
from experimaestro.scheduler import JobState
|
|
3
|
-
from experimaestro.core.objects import
|
|
3
|
+
from experimaestro.core.objects import ConfigWrapper
|
|
4
4
|
from experimaestro.scheduler import Listener
|
|
5
5
|
from threading import Condition
|
|
6
6
|
from tqdm.autonotebook import tqdm
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
def jobmonitor(*outputs:
|
|
9
|
+
def jobmonitor(*outputs: ConfigWrapper):
|
|
10
10
|
"""Follow the progress of a list of jobs (in order)"""
|
|
11
11
|
|
|
12
12
|
cv = Condition()
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"""Utilities exposed to users of the experimaestro API"""
|
|
2
2
|
|
|
3
3
|
from pathlib import Path
|
|
4
|
-
from experimaestro.core.objects import
|
|
4
|
+
from experimaestro.core.objects import ConfigWalkContext
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
class DirectoryContext(
|
|
7
|
+
class DirectoryContext(ConfigWalkContext):
|
|
8
8
|
"""Special generation context used for debugging and testing"""
|
|
9
9
|
|
|
10
10
|
def __init__(self, path: Path):
|
|
@@ -16,7 +16,7 @@ class DirectoryContext(GenerationContext):
|
|
|
16
16
|
return self._path
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class EmptyContext(
|
|
19
|
+
class EmptyContext(ConfigWalkContext):
|
|
20
20
|
"""Special generation context used for debugging and testing"""
|
|
21
21
|
|
|
22
22
|
@property
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: experimaestro
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.24.0
|
|
4
4
|
Summary: "Experimaestro is a computer science experiment manager"
|
|
5
5
|
Home-page: https://github.com/experimaestro/experimaestro-python
|
|
6
6
|
Author: Benjamin Piwowarski
|
|
@@ -127,6 +127,27 @@ if __name__ == "__main__":
|
|
|
127
127
|
|
|
128
128
|
which can be launched with `python test.py /tmp/helloworld-workdir`
|
|
129
129
|
|
|
130
|
+
## 0.24.0 (2023-05-23)
|
|
131
|
+
|
|
132
|
+
### Feat
|
|
133
|
+
|
|
134
|
+
- serialized configurations
|
|
135
|
+
|
|
136
|
+
### Fix
|
|
137
|
+
|
|
138
|
+
- requirement for fabric
|
|
139
|
+
- add gevent-websocket for supporting websockets
|
|
140
|
+
|
|
141
|
+
### Refactor
|
|
142
|
+
|
|
143
|
+
- Changed TaskOutput to ConfigWrapper
|
|
144
|
+
|
|
145
|
+
## 0.23.0 (2023-04-07)
|
|
146
|
+
|
|
147
|
+
### Feat
|
|
148
|
+
|
|
149
|
+
- submit hooks to allow e.g. changing the environment variables
|
|
150
|
+
|
|
130
151
|
## 0.22.0 (2023-04-05)
|
|
131
152
|
|
|
132
153
|
### Feat
|
|
@@ -106,6 +106,7 @@ src/experimaestro/core/arguments.py
|
|
|
106
106
|
src/experimaestro/core/context.py
|
|
107
107
|
src/experimaestro/core/objects.py
|
|
108
108
|
src/experimaestro/core/objects.pyi
|
|
109
|
+
src/experimaestro/core/serializers.py
|
|
109
110
|
src/experimaestro/core/types.py
|
|
110
111
|
src/experimaestro/launcherfinder/__init__.py
|
|
111
112
|
src/experimaestro/launcherfinder/base.py
|
|
@@ -145,7 +146,7 @@ src/experimaestro/tests/test_objects.py
|
|
|
145
146
|
src/experimaestro/tests/test_outputs.py
|
|
146
147
|
src/experimaestro/tests/test_param.py
|
|
147
148
|
src/experimaestro/tests/test_progress.py
|
|
148
|
-
src/experimaestro/tests/
|
|
149
|
+
src/experimaestro/tests/test_serializers.py
|
|
149
150
|
src/experimaestro/tests/test_snippets.py
|
|
150
151
|
src/experimaestro/tests/test_ssh.py
|
|
151
152
|
src/experimaestro/tests/test_tags.py
|
|
@@ -12,17 +12,21 @@ sortedcontainers
|
|
|
12
12
|
pyparsing
|
|
13
13
|
humanfriendly
|
|
14
14
|
huggingface_hub~=0.11.1
|
|
15
|
-
|
|
15
|
+
gevent
|
|
16
|
+
gevent-websocket
|
|
16
17
|
flask
|
|
17
18
|
flask-socketio
|
|
18
19
|
Arpeggio>=2.0
|
|
19
20
|
watchdog>2.0.0
|
|
20
21
|
marshmallow
|
|
21
22
|
fabric
|
|
23
|
+
decorator
|
|
22
24
|
rpyc
|
|
23
25
|
|
|
26
|
+
[:python_version < "3.11"]
|
|
27
|
+
typing_extensions>=4.2
|
|
28
|
+
|
|
24
29
|
[:python_version < "3.9"]
|
|
25
|
-
typing_extensions>=3.7.4.3
|
|
26
30
|
cached_property
|
|
27
31
|
|
|
28
32
|
[dev]
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"""Test for task outputs"""
|
|
2
|
-
|
|
3
|
-
from experimaestro import Config, Task, Param
|
|
4
|
-
from experimaestro.core.objects import SerializedConfig, Serialized, TaskOutput
|
|
5
|
-
from experimaestro.scheduler.workspace import RunMode
|
|
6
|
-
from experimaestro.tests.utils import TemporaryExperiment
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class B(Config):
|
|
10
|
-
x: Param[int] = 1
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class A(Config):
|
|
14
|
-
b: Param[B]
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class LoaderA(Serialized):
|
|
18
|
-
@staticmethod
|
|
19
|
-
def fromJSON(x) -> A:
|
|
20
|
-
return A(b=B(x=x)).instance()
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class Main(Task):
|
|
24
|
-
a: Param[A]
|
|
25
|
-
|
|
26
|
-
def taskoutputs(self):
|
|
27
|
-
return self.a, {
|
|
28
|
-
"a": self.a,
|
|
29
|
-
"serialized": SerializedConfig(self.a, LoaderA(self.a.b.x)),
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
def execute(self):
|
|
33
|
-
print(self.a.b.x) # noqa: T201
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class MainB(Task):
|
|
37
|
-
b: Param[B]
|
|
38
|
-
|
|
39
|
-
def execute(self):
|
|
40
|
-
pass
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def test_output_taskoutput():
|
|
44
|
-
a = A(b=B())
|
|
45
|
-
output, ioutput = Main(a=a).submit(run_mode=RunMode.DRY_RUN)
|
|
46
|
-
|
|
47
|
-
assert isinstance(ioutput["serialized"], TaskOutput)
|
|
48
|
-
assert isinstance(output, TaskOutput), "outputs should be task proxies"
|
|
49
|
-
|
|
50
|
-
# Direct
|
|
51
|
-
Main(a=output)
|
|
52
|
-
|
|
53
|
-
# Via getattr
|
|
54
|
-
Main(a=A(b=output.b))
|
|
55
|
-
|
|
56
|
-
# Via getitem
|
|
57
|
-
Main(a=ioutput["a"])
|
|
58
|
-
|
|
59
|
-
# Now, submits
|
|
60
|
-
Main(a=output).submit(run_mode=RunMode.DRY_RUN)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
def test_output_serialization():
|
|
64
|
-
"""Test output serialization"""
|
|
65
|
-
|
|
66
|
-
with TemporaryExperiment("output_serialization", maxwait=5) as xp:
|
|
67
|
-
a = A(b=B(x=2))
|
|
68
|
-
|
|
69
|
-
main0 = Main(a=a)
|
|
70
|
-
output, ioutput = main0.submit()
|
|
71
|
-
|
|
72
|
-
# Direct
|
|
73
|
-
serialized_a = ioutput["serialized"]
|
|
74
|
-
main1 = Main(a=serialized_a)
|
|
75
|
-
main1.submit()
|
|
76
|
-
|
|
77
|
-
# Indirect (via attribute)
|
|
78
|
-
serialized_a = ioutput["serialized"]
|
|
79
|
-
main2 = Main(a=A(b=serialized_a.b))
|
|
80
|
-
main2.submit()
|
|
81
|
-
|
|
82
|
-
xp.wait()
|
|
83
|
-
|
|
84
|
-
for main in (main1, main2):
|
|
85
|
-
assert main.__xpm__.job.stdout.read_text().strip() == "2"
|
|
86
|
-
assert len(main.__xpm__.job.dependencies) == 1
|
|
87
|
-
dep = next(iter(main.__xpm__.job.dependencies))
|
|
88
|
-
assert dep.origin.config is main0
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Test post-experimental serialization
|
|
2
|
-
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
from experimaestro import Config, DataPath, Task, Param
|
|
5
|
-
from experimaestro.core.objects import ConfigInformation
|
|
6
|
-
from experimaestro.scheduler.workspace import RunMode
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class A(Config):
|
|
10
|
-
path: DataPath[Path]
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class TaskA(Task):
|
|
14
|
-
id: Param[str]
|
|
15
|
-
|
|
16
|
-
def taskoutputs(self):
|
|
17
|
-
return A()
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def test_serialization_simple(tmp_path_factory):
|
|
21
|
-
dir = tmp_path_factory.mktemp("ser")
|
|
22
|
-
|
|
23
|
-
a = A(path=Path(__file__))
|
|
24
|
-
a.__xpm__.serialize(dir)
|
|
25
|
-
|
|
26
|
-
des_a = ConfigInformation.deserialize(dir)
|
|
27
|
-
assert des_a.path != Path(__file__)
|
|
28
|
-
assert des_a.path.read_text() == Path(__file__).read_text()
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
def test_serialization_identifier(tmp_path_factory):
|
|
32
|
-
dir = tmp_path_factory.mktemp("ser")
|
|
33
|
-
|
|
34
|
-
a = TaskA(id="id").submit(run_mode=RunMode.DRY_RUN)
|
|
35
|
-
a = a.__unwrap__()
|
|
36
|
-
a.__xpm__.serialize(dir)
|
|
37
|
-
|
|
38
|
-
des_a = ConfigInformation.deserialize(dir)
|
|
39
|
-
|
|
40
|
-
des_a_id = des_a.__identifier__()
|
|
41
|
-
|
|
42
|
-
assert des_a_id.all == a.__identifier__().all, (
|
|
43
|
-
"Identifier don't match: "
|
|
44
|
-
f"expected {a.__identifier__().all.hex()}, got {des_a_id.all.hex()}"
|
|
45
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/sphinx/static/experimaestro.css
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/connectors/bin/executable.py
RENAMED
|
File without changes
|
{experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/connectors/test_local.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/launchers/test_local.py
RENAMED
|
File without changes
|
{experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/launchers/test_slurm.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{experimaestro-0.22.0 → experimaestro-0.24.0}/src/experimaestro/tests/scripts/notifyandwait.py
RENAMED
|
File without changes
|