-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fixes after 0.4.0 release (#421)
* Update README.md (cherry picked from commit 5609535) * adding missing test case (cherry picked from commit 016c5c9) * Update README.md (cherry picked from commit 149919c) * adding finalize check and removing destructor finalize call. (#412) * adding finalize check and removing destructor finalize call. * adding env.finalize for dataframe examples * finalize checks. (cherry picked from commit 0200c02) * Update c-cpp.yml adding github CI again (cherry picked from commit e0ba964) * fixing #415 and #416 * changes to concat operation * unwrapping sort options onto sort method * Enabling scalars in df set_item (#425) * fixing minor bug in select * adding select tests * accommodating comments * minor improvements to #189 * enabling scalars in df set_item * fixing boost error (cherry picked from commit 10f5a6a) Co-authored-by: Supun Kamburugamuve <[email protected]> Co-authored-by: Vibhatha Lakmal Abeykoon <[email protected]>
- Loading branch information
1 parent
76d150e
commit 1476926
Showing
16 changed files
with
452 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,44 @@ | ||
import random | ||
|
||
import pycylon as cn | ||
from pycylon import DataFrame, CylonEnv | ||
from pycylon.net import MPIConfig | ||
import random | ||
|
||
df1 = DataFrame([random.sample(range(10, 100), 50), | ||
random.sample(range(10, 100), 50)]) | ||
df2 = DataFrame([random.sample(range(10, 100), 50), | ||
random.sample(range(10, 100), 50)]) | ||
df3 = DataFrame([random.sample(range(10, 100), 50), | ||
random.sample(range(10, 100), 50)]) | ||
df1 = DataFrame([random.sample(range(10, 100), 5), | ||
random.sample(range(10, 100), 5)]) | ||
df2 = DataFrame([random.sample(range(10, 100), 5), | ||
random.sample(range(10, 100), 5)]) | ||
df3 = DataFrame([random.sample(range(10, 100), 10), | ||
random.sample(range(10, 100), 10)]) | ||
|
||
# local unique | ||
df4 = df1.concat(axis=0, objs=[df2, df3]) | ||
print("Local Unique") | ||
df4 = cn.concat(axis=0, objs=[df1, df2, df3]) | ||
print("Local concat axis0") | ||
print(df4) | ||
|
||
df2.rename(['00', '11']) | ||
df3.rename(['000', '111']) | ||
df4 = cn.concat(axis=1, objs=[df1, df2, df3]) | ||
print("Local concat axis1") | ||
print(df4) | ||
|
||
# distributed unique | ||
env = CylonEnv(config=MPIConfig()) | ||
|
||
df1 = DataFrame([random.sample(range(10 * env.rank, 15 * (env.rank + 1)), 5), | ||
random.sample(range(10 * env.rank, 15 * (env.rank + 1)), 5)]) | ||
df2 = DataFrame([random.sample(range(10 * env.rank, 15 * (env.rank + 1)), 5), | ||
random.sample(range(10 * env.rank, 15 * (env.rank + 1)), 5)]) | ||
df3 = DataFrame([random.sample(range(10 * env.rank, 15 * (env.rank + 1)), 10), | ||
random.sample(range(10 * env.rank, 15 * (env.rank + 1)), 10)]) | ||
print("Distributed concat axis0", env.rank) | ||
df4 = cn.concat(axis=0, objs=[df1, df2, df3], env=env) | ||
print(df4) | ||
|
||
df1 = DataFrame([random.sample(range(10*env.rank, 15*(env.rank+1)), 5), | ||
random.sample(range(10*env.rank, 15*(env.rank+1)), 5)]) | ||
df2 = DataFrame([random.sample(range(10*env.rank, 15*(env.rank+1)), 5), | ||
random.sample(range(10*env.rank, 15*(env.rank+1)), 5)]) | ||
df3 = DataFrame([random.sample(range(10*env.rank, 15*(env.rank+1)), 5), | ||
random.sample(range(10*env.rank, 15*(env.rank+1)), 5)]) | ||
print("Distributed Unique", env.rank) | ||
df4 = df1.concat(axis=0, objs=[df2, df3], env=env) | ||
df2.rename(['00', '11']) | ||
df3.rename(['000', '111']) | ||
df4 = cn.concat(axis=1, objs=[df1, df2, df3], env=env) | ||
print("Distributed concat axis1", env.rank) | ||
print(df4) | ||
|
||
env.finalize() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,5 @@ | |
print("Distributed Unique", env.rank) | ||
df3 = df1.drop_duplicates(env=env) | ||
print(df3) | ||
|
||
env.finalize() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,5 @@ | |
print("Distributed Join") | ||
df3 = df1.join(other=df2, on=[0], env=env) | ||
print(df3) | ||
|
||
env.finalize() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,5 @@ | |
print("Distributed Merge") | ||
df3 = df1.merge(right=df2, on=[0], env=env) | ||
print(df3) | ||
|
||
env.finalize() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.