pipeline.objects.environment.Environment( environment_name: str = None, dependencies: List[str] = , )
Environment object for creating and managing pipeline dependencies and virtual environments.
str, optional) - name of the environment.
List[str], optional) - dependencies for the environment.
requirements.txt file from the dependencies listed in the
str, optional) - the directory to write the
Add an additional dependency to the environment.
str) - the dependency package string to add to the dependency list.
Environment object from a
str) - the path to the requirements file to extract dependencies from.
str, optional) - the name for the environment.
Environment object with dependencies from the environment currently being used.
str, optional) - name for the environment.
from pipeline.objects.environment import Environment # Create a basic env with the minimum transformers dependencies env = Environment( "transformers-env", dependencies=[ "transformers==4.24.0", "torch==1.13.0", ], ) # Write dependencies to file env.to_requirements()
Updated 2 months ago