Skip to content

Commit

Permalink
fix remove paths
Browse files Browse the repository at this point in the history
  • Loading branch information
almazgimaev committed Jun 19, 2024
1 parent 587a896 commit b5dd5b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion _legacy/visualize_embeddings/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def calculate_projections(projection_method, metric="euclidean", umap_min_dist=0
)
torch.save(projections, save_paths["projections"])
print("uploading projections to team_files...")
api.file.upload(team_id, save_paths["projections"], save_paths["projections"])
remote_path = f"/{save_paths['projections']}"
api.file.upload(team_id, save_paths["projections"], remote_path)


obj_classes = list(set(all_info["object_cls"]))
Expand Down
3 changes: 2 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ def run():
projections = run_utils.calculate_projections(embeddings, all_info_list, projection_method, metric=metric)
print("uploading projections to team_files...")
torch.save(projections, save_paths["projections"])
api.file.upload(team_id, save_paths["projections"], save_paths["projections"])
remote_path = f"/{save_paths['projections']}"
api.file.upload(team_id, save_paths["projections"], remote_path)
file_id = str(api.file.get_info_by_path(team_id, "/" + save_paths["embeddings"]).id)
server_address = os.environ.get("SERVER_ADDRESS")
if server_address:
Expand Down

0 comments on commit b5dd5b5

Please sign in to comment.