mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-07-25 20:46:13 +00:00
fix visualization
This commit is contained in:
parent
c2561f826a
commit
db8baeeaf2
@ -74,8 +74,8 @@ for idx, (actor, func_dict) in enumerate(actors.items()):
|
|||||||
yticks.append(y_val)
|
yticks.append(y_val)
|
||||||
yticklabels.append(f"{actor}:{func}")
|
yticklabels.append(f"{actor}:{func}")
|
||||||
for start, end in intervals:
|
for start, end in intervals:
|
||||||
if end - start < 6:
|
if end - start < 1:
|
||||||
end = start + 6 # Ensure minimum length of 100ms
|
end = start + 1 # Ensure all lines are at least 3 units long
|
||||||
ax.plot(
|
ax.plot(
|
||||||
[start, end],
|
[start, end],
|
||||||
[y_val, y_val],
|
[y_val, y_val],
|
||||||
@ -96,5 +96,5 @@ unique = dict(zip(labels, handles))
|
|||||||
ax.legend(unique.values(), unique.keys())
|
ax.legend(unique.values(), unique.keys())
|
||||||
plt.tight_layout()
|
plt.tight_layout()
|
||||||
plt.grid(True)
|
plt.grid(True)
|
||||||
plt.savefig(args.visualization)
|
plt.savefig(args.visualization, dpi=600) # Increase dpi for higher resolution
|
||||||
print(f"Plot saved as {args.visualization}")
|
print(f"Plot saved as {args.visualization}")
|
||||||
|
Loading…
Reference in New Issue
Block a user