Skip to content

Add a library to sync conda environments #628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrewjcg
Copy link
Contributor

Summary:
This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...

As rsync (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:

  1. In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location). This crate uses the pack-meta/history.jsonl file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
  2. Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 23, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78424481

andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 23, 2025
Summary:

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 23, 2025
Summary:

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 23, 2025
Summary:

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 23, 2025
Summary:

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78424481

andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 23, 2025
Summary:
Pull Request resolved: pytorch-labs#628

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78424481

andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 23, 2025
Summary:
Pull Request resolved: pytorch-labs#628

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 23, 2025
Summary:
Pull Request resolved: pytorch-labs#628

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78424481

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78424481

andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 23, 2025
Summary:
Pull Request resolved: pytorch-labs#628

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
@andrewjcg andrewjcg force-pushed the export-D78424481 branch 2 times, most recently from 93d5b7c to 6636535 Compare July 25, 2025 14:28
andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 25, 2025
Summary:

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 25, 2025
Summary:

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78424481

andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 25, 2025
Summary:
Pull Request resolved: pytorch-labs#628

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 25, 2025
Summary:

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 25, 2025
Summary:

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78424481

andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 25, 2025
Summary:
Pull Request resolved: pytorch-labs#628

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78424481

andrewjcg added a commit to andrewjcg/monarch that referenced this pull request Jul 25, 2025
Summary:
Pull Request resolved: pytorch-labs#628

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
Summary:
Pull Request resolved: pytorch-labs#628

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78424481

highker pushed a commit to highker/monarch that referenced this pull request Aug 4, 2025
Summary:
Pull Request resolved: pytorch-labs#628

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
highker pushed a commit to highker/monarch that referenced this pull request Aug 6, 2025
Summary:
Pull Request resolved: pytorch-labs#628

This adds a crate to do rsync-style syncing of a source conda env to a
destination, as per:

```
$ rsync --archive --update --no-dirtimes --delete --delete-excluded ...
```

As `rsync` (and this crate) uses mtimes for syncing, it'll work even with the
differences in prefixes between source and destination conda envs.

The notable differences with rsync are:
1) In current flows, when users "activate" their conda env locally, prefixes in
    the env will be quickly re-written, changing mtimes to be ahead of the
    destination (e.g. on MAST, the conda env is unpacked into it's expected
    prefix location).  This crate uses the `pack-meta/history.jsonl` file to detect
    prefix update windows and use that to filter out these sprurious mtime updates.
2) Files that are copied perform in-place prefix replacement (TODO: not finished
    yet).

Differential Revision: D78424481
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants