diff --git a/experience/example/naive_symbolic_transform_model/train.py b/experience/example/naive_symbolic_transform_model/train.py index 0a12e21..3833a66 100644 --- a/experience/example/naive_symbolic_transform_model/train.py +++ b/experience/example/naive_symbolic_transform_model/train.py @@ -260,7 +260,7 @@ def log(msg=""): if __name__ == "__main__": # Source anthropic env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/llm_client/raw_llm_task_handler.py b/experience/llm_client/raw_llm_task_handler.py index 3646958..d07f949 100644 --- a/experience/llm_client/raw_llm_task_handler.py +++ b/experience/llm_client/raw_llm_task_handler.py @@ -86,7 +86,7 @@ async def _run_all(): # Source LLM env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/llm_client/task_handler.py b/experience/llm_client/task_handler.py index 68fc87f..057f998 100644 --- a/experience/llm_client/task_handler.py +++ b/experience/llm_client/task_handler.py @@ -25,7 +25,7 @@ def __call__(self, all_tasks, llm_method: str, llm_env: Optional[Dict[str, str]] # Source LLM env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/symbolic_tensor/function/coding_agent.py b/experience/symbolic_tensor/function/coding_agent.py index 42923fb..6c0b936 100644 --- a/experience/symbolic_tensor/function/coding_agent.py +++ b/experience/symbolic_tensor/function/coding_agent.py @@ -144,7 +144,7 @@ def coding_agent( # Source anthropic env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/symbolic_tensor/function/fork_tensor.py b/experience/symbolic_tensor/function/fork_tensor.py index ee43296..2bbcc56 100644 --- a/experience/symbolic_tensor/function/fork_tensor.py +++ b/experience/symbolic_tensor/function/fork_tensor.py @@ -253,7 +253,7 @@ def backward(ctx, *grad_outputs): # Source anthropic env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/symbolic_tensor/function/get_query_tensor.py b/experience/symbolic_tensor/function/get_query_tensor.py index 11096ae..880a61c 100644 --- a/experience/symbolic_tensor/function/get_query_tensor.py +++ b/experience/symbolic_tensor/function/get_query_tensor.py @@ -114,7 +114,7 @@ def get_query_tensor( # Source env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/symbolic_tensor/function/slice_attention.py b/experience/symbolic_tensor/function/slice_attention.py index bb0c438..a030007 100644 --- a/experience/symbolic_tensor/function/slice_attention.py +++ b/experience/symbolic_tensor/function/slice_attention.py @@ -183,7 +183,7 @@ def read_storage(tensor, flat_index): # Source anthropic env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/symbolic_tensor/function/slice_attention_backward.py b/experience/symbolic_tensor/function/slice_attention_backward.py index 70f2b3a..9de546b 100644 --- a/experience/symbolic_tensor/function/slice_attention_backward.py +++ b/experience/symbolic_tensor/function/slice_attention_backward.py @@ -207,7 +207,7 @@ def slice_attention_backward( # Source anthropic env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/symbolic_tensor/function/st_moe.py b/experience/symbolic_tensor/function/st_moe.py index e40b218..8f6a3c3 100644 --- a/experience/symbolic_tensor/function/st_moe.py +++ b/experience/symbolic_tensor/function/st_moe.py @@ -120,7 +120,7 @@ def backward(ctx, grad_output, grad_selected_indexes=None): # Source anthropic env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/symbolic_tensor/function/st_moe_backward.py b/experience/symbolic_tensor/function/st_moe_backward.py index 7d3c3c9..fb352cf 100644 --- a/experience/symbolic_tensor/function/st_moe_backward.py +++ b/experience/symbolic_tensor/function/st_moe_backward.py @@ -730,7 +730,7 @@ def st_moe_backward( # Source anthropic env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/symbolic_tensor/function/st_moe_forward.py b/experience/symbolic_tensor/function/st_moe_forward.py index 558145f..b1821c1 100644 --- a/experience/symbolic_tensor/function/st_moe_forward.py +++ b/experience/symbolic_tensor/function/st_moe_forward.py @@ -261,7 +261,7 @@ def st_moe_forward( # Source anthropic env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/symbolic_tensor/module/st_moe.py b/experience/symbolic_tensor/module/st_moe.py index 48a5d27..2b6a537 100644 --- a/experience/symbolic_tensor/module/st_moe.py +++ b/experience/symbolic_tensor/module/st_moe.py @@ -79,7 +79,7 @@ def forward(self, input: torch.Tensor) -> Tuple[torch.Tensor, Any]: # Source anthropic env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/symbolic_tensor/optimizer/st_sgd.py b/experience/symbolic_tensor/optimizer/st_sgd.py index 1c684aa..093edba 100644 --- a/experience/symbolic_tensor/optimizer/st_sgd.py +++ b/experience/symbolic_tensor/optimizer/st_sgd.py @@ -233,7 +233,7 @@ def zero_grad(self, set_to_none: bool = True) -> None: # Source anthropic env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/symbolic_tensor/tensor_util/make_tensor.py b/experience/symbolic_tensor/tensor_util/make_tensor.py index f81b4a8..9eb9140 100644 --- a/experience/symbolic_tensor/tensor_util/make_tensor.py +++ b/experience/symbolic_tensor/tensor_util/make_tensor.py @@ -117,8 +117,8 @@ def make_tensor(nested_data: NestedList, relative_to: str, symlink: bool = False src_path = str(opt_file_content_or_path) if symlink: rel_src = os.path.relpath( - str(opt_file_content_or_path.resolve()), - os.path.dirname(file_path), + os.path.realpath(str(opt_file_content_or_path)), + os.path.realpath(os.path.dirname(file_path)), ) os.symlink(rel_src, file_path) else: diff --git a/experience/test/test_attention_vs_traditional.py b/experience/test/test_attention_vs_traditional.py index 3d77be1..382e0d0 100644 --- a/experience/test/test_attention_vs_traditional.py +++ b/experience/test/test_attention_vs_traditional.py @@ -521,7 +521,7 @@ def run_test(name: str, condition: bool, expected=None, actual=None): # Source anthropic env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/test/test_gain_st_sgd.py b/experience/test/test_gain_st_sgd.py index 8b93a9b..f7bbae6 100644 --- a/experience/test/test_gain_st_sgd.py +++ b/experience/test/test_gain_st_sgd.py @@ -25,7 +25,7 @@ def read_storage(tensor, flat_index): if __name__ == "__main__": # Source anthropic env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/test/test_st_attention_followed_by_st_moe.py b/experience/test/test_st_attention_followed_by_st_moe.py index a669fd6..5b48cdd 100644 --- a/experience/test/test_st_attention_followed_by_st_moe.py +++ b/experience/test/test_st_attention_followed_by_st_moe.py @@ -101,7 +101,7 @@ def run_pipeline(model, inp, mask): if __name__ == "__main__": # Source anthropic env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines(): diff --git a/experience/test/test_transform_method_time_comparison.py b/experience/test/test_transform_method_time_comparison.py index 3a592d6..8bfed54 100644 --- a/experience/test/test_transform_method_time_comparison.py +++ b/experience/test/test_transform_method_time_comparison.py @@ -38,7 +38,7 @@ def run_benchmark(input_data, experience_data, topk, llm_method): if __name__ == "__main__": # Source env vars result = subprocess.run( - ["bash", "-c", "source ~/.anthropic.sh && env"], + ["bash", "-c", "source ~/.llm_config.sh && env"], capture_output=True, text=True, ) for line in result.stdout.splitlines():