Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pypi][bug fix] dependency comparison operator fix
- Earlier the micromamba package solver would just statically set `{package}=={version}` - But some packages have a version which may not be pinned such as `boto3` / `requests` - This can cause package resolution to fail with errors like this : ``` Bootstrapping virtual environment(s) ... Micromamba ran into an error while setting up environment: command '/home/ubuntu/.local/bin/micromamba create --yes --quiet --dry-run --no-extra-safety-checks --repodata-ttl=86400 --retry-clean-cache --prefix=/tmp/tmp46ih0kgy/prefix --channel=conda-forge requests==>=2.21.0 boto3==>=1.14.0 python==3.10.12' ``` - this commit tries to handle different scenarios where different operators maybe specified in the `version` value of `packages` dictionary. Test Flow to verify the fix (Try running before this commit and then after this commit): ``` from metaflow import FlowSpec, step, pypi class PypiPackageFailFlow(FlowSpec): @pypi(packages={"huggingface-hub":"0.16.4"}) @step def start(self): print('Starting') self.next(self.end) @step def end(self): pass if __name__ == "__main__": PypiPackageFailFlow() ```
- Loading branch information