Skip to content

Commit

Permalink
Fixed the Python environment issue in the local Ray cluster. (#2207)
Browse files Browse the repository at this point in the history
  • Loading branch information
jieguangzhou authored Jun 21, 2024
1 parent 75f683b commit 2e66b63
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed Native encodable.
- Fix ibis cdc and cdc config
- Fixed 'objectmodel' and 'predict_one' in doc.
- Fixed ray dependencies bug
- Fixed ray dependencies bug.
- Fixed cluster bug.

## [0.1.3](https://github.com/SuperDuperDB/superduperdb/compare/0.1.1...0.1.3]) (2024-Jun-20)

Expand Down
3 changes: 3 additions & 0 deletions superduperdb/components/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ def encode_data(self, out, builds, blobs, files, leaves_to_keep=()):
if not isinstance(field, DataType):
continue

if k not in out:
continue

if isinstance(out[k], leaves_to_keep):
continue

Expand Down
2 changes: 2 additions & 0 deletions superduperdb/server/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def up_cluster(
CFG = os.environ.get('SUPERDUPERDB_CONFIG')
assert CFG, 'Please set SUPERDUPERDB_CONFIG environment variable'
python_executable = sys.executable
python_executable_dir = os.path.dirname(python_executable)
ray_path = os.popen('which ray').read().split('\n')[0].strip()
ray_executable = os.path.join(os.path.dirname(python_executable), ray_path)
run_tmux_command(
Expand All @@ -71,6 +72,7 @@ def up_cluster(
)

cmd = (
f"export PATH={python_executable_dir}:$PATH; "
f"SUPERDUPERDB_CONFIG={CFG} PYTHONPATH=$(pwd):. {ray_executable} start"
" --head --dashboard-host=0.0.0.0 --disable-usage-stats --block"
)
Expand Down

0 comments on commit 2e66b63

Please sign in to comment.