Skip to content
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

Add --build-arg argument to compile and run commands #306

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

RobbeSneyders
Copy link
Member

Fixes #305

Can be used to test a pipeline with fondant installed from a specific git hash available on github:

fondant run pipeline:pipeline --local --build-arg FONDANT_VERSION=551f7b1

@@ -228,6 +234,7 @@ def compile(args):
pipeline=args.pipeline,
extra_volumes=args.extra_volumes,
output_path=args.output_path,
build_args=args.build_arg,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason we have build_args (plural) here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There can be multiple build arguments, but the command line is --build-arg since you provide them one at a time.

Eg. --build-arg FONDANT_VERSION=a8b9fd --build-arg CUSTOM_ARG=value becomes build_args = ["FONANT_VERSION=a8b9fd", "CUSTOM_ARG=value"]

@@ -35,7 +35,7 @@ def __init__(
"""
self.client = ClipClient(
url=url,
indice_name="laion5B", #TODO:revert back to laion5b-L-14 after backend correction
indice_name="laion5B-L-14",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi: this will only work for the public service atm. @ChristiaensBert did you do the backed modifications?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I reverted the arguments to the public service as well. Seems most logical to include in our example so users can easily test it on a small scale.

)

class NoAliasDumper(yaml.SafeDumper):
def ignore_aliases(self, data):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you briefly explain why we need this ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise it creates the build arguments as an anchor and refers to it everywhere with an alias. It also uses random numbers as name for this, which reduces readability of the docker-compose.yaml.

@RobbeSneyders RobbeSneyders merged commit 37864f4 into main Jul 20, 2023
@RobbeSneyders RobbeSneyders deleted the feature/build-args branch July 20, 2023 08:19
satishjasthi pushed a commit to satishjasthi/fondant that referenced this pull request Jul 21, 2023
Fixes ml6team#305 

Can be used to test a pipeline with fondant installed from a specific
git hash available on github:
```bash
fondant run pipeline:pipeline --local --build-arg FONDANT_VERSION=551f7b1
```
Hakimovich99 pushed a commit that referenced this pull request Oct 16, 2023
Fixes #305 

Can be used to test a pipeline with fondant installed from a specific
git hash available on github:
```bash
fondant run pipeline:pipeline --local --build-arg FONDANT_VERSION=551f7b1
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --build-arg argument to runners
4 participants