Files
OpenLLM/tools/bazel.rc
Chaoyu dd8b6050b2 feat: FLAN-T5 supports
- add infrastructure, to be implemented: cache, chat history

- Base Runnable Implementation, that fits LangChain API

- Added a Prompt descriptor and utils.

feat: license headers and auto factory impl and CLI

Auto construct args from pydantic config

Add auto factory for ease of use

only provide `/generate` to streamline UX experience

CLI > envvar > input contract for configuration

fix: serve from a thread

fix CLI args

chore: cleanup names and refactor imports

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
2023-05-03 17:50:14 -07:00

59 lines
2.1 KiB
Plaintext

# Coloring for error messages.
common --color=yes
# Work around https://github.com/bazelbuild/bazel/issues/6293 by setting a dummy lcov.
coverage --combined_report=lcov --coverage_report_generator=@bazel_tools//tools/test:lcov_merger
# prevent creation of empty __init__.py
# see: https://github.com/bazelbuild/bazel/issues/10076, https://github.com/bazelbuild/bazel/issues/7386
build --incompatible_default_to_explicit_init_py
test --incompatible_default_to_explicit_init_py
# Windows requires enable_runfiles
build --enable_runfiles
startup --windows_enable_symlinks
## Build ##
# Turn off legacy external runfiles
# This prevents accidentally depending on this feature, which Bazel will remove.
build --nolegacy_external_runfiles
# Use clang as our complier instead of gcc
build --client_env=CC=clang
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14
# specify fast_cpp_protos for protobuf
build --define=use_fast_cpp_protos=true
# don't zip, see: https://github.com/bazelbuild/bazel/issues/8981
build --build_python_zip=false
build --verbose_failures
build --worker_verbose
# --config=opt
build:opt --compilation_mode=opt
build:opt --copt=-Wframe-larger-than=16384
# --config=dbg
build:dbg --compilation_mode=dbg
build:dbg --copt=-Werror=return-stack-address
# Dynamic link cause issues like: `dyld: malformed mach-o: load commands size (59272) > 32768`
# https://github.com/bazelbuild/bazel/issues/9190
build:macos --dynamic_mode=off
# Address https://github.com/bazelbuild/rules_swift/issues/776
build:macos --host_swiftcopt=-wmo --swiftcopt=-wmo
# The default strategy is worker, which has sandboxing disabled by default,
# which can hide issues with non-hermetic bugs.
build:macos --strategy=SwiftCompile=sandboxed
## Test ##
# --test_output=errors: Printout test error
test --test_output=errors
# with dbg mode we will stream the output
test:dbg --test_output=streamed
# nix config
build:nix --copt="-I$(nix eval --impure --raw --expr 'let pkgs = import <nixpkgs> { }; in pkgs.llvmPackages.openmp.out')/include -L$(nix eval --impure --raw --expr 'let pkgs = import <nixpkgs> { }; in pkgs.llvmPackages.openmp.out')/lib"